Lines Matching refs:qedf
11 void qedf_cmd_timer_set(struct qedf_ctx *qedf, struct qedf_ioreq *io_req, in qedf_cmd_timer_set() argument
14 queue_delayed_work(qedf->timer_work_queue, &io_req->timeout_work, in qedf_cmd_timer_set()
23 struct qedf_ctx *qedf; in qedf_cmd_timeout() local
32 qedf = fcport->qedf; in qedf_cmd_timeout()
36 if (qedf == NULL) { in qedf_cmd_timeout()
43 QEDF_ERR((&qedf->dbg_ctx), "ABTS timeout, xid=0x%x.\n", in qedf_cmd_timeout()
66 if (!qedf) { in qedf_cmd_timeout()
81 QEDF_ERR(&(qedf->dbg_ctx), "ELS timeout, xid=0x%x.\n", in qedf_cmd_timeout()
93 QEDF_ERR(&(qedf->dbg_ctx), "Sequence cleanup timeout, " in qedf_cmd_timeout()
97 qedf_process_seq_cleanup_compl(qedf, NULL, io_req); in qedf_cmd_timeout()
100 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_cmd_timeout()
109 struct qedf_ctx *qedf = cmgr->qedf; in qedf_cmd_mgr_free() local
121 QEDF_ERR(&qedf->dbg_ctx, "io_bdt_pool is NULL.\n"); in qedf_cmd_mgr_free()
129 dma_free_coherent(&qedf->pdev->dev, bd_tbl_sz, in qedf_cmd_mgr_free()
152 dma_free_coherent(&qedf->pdev->dev, in qedf_cmd_mgr_free()
172 struct qedf_cmd_mgr *qedf_cmd_mgr_alloc(struct qedf_ctx *qedf) in qedf_cmd_mgr_alloc() argument
184 if (!qedf->num_queues) { in qedf_cmd_mgr_alloc()
185 QEDF_ERR(&(qedf->dbg_ctx), "num_queues is not set.\n"); in qedf_cmd_mgr_alloc()
190 QEDF_WARN(&(qedf->dbg_ctx), "Invalid min_xid 0x%x and " in qedf_cmd_mgr_alloc()
195 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_DISC, "min xid 0x%x, max xid " in qedf_cmd_mgr_alloc()
202 QEDF_WARN(&(qedf->dbg_ctx), "Failed to alloc cmd mgr.\n"); in qedf_cmd_mgr_alloc()
206 cmgr->qedf = qedf; in qedf_cmd_mgr_alloc()
223 io_req->sense_buffer = dma_alloc_coherent(&qedf->pdev->dev, in qedf_cmd_mgr_alloc()
227 QEDF_ERR(&qedf->dbg_ctx, in qedf_cmd_mgr_alloc()
236 QEDF_ERR(&(qedf->dbg_ctx), in qedf_cmd_mgr_alloc()
249 QEDF_ERR(&(qedf->dbg_ctx), in qedf_cmd_mgr_alloc()
261 QEDF_WARN(&(qedf->dbg_ctx), "Failed to alloc io_bdt_pool.\n"); in qedf_cmd_mgr_alloc()
269 QEDF_WARN(&(qedf->dbg_ctx), in qedf_cmd_mgr_alloc()
277 bdt_info->bd_tbl = dma_alloc_coherent(&qedf->pdev->dev, in qedf_cmd_mgr_alloc()
281 QEDF_WARN(&(qedf->dbg_ctx), in qedf_cmd_mgr_alloc()
287 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_IO, in qedf_cmd_mgr_alloc()
300 struct qedf_ctx *qedf = fcport->qedf; in qedf_alloc_cmd() local
301 struct qedf_cmd_mgr *cmd_mgr = qedf->cmd_mgr; in qedf_alloc_cmd()
312 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_IO, in qedf_alloc_cmd()
321 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_IO, in qedf_alloc_cmd()
329 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_IO, in qedf_alloc_cmd()
353 QEDF_ERR(&qedf->dbg_ctx, in qedf_alloc_cmd()
382 QEDF_ERR(&(qedf->dbg_ctx), "bd_tbl is NULL, xid=%x.\n", xid); in qedf_alloc_cmd()
399 qedf->alloc_failures++; in qedf_alloc_cmd()
406 struct qedf_ctx *qedf = io_req->fcport->qedf; in qedf_free_mp_resc() local
411 dma_free_coherent(&qedf->pdev->dev, sz, in qedf_free_mp_resc()
416 dma_free_coherent(&qedf->pdev->dev, sz, in qedf_free_mp_resc()
421 dma_free_coherent(&qedf->pdev->dev, QEDF_PAGE_SIZE, in qedf_free_mp_resc()
426 dma_free_coherent(&qedf->pdev->dev, QEDF_PAGE_SIZE, in qedf_free_mp_resc()
441 QEDF_WARN(&fcport->qedf->dbg_ctx, in qedf_release_cmd()
455 QEDF_WARN(&(fcport->qedf->dbg_ctx), "active_ios < 0.\n"); in qedf_release_cmd()
476 struct qedf_ctx *qedf = lport_priv(lport); in qedf_map_sg() local
486 sg_count = dma_map_sg(&qedf->pdev->dev, scsi_sglist(sc), in qedf_map_sg()
521 QEDF_ERR(&(qedf->dbg_ctx), "byte_count = %d != " in qedf_map_sg()
596 struct qedf_ctx *qedf = fcport->qedf; in qedf_init_task() local
597 uint16_t cq_idx = smp_processor_id() % qedf->num_queues; in qedf_init_task()
671 qedf->slow_sge_ios++; in qedf_init_task()
673 qedf->fast_sge_ios++; in qedf_init_task()
681 struct qedf_ctx *qedf = io_req->fcport->qedf; in qedf_init_mp_task() local
687 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_DISC, in qedf_init_mp_task()
691 qedf->control_requests++; in qedf_init_mp_task()
803 struct qedf_ctx *qedf = fcport->qedf; in qedf_trace_io() local
809 spin_lock_irqsave(&qedf->io_trace_lock, flags); in qedf_trace_io()
811 io_log = &qedf->io_trace_buf[qedf->io_trace_idx]; in qedf_trace_io()
840 qedf->io_trace_idx++; in qedf_trace_io()
841 if (qedf->io_trace_idx == QEDF_IO_TRACE_SIZE) in qedf_trace_io()
842 qedf->io_trace_idx = 0; in qedf_trace_io()
844 spin_unlock_irqrestore(&qedf->io_trace_lock, flags); in qedf_trace_io()
852 struct qedf_ctx *qedf = lport_priv(lport); in qedf_post_io_req() local
868 qedf->input_requests++; in qedf_post_io_req()
871 qedf->output_requests++; in qedf_post_io_req()
874 qedf->control_requests++; in qedf_post_io_req()
881 QEDF_ERR(&(qedf->dbg_ctx), "BD list creation failed.\n"); in qedf_post_io_req()
890 QEDF_ERR(&(qedf->dbg_ctx), "Session not offloaded yet.\n"); in qedf_post_io_req()
906 task_ctx = qedf_get_task_mem(&qedf->tasks, xid); in qedf_post_io_req()
908 QEDF_WARN(&(qedf->dbg_ctx), "task_ctx is NULL, xid=%d.\n", in qedf_post_io_req()
934 struct qedf_ctx *qedf = lport_priv(lport); in qedf_queuecommand() local
946 QEDF_ERR(&qedf->dbg_ctx, in qedf_queuecommand()
954 if (test_bit(QEDF_UNLOADING, &qedf->flags) || in qedf_queuecommand()
955 test_bit(QEDF_DBG_STOP_IO, &qedf->flags)) { in qedf_queuecommand()
956 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_queuecommand()
958 qedf->flags); in qedf_queuecommand()
964 if (!qedf->pdev->msix_enabled) { in qedf_queuecommand()
965 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_IO, in qedf_queuecommand()
975 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_queuecommand()
984 if (test_bit(QEDF_DRAIN_ACTIVE, &qedf->flags)) { in qedf_queuecommand()
985 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, "Drain active.\n"); in qedf_queuecommand()
991 atomic_read(&qedf->link_state) != QEDF_LINK_UP) { in qedf_queuecommand()
992 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, "Link down.\n"); in qedf_queuecommand()
1039 QEDF_WARN(&(qedf->dbg_ctx), "Unable to post io_req\n"); in qedf_queuecommand()
1055 struct qedf_ctx *qedf = io_req->fcport->qedf; in qedf_parse_fcp_rsp() local
1087 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_IO, in qedf_parse_fcp_rsp()
1094 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_IO, in qedf_parse_fcp_rsp()
1108 static void qedf_unmap_sg_list(struct qedf_ctx *qedf, struct qedf_ioreq *io_req) in qedf_unmap_sg_list() argument
1113 dma_unmap_sg(&qedf->pdev->dev, scsi_sglist(sc), in qedf_unmap_sg_list()
1119 void qedf_scsi_completion(struct qedf_ctx *qedf, struct fcoe_cqe *cqe, in qedf_scsi_completion() argument
1139 QEDF_ERR(&qedf->dbg_ctx, in qedf_scsi_completion()
1149 QEDF_WARN(&(qedf->dbg_ctx), "sc_cmd is NULL!\n"); in qedf_scsi_completion()
1154 QEDF_WARN(&(qedf->dbg_ctx), "SCp.ptr is NULL, returned in " in qedf_scsi_completion()
1160 QEDF_ERR(&qedf->dbg_ctx, in qedf_scsi_completion()
1166 QEDF_WARN(&(qedf->dbg_ctx), "request->q is NULL so request " in qedf_scsi_completion()
1180 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_scsi_completion()
1188 qedf_unmap_sg_list(qedf, io_req); in qedf_scsi_completion()
1192 QEDF_ERR(&(qedf->dbg_ctx), in qedf_scsi_completion()
1203 QEDF_ERR(&qedf->dbg_ctx, in qedf_scsi_completion()
1230 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_IO, in qedf_scsi_completion()
1234 qedf->lport->host->host_no, sc_cmd->device->id, in qedf_scsi_completion()
1260 qedf->task_set_fulls++; in qedf_scsi_completion()
1262 qedf->busy++; in qedf_scsi_completion()
1274 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_scsi_completion()
1279 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_scsi_completion()
1292 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_scsi_completion()
1299 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_IO, "fcp_status=%d.\n", in qedf_scsi_completion()
1321 void qedf_scsi_done(struct qedf_ctx *qedf, struct qedf_ioreq *io_req, in qedf_scsi_done() argument
1328 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, "io_req is NULL\n"); in qedf_scsi_done()
1333 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_scsi_done()
1348 QEDF_WARN(&(qedf->dbg_ctx), "sc_cmd is NULL!\n"); in qedf_scsi_done()
1353 QEDF_ERR(&qedf->dbg_ctx, "sc_cmd=%p is not valid.", sc_cmd); in qedf_scsi_done()
1358 QEDF_WARN(&(qedf->dbg_ctx), "SCp.ptr is NULL, returned in " in qedf_scsi_done()
1364 QEDF_ERR(&qedf->dbg_ctx, "Device for sc_cmd %p is NULL.\n", in qedf_scsi_done()
1370 QEDF_ERR(&qedf->dbg_ctx, in qedf_scsi_done()
1376 QEDF_ERR(&qedf->dbg_ctx, in qedf_scsi_done()
1383 QEDF_ERR(&qedf->dbg_ctx, in qedf_scsi_done()
1390 QEDF_ERR(&qedf->dbg_ctx, in qedf_scsi_done()
1396 qedf_unmap_sg_list(qedf, io_req); in qedf_scsi_done()
1400 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_IO, "%d:0:%d:%lld: Completing " in qedf_scsi_done()
1403 qedf->lport->host->host_no, sc_cmd->device->id, in qedf_scsi_done()
1437 void qedf_process_warning_compl(struct qedf_ctx *qedf, struct fcoe_cqe *cqe, in qedf_process_warning_compl() argument
1446 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_process_warning_compl()
1452 QEDF_ERR(&(io_req->fcport->qedf->dbg_ctx), "Warning CQE, " in qedf_process_warning_compl()
1454 QEDF_ERR(&(io_req->fcport->qedf->dbg_ctx), in qedf_process_warning_compl()
1458 QEDF_ERR(&(io_req->fcport->qedf->dbg_ctx), "tx_buff_off=%08x, " in qedf_process_warning_compl()
1479 QEDF_ERR(&(qedf->dbg_ctx), "REC timer expired.\n"); in qedf_process_warning_compl()
1503 QEDF_ERR(&(qedf->dbg_ctx), "Failed to queue ABTS.\n"); in qedf_process_warning_compl()
1507 void qedf_process_error_detect(struct qedf_ctx *qedf, struct fcoe_cqe *cqe, in qedf_process_error_detect() argument
1523 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_process_error_detect()
1528 QEDF_ERR(&(io_req->fcport->qedf->dbg_ctx), "Error detection CQE, " in qedf_process_error_detect()
1530 QEDF_ERR(&(io_req->fcport->qedf->dbg_ctx), in qedf_process_error_detect()
1534 QEDF_ERR(&(io_req->fcport->qedf->dbg_ctx), "tx_buff_off=%08x, " in qedf_process_error_detect()
1544 QEDF_ERR(&qedf->dbg_ctx, in qedf_process_error_detect()
1550 if (qedf->stop_io_on_error) { in qedf_process_error_detect()
1551 qedf_stop_all_io(qedf); in qedf_process_error_detect()
1558 QEDF_ERR(&(qedf->dbg_ctx), "Failed to queue ABTS.\n"); in qedf_process_error_detect()
1561 static void qedf_flush_els_req(struct qedf_ctx *qedf, in qedf_flush_els_req() argument
1564 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_IO, in qedf_flush_els_req()
1595 struct qedf_ctx *qedf; in qedf_flush_active_ios() local
1614 qedf = fcport->qedf; in qedf_flush_active_ios()
1616 if (!qedf) { in qedf_flush_active_ios()
1625 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_flush_active_ios()
1638 cmd_mgr = qedf->cmd_mgr; in qedf_flush_active_ios()
1640 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_flush_active_ios()
1644 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, "Locking flush mutex.\n"); in qedf_flush_active_ios()
1646 mutex_lock(&qedf->flush_mutex); in qedf_flush_active_ios()
1667 QEDF_ERR(&qedf->dbg_ctx, in qedf_flush_active_ios()
1687 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_flush_active_ios()
1697 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_flush_active_ios()
1713 QEDF_ERR(&(qedf->dbg_ctx), in qedf_flush_active_ios()
1720 qedf_flush_els_req(qedf, io_req); in qedf_flush_active_ios()
1733 QEDF_ERR(&(qedf->dbg_ctx), in qedf_flush_active_ios()
1741 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_flush_active_ios()
1745 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_flush_active_ios()
1752 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_flush_active_ios()
1771 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_flush_active_ios()
1791 QEDF_ERR(&(qedf->dbg_ctx), "Could not get kref for " in qedf_flush_active_ios()
1796 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_IO, in qedf_flush_active_ios()
1808 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_flush_active_ios()
1815 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_flush_active_ios()
1821 QEDF_ERR(&qedf->dbg_ctx, in qedf_flush_active_ios()
1833 QEDF_ERR(&qedf->dbg_ctx, in qedf_flush_active_ios()
1852 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, "Unlocking flush mutex.\n"); in qedf_flush_active_ios()
1853 mutex_unlock(&qedf->flush_mutex); in qedf_flush_active_ios()
1865 struct qedf_ctx *qedf; in qedf_initiate_abts() local
1880 qedf = fcport->qedf; in qedf_initiate_abts()
1884 QEDF_ERR(&qedf->dbg_ctx, "stale rport\n"); in qedf_initiate_abts()
1889 lport = qedf->lport; in qedf_initiate_abts()
1892 QEDF_ERR(&(qedf->dbg_ctx), "link is not ready\n"); in qedf_initiate_abts()
1897 if (atomic_read(&qedf->link_down_tmo_valid) > 0) { in qedf_initiate_abts()
1898 QEDF_ERR(&(qedf->dbg_ctx), "link_down_tmo active.\n"); in qedf_initiate_abts()
1905 QEDF_ERR(&(qedf->dbg_ctx), "No SQ entries available\n"); in qedf_initiate_abts()
1911 QEDF_ERR(&qedf->dbg_ctx, "fcport is uploading.\n"); in qedf_initiate_abts()
1920 QEDF_ERR(&qedf->dbg_ctx, in qedf_initiate_abts()
1935 qedf->control_requests++; in qedf_initiate_abts()
1936 qedf->packet_aborts++; in qedf_initiate_abts()
1942 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_SCSI_TM, in qedf_initiate_abts()
1946 qedf_cmd_timer_set(qedf, io_req, QEDF_ABORT_TIMEOUT); in qedf_initiate_abts()
1966 void qedf_process_abts_compl(struct qedf_ctx *qedf, struct fcoe_cqe *cqe, in qedf_process_abts_compl() argument
1973 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_SCSI_TM, "Entered with xid = " in qedf_process_abts_compl()
1983 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_process_abts_compl()
1995 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_process_abts_compl()
2002 QEDF_ERR(&qedf->dbg_ctx, in qedf_process_abts_compl()
2008 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_SCSI_TM, in qedf_process_abts_compl()
2013 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_SCSI_TM, in qedf_process_abts_compl()
2022 queue_delayed_work(qedf->dpc_wq, &io_req->rrq_work, in qedf_process_abts_compl()
2023 msecs_to_jiffies(qedf->lport->r_a_tov)); in qedf_process_abts_compl()
2028 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_SCSI_TM, in qedf_process_abts_compl()
2033 QEDF_ERR(&(qedf->dbg_ctx), "Unknown ABTS response\n"); in qedf_process_abts_compl()
2041 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_SCSI_TM, in qedf_process_abts_compl()
2045 qedf_scsi_done(qedf, io_req, DID_ERROR); in qedf_process_abts_compl()
2059 struct qedf_ctx *qedf = io_req->fcport->qedf; in qedf_init_mp_req() local
2063 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_MP_REQ, "Entered.\n"); in qedf_init_mp_req()
2074 mp_req->req_buf = dma_alloc_coherent(&qedf->pdev->dev, QEDF_PAGE_SIZE, in qedf_init_mp_req()
2077 QEDF_ERR(&(qedf->dbg_ctx), "Unable to alloc MP req buffer\n"); in qedf_init_mp_req()
2082 mp_req->resp_buf = dma_alloc_coherent(&qedf->pdev->dev, in qedf_init_mp_req()
2085 QEDF_ERR(&(qedf->dbg_ctx), "Unable to alloc TM resp " in qedf_init_mp_req()
2093 mp_req->mp_req_bd = dma_alloc_coherent(&qedf->pdev->dev, sz, in qedf_init_mp_req()
2096 QEDF_ERR(&(qedf->dbg_ctx), "Unable to alloc MP req bd\n"); in qedf_init_mp_req()
2101 mp_req->mp_resp_bd = dma_alloc_coherent(&qedf->pdev->dev, sz, in qedf_init_mp_req()
2104 QEDF_ERR(&(qedf->dbg_ctx), "Unable to alloc MP resp bd\n"); in qedf_init_mp_req()
2134 static void qedf_drain_request(struct qedf_ctx *qedf) in qedf_drain_request() argument
2136 if (test_bit(QEDF_DRAIN_ACTIVE, &qedf->flags)) { in qedf_drain_request()
2137 QEDF_ERR(&(qedf->dbg_ctx), "MCP drain already active.\n"); in qedf_drain_request()
2142 set_bit(QEDF_DRAIN_ACTIVE, &qedf->flags); in qedf_drain_request()
2145 qed_ops->common->drain(qedf->cdev); in qedf_drain_request()
2151 clear_bit(QEDF_DRAIN_ACTIVE, &qedf->flags); in qedf_drain_request()
2162 struct qedf_ctx *qedf; in qedf_initiate_cleanup() local
2182 qedf = fcport->qedf; in qedf_initiate_cleanup()
2183 if (!qedf) { in qedf_initiate_cleanup()
2194 QEDF_ERR(&(qedf->dbg_ctx), "io_req xid=0x%x already in " in qedf_initiate_cleanup()
2204 QEDF_ERR(&(qedf->dbg_ctx), "No SQ entries available\n"); in qedf_initiate_cleanup()
2211 QEDF_ERR(&qedf->dbg_ctx, in qedf_initiate_cleanup()
2220 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_initiate_cleanup()
2251 QEDF_ERR(&(qedf->dbg_ctx), "Cleanup command timeout, " in qedf_initiate_cleanup()
2255 QEDF_ERR(&(qedf->dbg_ctx), "Issuing MCP drain request.\n"); in qedf_initiate_cleanup()
2256 qedf_drain_request(qedf); in qedf_initiate_cleanup()
2272 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_SCSI_TM, in qedf_initiate_cleanup()
2276 qedf_scsi_done(qedf, io_req, DID_ERROR); in qedf_initiate_cleanup()
2287 void qedf_process_cleanup_compl(struct qedf_ctx *qedf, struct fcoe_cqe *cqe, in qedf_process_cleanup_compl() argument
2290 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_IO, "Entered xid = 0x%x\n", in qedf_process_cleanup_compl()
2304 struct qedf_ctx *qedf = fcport->qedf; in qedf_execute_tmf() local
2305 struct fc_lport *lport = qedf->lport; in qedf_execute_tmf()
2315 QEDF_ERR(&qedf->dbg_ctx, "sc_cmd is NULL\n"); in qedf_execute_tmf()
2321 QEDF_ERR(&(qedf->dbg_ctx), "fcport not offloaded\n"); in qedf_execute_tmf()
2328 QEDF_ERR(&(qedf->dbg_ctx), "Failed TMF"); in qedf_execute_tmf()
2334 qedf->lun_resets++; in qedf_execute_tmf()
2336 qedf->target_resets++; in qedf_execute_tmf()
2357 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_SCSI_TM, "TMF io_req xid = " in qedf_execute_tmf()
2361 task = qedf_get_task_mem(&qedf->tasks, xid); in qedf_execute_tmf()
2382 QEDF_ERR(&(qedf->dbg_ctx), "wait for tm_cmpl timeout!\n"); in qedf_execute_tmf()
2398 QEDF_ERR(&qedf->dbg_ctx, in qedf_execute_tmf()
2413 QEDF_ERR(&(qedf->dbg_ctx), "task mgmt command failed...\n"); in qedf_execute_tmf()
2416 QEDF_ERR(&(qedf->dbg_ctx), "task mgmt command success...\n"); in qedf_execute_tmf()
2427 struct qedf_ctx *qedf; in qedf_initiate_tmf() local
2474 qedf = fcport->qedf; in qedf_initiate_tmf()
2476 if (!qedf) { in qedf_initiate_tmf()
2483 QEDF_ERR(&qedf->dbg_ctx, "Connection is getting uploaded.\n"); in qedf_initiate_tmf()
2488 if (test_bit(QEDF_UNLOADING, &qedf->flags) || in qedf_initiate_tmf()
2489 test_bit(QEDF_DBG_STOP_IO, &qedf->flags)) { in qedf_initiate_tmf()
2495 QEDF_ERR(&(qedf->dbg_ctx), "link is not ready\n"); in qedf_initiate_tmf()
2502 QEDF_ERR(&qedf->dbg_ctx, "fcport %p is uploading.\n", in qedf_initiate_tmf()
2505 QEDF_ERR(&qedf->dbg_ctx, in qedf_initiate_tmf()
2519 void qedf_process_tmf_compl(struct qedf_ctx *qedf, struct fcoe_cqe *cqe, in qedf_process_tmf_compl() argument
2533 void qedf_process_unsol_compl(struct qedf_ctx *qedf, uint16_t que_idx, in qedf_process_unsol_compl() argument
2547 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_UNSOL, in qedf_process_unsol_compl()
2553 qedf->bdq_prod_idx, pktlen); in qedf_process_unsol_compl()
2557 QEDF_ERR(&(qedf->dbg_ctx), "bdq_idx is out of range %d.\n", in qedf_process_unsol_compl()
2562 bdq_addr = qedf->bdq[bdq_idx].buf_addr; in qedf_process_unsol_compl()
2564 QEDF_ERR(&(qedf->dbg_ctx), "bdq_addr is NULL, dropping " in qedf_process_unsol_compl()
2570 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_UNSOL, in qedf_process_unsol_compl()
2578 fp = fc_frame_alloc(qedf->lport, payload_len); in qedf_process_unsol_compl()
2580 QEDF_ERR(&(qedf->dbg_ctx), "Could not allocate fp.\n"); in qedf_process_unsol_compl()
2588 QEDF_WARN(&qedf->dbg_ctx, in qedf_process_unsol_compl()
2596 fr_dev(fp) = qedf->lport; in qedf_process_unsol_compl()
2605 io_work = mempool_alloc(qedf->io_mempool, GFP_ATOMIC); in qedf_process_unsol_compl()
2607 QEDF_WARN(&(qedf->dbg_ctx), "Could not allocate " in qedf_process_unsol_compl()
2619 io_work->qedf = qedf; in qedf_process_unsol_compl()
2624 spin_lock_irqsave(&qedf->hba_lock, flags); in qedf_process_unsol_compl()
2627 qedf->bdq_prod_idx++; in qedf_process_unsol_compl()
2630 if (qedf->bdq_prod_idx == 0xffff) in qedf_process_unsol_compl()
2631 qedf->bdq_prod_idx = 0; in qedf_process_unsol_compl()
2633 writew(qedf->bdq_prod_idx, qedf->bdq_primary_prod); in qedf_process_unsol_compl()
2634 readw(qedf->bdq_primary_prod); in qedf_process_unsol_compl()
2635 writew(qedf->bdq_prod_idx, qedf->bdq_secondary_prod); in qedf_process_unsol_compl()
2636 readw(qedf->bdq_secondary_prod); in qedf_process_unsol_compl()
2638 spin_unlock_irqrestore(&qedf->hba_lock, flags); in qedf_process_unsol_compl()