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
37 qedf = fcport->qedf; in qedf_cmd_timeout()
41 if (qedf == NULL) { in qedf_cmd_timeout()
48 QEDF_ERR((&qedf->dbg_ctx), "ABTS timeout, xid=0x%x.\n", in qedf_cmd_timeout()
71 if (!qedf) { in qedf_cmd_timeout()
86 QEDF_ERR(&(qedf->dbg_ctx), "ELS timeout, xid=0x%x.\n", in qedf_cmd_timeout()
98 QEDF_ERR(&(qedf->dbg_ctx), "Sequence cleanup timeout, " in qedf_cmd_timeout()
102 qedf_process_seq_cleanup_compl(qedf, NULL, io_req); in qedf_cmd_timeout()
105 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_cmd_timeout()
114 struct qedf_ctx *qedf = cmgr->qedf; in qedf_cmd_mgr_free() local
126 QEDF_ERR(&qedf->dbg_ctx, "io_bdt_pool is NULL.\n"); in qedf_cmd_mgr_free()
134 dma_free_coherent(&qedf->pdev->dev, bd_tbl_sz, in qedf_cmd_mgr_free()
157 dma_free_coherent(&qedf->pdev->dev, in qedf_cmd_mgr_free()
177 struct qedf_cmd_mgr *qedf_cmd_mgr_alloc(struct qedf_ctx *qedf) in qedf_cmd_mgr_alloc() argument
189 if (!qedf->num_queues) { in qedf_cmd_mgr_alloc()
190 QEDF_ERR(&(qedf->dbg_ctx), "num_queues is not set.\n"); in qedf_cmd_mgr_alloc()
195 QEDF_WARN(&(qedf->dbg_ctx), "Invalid min_xid 0x%x and " in qedf_cmd_mgr_alloc()
200 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_DISC, "min xid 0x%x, max xid " in qedf_cmd_mgr_alloc()
207 QEDF_WARN(&(qedf->dbg_ctx), "Failed to alloc cmd mgr.\n"); in qedf_cmd_mgr_alloc()
211 cmgr->qedf = qedf; in qedf_cmd_mgr_alloc()
228 io_req->sense_buffer = dma_alloc_coherent(&qedf->pdev->dev, in qedf_cmd_mgr_alloc()
232 QEDF_ERR(&qedf->dbg_ctx, in qedf_cmd_mgr_alloc()
241 QEDF_ERR(&(qedf->dbg_ctx), in qedf_cmd_mgr_alloc()
254 QEDF_ERR(&(qedf->dbg_ctx), in qedf_cmd_mgr_alloc()
266 QEDF_WARN(&(qedf->dbg_ctx), "Failed to alloc io_bdt_pool.\n"); in qedf_cmd_mgr_alloc()
274 QEDF_WARN(&(qedf->dbg_ctx), in qedf_cmd_mgr_alloc()
282 bdt_info->bd_tbl = dma_alloc_coherent(&qedf->pdev->dev, in qedf_cmd_mgr_alloc()
286 QEDF_WARN(&(qedf->dbg_ctx), in qedf_cmd_mgr_alloc()
292 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_IO, in qedf_cmd_mgr_alloc()
305 struct qedf_ctx *qedf = fcport->qedf; in qedf_alloc_cmd() local
306 struct qedf_cmd_mgr *cmd_mgr = qedf->cmd_mgr; in qedf_alloc_cmd()
317 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_IO, in qedf_alloc_cmd()
326 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_IO, in qedf_alloc_cmd()
334 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_IO, in qedf_alloc_cmd()
358 QEDF_ERR(&qedf->dbg_ctx, in qedf_alloc_cmd()
387 QEDF_ERR(&(qedf->dbg_ctx), "bd_tbl is NULL, xid=%x.\n", xid); in qedf_alloc_cmd()
404 qedf->alloc_failures++; in qedf_alloc_cmd()
411 struct qedf_ctx *qedf = io_req->fcport->qedf; in qedf_free_mp_resc() local
416 dma_free_coherent(&qedf->pdev->dev, sz, in qedf_free_mp_resc()
421 dma_free_coherent(&qedf->pdev->dev, sz, in qedf_free_mp_resc()
426 dma_free_coherent(&qedf->pdev->dev, QEDF_PAGE_SIZE, in qedf_free_mp_resc()
431 dma_free_coherent(&qedf->pdev->dev, QEDF_PAGE_SIZE, in qedf_free_mp_resc()
446 QEDF_WARN(&fcport->qedf->dbg_ctx, in qedf_release_cmd()
460 QEDF_WARN(&(fcport->qedf->dbg_ctx), "active_ios < 0.\n"); in qedf_release_cmd()
481 struct qedf_ctx *qedf = lport_priv(lport); in qedf_map_sg() local
491 sg_count = dma_map_sg(&qedf->pdev->dev, scsi_sglist(sc), in qedf_map_sg()
526 QEDF_ERR(&(qedf->dbg_ctx), "byte_count = %d != " in qedf_map_sg()
601 struct qedf_ctx *qedf = fcport->qedf; in qedf_init_task() local
602 uint16_t cq_idx = smp_processor_id() % qedf->num_queues; in qedf_init_task()
676 qedf->slow_sge_ios++; in qedf_init_task()
678 qedf->fast_sge_ios++; in qedf_init_task()
686 struct qedf_ctx *qedf = io_req->fcport->qedf; in qedf_init_mp_task() local
692 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_DISC, in qedf_init_mp_task()
696 qedf->control_requests++; in qedf_init_mp_task()
808 struct qedf_ctx *qedf = fcport->qedf; in qedf_trace_io() local
814 spin_lock_irqsave(&qedf->io_trace_lock, flags); in qedf_trace_io()
816 io_log = &qedf->io_trace_buf[qedf->io_trace_idx]; in qedf_trace_io()
845 qedf->io_trace_idx++; in qedf_trace_io()
846 if (qedf->io_trace_idx == QEDF_IO_TRACE_SIZE) in qedf_trace_io()
847 qedf->io_trace_idx = 0; in qedf_trace_io()
849 spin_unlock_irqrestore(&qedf->io_trace_lock, flags); in qedf_trace_io()
857 struct qedf_ctx *qedf = lport_priv(lport); in qedf_post_io_req() local
873 qedf->input_requests++; in qedf_post_io_req()
876 qedf->output_requests++; in qedf_post_io_req()
879 qedf->control_requests++; in qedf_post_io_req()
886 QEDF_ERR(&(qedf->dbg_ctx), "BD list creation failed.\n"); in qedf_post_io_req()
895 QEDF_ERR(&(qedf->dbg_ctx), "Session not offloaded yet.\n"); in qedf_post_io_req()
911 task_ctx = qedf_get_task_mem(&qedf->tasks, xid); in qedf_post_io_req()
913 QEDF_WARN(&(qedf->dbg_ctx), "task_ctx is NULL, xid=%d.\n", in qedf_post_io_req()
939 struct qedf_ctx *qedf = lport_priv(lport); in qedf_queuecommand() local
951 QEDF_ERR(&qedf->dbg_ctx, in qedf_queuecommand()
959 if (test_bit(QEDF_UNLOADING, &qedf->flags) || in qedf_queuecommand()
960 test_bit(QEDF_DBG_STOP_IO, &qedf->flags)) { in qedf_queuecommand()
961 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_queuecommand()
963 qedf->flags); in qedf_queuecommand()
969 if (!qedf->pdev->msix_enabled) { in qedf_queuecommand()
970 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_IO, in qedf_queuecommand()
980 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_queuecommand()
989 if (test_bit(QEDF_DRAIN_ACTIVE, &qedf->flags)) { in qedf_queuecommand()
990 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, "Drain active.\n"); in qedf_queuecommand()
996 atomic_read(&qedf->link_state) != QEDF_LINK_UP) { in qedf_queuecommand()
997 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, "Link down.\n"); in qedf_queuecommand()
1044 QEDF_WARN(&(qedf->dbg_ctx), "Unable to post io_req\n"); in qedf_queuecommand()
1060 struct qedf_ctx *qedf = io_req->fcport->qedf; in qedf_parse_fcp_rsp() local
1092 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_IO, in qedf_parse_fcp_rsp()
1099 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_IO, in qedf_parse_fcp_rsp()
1113 static void qedf_unmap_sg_list(struct qedf_ctx *qedf, struct qedf_ioreq *io_req) in qedf_unmap_sg_list() argument
1118 dma_unmap_sg(&qedf->pdev->dev, scsi_sglist(sc), in qedf_unmap_sg_list()
1124 void qedf_scsi_completion(struct qedf_ctx *qedf, struct fcoe_cqe *cqe, in qedf_scsi_completion() argument
1144 QEDF_ERR(&qedf->dbg_ctx, in qedf_scsi_completion()
1154 QEDF_WARN(&(qedf->dbg_ctx), "sc_cmd is NULL!\n"); in qedf_scsi_completion()
1159 QEDF_WARN(&(qedf->dbg_ctx), "SCp.ptr is NULL, returned in " in qedf_scsi_completion()
1165 QEDF_ERR(&qedf->dbg_ctx, in qedf_scsi_completion()
1171 QEDF_WARN(&(qedf->dbg_ctx), "sc_cmd->request is NULL, " in qedf_scsi_completion()
1177 QEDF_WARN(&(qedf->dbg_ctx), "request->q is NULL so request " in qedf_scsi_completion()
1191 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_scsi_completion()
1199 qedf_unmap_sg_list(qedf, io_req); in qedf_scsi_completion()
1203 QEDF_ERR(&(qedf->dbg_ctx), in qedf_scsi_completion()
1214 QEDF_ERR(&qedf->dbg_ctx, in qedf_scsi_completion()
1241 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_IO, in qedf_scsi_completion()
1245 qedf->lport->host->host_no, sc_cmd->device->id, in qedf_scsi_completion()
1271 qedf->task_set_fulls++; in qedf_scsi_completion()
1273 qedf->busy++; in qedf_scsi_completion()
1285 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_scsi_completion()
1290 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_scsi_completion()
1303 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_scsi_completion()
1310 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_IO, "fcp_status=%d.\n", in qedf_scsi_completion()
1332 void qedf_scsi_done(struct qedf_ctx *qedf, struct qedf_ioreq *io_req, in qedf_scsi_done() argument
1339 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, "io_req is NULL\n"); in qedf_scsi_done()
1344 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_scsi_done()
1359 QEDF_WARN(&(qedf->dbg_ctx), "sc_cmd is NULL!\n"); in qedf_scsi_done()
1364 QEDF_ERR(&qedf->dbg_ctx, "sc_cmd=%p is not valid.", sc_cmd); in qedf_scsi_done()
1369 QEDF_WARN(&(qedf->dbg_ctx), "SCp.ptr is NULL, returned in " in qedf_scsi_done()
1375 QEDF_ERR(&qedf->dbg_ctx, "Device for sc_cmd %p is NULL.\n", in qedf_scsi_done()
1381 QEDF_ERR(&qedf->dbg_ctx, in qedf_scsi_done()
1387 QEDF_ERR(&qedf->dbg_ctx, in qedf_scsi_done()
1394 QEDF_ERR(&qedf->dbg_ctx, in qedf_scsi_done()
1401 QEDF_ERR(&qedf->dbg_ctx, in qedf_scsi_done()
1407 qedf_unmap_sg_list(qedf, io_req); in qedf_scsi_done()
1411 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_IO, "%d:0:%d:%lld: Completing " in qedf_scsi_done()
1414 qedf->lport->host->host_no, sc_cmd->device->id, in qedf_scsi_done()
1448 void qedf_process_warning_compl(struct qedf_ctx *qedf, struct fcoe_cqe *cqe, in qedf_process_warning_compl() argument
1457 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_process_warning_compl()
1463 QEDF_ERR(&(io_req->fcport->qedf->dbg_ctx), "Warning CQE, " in qedf_process_warning_compl()
1465 QEDF_ERR(&(io_req->fcport->qedf->dbg_ctx), in qedf_process_warning_compl()
1469 QEDF_ERR(&(io_req->fcport->qedf->dbg_ctx), "tx_buff_off=%08x, " in qedf_process_warning_compl()
1490 QEDF_ERR(&(qedf->dbg_ctx), "REC timer expired.\n"); in qedf_process_warning_compl()
1514 QEDF_ERR(&(qedf->dbg_ctx), "Failed to queue ABTS.\n"); in qedf_process_warning_compl()
1518 void qedf_process_error_detect(struct qedf_ctx *qedf, struct fcoe_cqe *cqe, in qedf_process_error_detect() argument
1534 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_process_error_detect()
1539 QEDF_ERR(&(io_req->fcport->qedf->dbg_ctx), "Error detection CQE, " in qedf_process_error_detect()
1541 QEDF_ERR(&(io_req->fcport->qedf->dbg_ctx), in qedf_process_error_detect()
1545 QEDF_ERR(&(io_req->fcport->qedf->dbg_ctx), "tx_buff_off=%08x, " in qedf_process_error_detect()
1555 QEDF_ERR(&qedf->dbg_ctx, in qedf_process_error_detect()
1561 if (qedf->stop_io_on_error) { in qedf_process_error_detect()
1562 qedf_stop_all_io(qedf); in qedf_process_error_detect()
1569 QEDF_ERR(&(qedf->dbg_ctx), "Failed to queue ABTS.\n"); in qedf_process_error_detect()
1572 static void qedf_flush_els_req(struct qedf_ctx *qedf, in qedf_flush_els_req() argument
1575 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_IO, in qedf_flush_els_req()
1606 struct qedf_ctx *qedf; in qedf_flush_active_ios() local
1625 qedf = fcport->qedf; in qedf_flush_active_ios()
1627 if (!qedf) { in qedf_flush_active_ios()
1636 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_flush_active_ios()
1649 cmd_mgr = qedf->cmd_mgr; in qedf_flush_active_ios()
1651 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_flush_active_ios()
1655 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, "Locking flush mutex.\n"); in qedf_flush_active_ios()
1657 mutex_lock(&qedf->flush_mutex); in qedf_flush_active_ios()
1678 QEDF_ERR(&qedf->dbg_ctx, in qedf_flush_active_ios()
1698 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_flush_active_ios()
1708 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_flush_active_ios()
1724 QEDF_ERR(&(qedf->dbg_ctx), in qedf_flush_active_ios()
1731 qedf_flush_els_req(qedf, io_req); in qedf_flush_active_ios()
1744 QEDF_ERR(&(qedf->dbg_ctx), in qedf_flush_active_ios()
1752 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_flush_active_ios()
1756 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_flush_active_ios()
1763 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_flush_active_ios()
1782 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_flush_active_ios()
1802 QEDF_ERR(&(qedf->dbg_ctx), "Could not get kref for " in qedf_flush_active_ios()
1807 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_IO, in qedf_flush_active_ios()
1819 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_flush_active_ios()
1826 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_flush_active_ios()
1832 QEDF_ERR(&qedf->dbg_ctx, in qedf_flush_active_ios()
1844 QEDF_ERR(&qedf->dbg_ctx, in qedf_flush_active_ios()
1863 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, "Unlocking flush mutex.\n"); in qedf_flush_active_ios()
1864 mutex_unlock(&qedf->flush_mutex); in qedf_flush_active_ios()
1876 struct qedf_ctx *qedf; in qedf_initiate_abts() local
1891 qedf = fcport->qedf; in qedf_initiate_abts()
1895 QEDF_ERR(&qedf->dbg_ctx, "stale rport\n"); in qedf_initiate_abts()
1900 lport = qedf->lport; in qedf_initiate_abts()
1903 QEDF_ERR(&(qedf->dbg_ctx), "link is not ready\n"); in qedf_initiate_abts()
1908 if (atomic_read(&qedf->link_down_tmo_valid) > 0) { in qedf_initiate_abts()
1909 QEDF_ERR(&(qedf->dbg_ctx), "link_down_tmo active.\n"); in qedf_initiate_abts()
1916 QEDF_ERR(&(qedf->dbg_ctx), "No SQ entries available\n"); in qedf_initiate_abts()
1922 QEDF_ERR(&qedf->dbg_ctx, "fcport is uploading.\n"); in qedf_initiate_abts()
1930 QEDF_ERR(&qedf->dbg_ctx, in qedf_initiate_abts()
1940 qedf->control_requests++; in qedf_initiate_abts()
1941 qedf->packet_aborts++; in qedf_initiate_abts()
1949 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_SCSI_TM, in qedf_initiate_abts()
1953 qedf_cmd_timer_set(qedf, io_req, QEDF_ABORT_TIMEOUT); in qedf_initiate_abts()
1973 void qedf_process_abts_compl(struct qedf_ctx *qedf, struct fcoe_cqe *cqe, in qedf_process_abts_compl() argument
1980 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_SCSI_TM, "Entered with xid = " in qedf_process_abts_compl()
1990 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_process_abts_compl()
2002 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_process_abts_compl()
2009 QEDF_ERR(&qedf->dbg_ctx, in qedf_process_abts_compl()
2015 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_SCSI_TM, in qedf_process_abts_compl()
2020 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_SCSI_TM, in qedf_process_abts_compl()
2029 queue_delayed_work(qedf->dpc_wq, &io_req->rrq_work, in qedf_process_abts_compl()
2030 msecs_to_jiffies(qedf->lport->r_a_tov)); in qedf_process_abts_compl()
2035 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_SCSI_TM, in qedf_process_abts_compl()
2040 QEDF_ERR(&(qedf->dbg_ctx), "Unknown ABTS response\n"); in qedf_process_abts_compl()
2048 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_SCSI_TM, in qedf_process_abts_compl()
2052 qedf_scsi_done(qedf, io_req, DID_ERROR); in qedf_process_abts_compl()
2066 struct qedf_ctx *qedf = io_req->fcport->qedf; in qedf_init_mp_req() local
2070 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_MP_REQ, "Entered.\n"); in qedf_init_mp_req()
2081 mp_req->req_buf = dma_alloc_coherent(&qedf->pdev->dev, QEDF_PAGE_SIZE, in qedf_init_mp_req()
2084 QEDF_ERR(&(qedf->dbg_ctx), "Unable to alloc MP req buffer\n"); in qedf_init_mp_req()
2089 mp_req->resp_buf = dma_alloc_coherent(&qedf->pdev->dev, in qedf_init_mp_req()
2092 QEDF_ERR(&(qedf->dbg_ctx), "Unable to alloc TM resp " in qedf_init_mp_req()
2100 mp_req->mp_req_bd = dma_alloc_coherent(&qedf->pdev->dev, sz, in qedf_init_mp_req()
2103 QEDF_ERR(&(qedf->dbg_ctx), "Unable to alloc MP req bd\n"); in qedf_init_mp_req()
2108 mp_req->mp_resp_bd = dma_alloc_coherent(&qedf->pdev->dev, sz, in qedf_init_mp_req()
2111 QEDF_ERR(&(qedf->dbg_ctx), "Unable to alloc MP resp bd\n"); in qedf_init_mp_req()
2141 static void qedf_drain_request(struct qedf_ctx *qedf) in qedf_drain_request() argument
2143 if (test_bit(QEDF_DRAIN_ACTIVE, &qedf->flags)) { in qedf_drain_request()
2144 QEDF_ERR(&(qedf->dbg_ctx), "MCP drain already active.\n"); in qedf_drain_request()
2149 set_bit(QEDF_DRAIN_ACTIVE, &qedf->flags); in qedf_drain_request()
2152 qed_ops->common->drain(qedf->cdev); in qedf_drain_request()
2158 clear_bit(QEDF_DRAIN_ACTIVE, &qedf->flags); in qedf_drain_request()
2169 struct qedf_ctx *qedf; in qedf_initiate_cleanup() local
2189 qedf = fcport->qedf; in qedf_initiate_cleanup()
2190 if (!qedf) { in qedf_initiate_cleanup()
2201 QEDF_ERR(&(qedf->dbg_ctx), "io_req xid=0x%x already in " in qedf_initiate_cleanup()
2211 QEDF_ERR(&(qedf->dbg_ctx), "No SQ entries available\n"); in qedf_initiate_cleanup()
2218 QEDF_ERR(&qedf->dbg_ctx, in qedf_initiate_cleanup()
2227 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, in qedf_initiate_cleanup()
2256 QEDF_ERR(&(qedf->dbg_ctx), "Cleanup command timeout, " in qedf_initiate_cleanup()
2260 QEDF_ERR(&(qedf->dbg_ctx), "Issuing MCP drain request.\n"); in qedf_initiate_cleanup()
2261 qedf_drain_request(qedf); in qedf_initiate_cleanup()
2277 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_SCSI_TM, in qedf_initiate_cleanup()
2281 qedf_scsi_done(qedf, io_req, DID_ERROR); in qedf_initiate_cleanup()
2292 void qedf_process_cleanup_compl(struct qedf_ctx *qedf, struct fcoe_cqe *cqe, in qedf_process_cleanup_compl() argument
2295 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_IO, "Entered xid = 0x%x\n", in qedf_process_cleanup_compl()
2309 struct qedf_ctx *qedf = fcport->qedf; in qedf_execute_tmf() local
2310 struct fc_lport *lport = qedf->lport; in qedf_execute_tmf()
2320 QEDF_ERR(&qedf->dbg_ctx, "sc_cmd is NULL\n"); in qedf_execute_tmf()
2326 QEDF_ERR(&(qedf->dbg_ctx), "fcport not offloaded\n"); in qedf_execute_tmf()
2333 QEDF_ERR(&(qedf->dbg_ctx), "Failed TMF"); in qedf_execute_tmf()
2339 qedf->lun_resets++; in qedf_execute_tmf()
2341 qedf->target_resets++; in qedf_execute_tmf()
2362 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_SCSI_TM, "TMF io_req xid = " in qedf_execute_tmf()
2366 task = qedf_get_task_mem(&qedf->tasks, xid); in qedf_execute_tmf()
2387 QEDF_ERR(&(qedf->dbg_ctx), "wait for tm_cmpl timeout!\n"); in qedf_execute_tmf()
2403 QEDF_ERR(&qedf->dbg_ctx, in qedf_execute_tmf()
2418 QEDF_ERR(&(qedf->dbg_ctx), "task mgmt command failed...\n"); in qedf_execute_tmf()
2421 QEDF_ERR(&(qedf->dbg_ctx), "task mgmt command success...\n"); in qedf_execute_tmf()
2432 struct qedf_ctx *qedf; in qedf_initiate_tmf() local
2479 qedf = fcport->qedf; in qedf_initiate_tmf()
2481 if (!qedf) { in qedf_initiate_tmf()
2488 QEDF_ERR(&qedf->dbg_ctx, "Connection is getting uploaded.\n"); in qedf_initiate_tmf()
2493 if (test_bit(QEDF_UNLOADING, &qedf->flags) || in qedf_initiate_tmf()
2494 test_bit(QEDF_DBG_STOP_IO, &qedf->flags)) { in qedf_initiate_tmf()
2500 QEDF_ERR(&(qedf->dbg_ctx), "link is not ready\n"); in qedf_initiate_tmf()
2507 QEDF_ERR(&qedf->dbg_ctx, "fcport %p is uploading.\n", in qedf_initiate_tmf()
2510 QEDF_ERR(&qedf->dbg_ctx, in qedf_initiate_tmf()
2524 void qedf_process_tmf_compl(struct qedf_ctx *qedf, struct fcoe_cqe *cqe, in qedf_process_tmf_compl() argument
2538 void qedf_process_unsol_compl(struct qedf_ctx *qedf, uint16_t que_idx, in qedf_process_unsol_compl() argument
2552 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_UNSOL, in qedf_process_unsol_compl()
2558 qedf->bdq_prod_idx, pktlen); in qedf_process_unsol_compl()
2562 QEDF_ERR(&(qedf->dbg_ctx), "bdq_idx is out of range %d.\n", in qedf_process_unsol_compl()
2567 bdq_addr = qedf->bdq[bdq_idx].buf_addr; in qedf_process_unsol_compl()
2569 QEDF_ERR(&(qedf->dbg_ctx), "bdq_addr is NULL, dropping " in qedf_process_unsol_compl()
2575 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_UNSOL, in qedf_process_unsol_compl()
2583 fp = fc_frame_alloc(qedf->lport, payload_len); in qedf_process_unsol_compl()
2585 QEDF_ERR(&(qedf->dbg_ctx), "Could not allocate fp.\n"); in qedf_process_unsol_compl()
2593 QEDF_WARN(&qedf->dbg_ctx, in qedf_process_unsol_compl()
2601 fr_dev(fp) = qedf->lport; in qedf_process_unsol_compl()
2610 io_work = mempool_alloc(qedf->io_mempool, GFP_ATOMIC); in qedf_process_unsol_compl()
2612 QEDF_WARN(&(qedf->dbg_ctx), "Could not allocate " in qedf_process_unsol_compl()
2624 io_work->qedf = qedf; in qedf_process_unsol_compl()
2629 spin_lock_irqsave(&qedf->hba_lock, flags); in qedf_process_unsol_compl()
2632 qedf->bdq_prod_idx++; in qedf_process_unsol_compl()
2635 if (qedf->bdq_prod_idx == 0xffff) in qedf_process_unsol_compl()
2636 qedf->bdq_prod_idx = 0; in qedf_process_unsol_compl()
2638 writew(qedf->bdq_prod_idx, qedf->bdq_primary_prod); in qedf_process_unsol_compl()
2639 readw(qedf->bdq_primary_prod); in qedf_process_unsol_compl()
2640 writew(qedf->bdq_prod_idx, qedf->bdq_secondary_prod); in qedf_process_unsol_compl()
2641 readw(qedf->bdq_secondary_prod); in qedf_process_unsol_compl()
2643 spin_unlock_irqrestore(&qedf->hba_lock, flags); in qedf_process_unsol_compl()