Lines Matching refs:qdio
836 static struct zfcp_fsf_req *zfcp_fsf_req_create(struct zfcp_qdio *qdio, in zfcp_fsf_req_create() argument
840 struct zfcp_adapter *adapter = qdio->adapter; in zfcp_fsf_req_create()
876 zfcp_qdio_req_init(adapter->qdio, &req->qdio_req, req->req_id, sbtype, in zfcp_fsf_req_create()
886 struct zfcp_qdio *qdio = adapter->qdio; in zfcp_fsf_req_send() local
891 req->qdio_req.qdio_outb_usage = atomic_read(&qdio->req_q_free); in zfcp_fsf_req_send()
893 if (zfcp_qdio_send(qdio, &req->qdio_req)) { in zfcp_fsf_req_send()
929 int zfcp_fsf_status_read(struct zfcp_qdio *qdio) in zfcp_fsf_status_read() argument
931 struct zfcp_adapter *adapter = qdio->adapter; in zfcp_fsf_status_read()
937 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_status_read()
938 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_status_read()
941 req = zfcp_fsf_req_create(qdio, FSF_QTCB_UNSOLICITED_STATUS, in zfcp_fsf_status_read()
958 zfcp_qdio_fill_next(qdio, &req->qdio_req, sr_buf, sizeof(*sr_buf)); in zfcp_fsf_status_read()
959 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_status_read()
975 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_status_read()
1047 struct zfcp_qdio *qdio = zfcp_sdev->port->adapter->qdio; in zfcp_fsf_abort_fcp_cmnd() local
1050 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_abort_fcp_cmnd()
1051 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_abort_fcp_cmnd()
1053 req = zfcp_fsf_req_create(qdio, FSF_QTCB_ABORT_FCP_CMND, in zfcp_fsf_abort_fcp_cmnd()
1055 qdio->adapter->pool.scsi_abort); in zfcp_fsf_abort_fcp_cmnd()
1065 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_abort_fcp_cmnd()
1083 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_abort_fcp_cmnd()
1134 static void zfcp_fsf_setup_ct_els_unchained(struct zfcp_qdio *qdio, in zfcp_fsf_setup_ct_els_unchained() argument
1139 zfcp_qdio_fill_next(qdio, q_req, sg_virt(sg_req), sg_req->length); in zfcp_fsf_setup_ct_els_unchained()
1140 zfcp_qdio_fill_next(qdio, q_req, sg_virt(sg_resp), sg_resp->length); in zfcp_fsf_setup_ct_els_unchained()
1141 zfcp_qdio_set_sbale_last(qdio, q_req); in zfcp_fsf_setup_ct_els_unchained()
1149 struct zfcp_qdio *qdio = adapter->qdio; in zfcp_fsf_setup_ct_els_sbals() local
1154 if (zfcp_qdio_sbals_from_sg(qdio, &req->qdio_req, sg_req)) in zfcp_fsf_setup_ct_els_sbals()
1158 if (zfcp_qdio_sbals_from_sg(qdio, &req->qdio_req, sg_resp)) in zfcp_fsf_setup_ct_els_sbals()
1163 zfcp_qdio_set_data_div(qdio, &req->qdio_req, sg_nents(sg_req)); in zfcp_fsf_setup_ct_els_sbals()
1164 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_setup_ct_els_sbals()
1165 zfcp_qdio_set_scount(qdio, &req->qdio_req); in zfcp_fsf_setup_ct_els_sbals()
1171 zfcp_fsf_setup_ct_els_unchained(qdio, &req->qdio_req, in zfcp_fsf_setup_ct_els_sbals()
1179 if (zfcp_qdio_sbals_from_sg(qdio, &req->qdio_req, sg_req)) in zfcp_fsf_setup_ct_els_sbals()
1184 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_setup_ct_els_sbals()
1185 zfcp_qdio_skip_to_last_sbale(qdio, &req->qdio_req); in zfcp_fsf_setup_ct_els_sbals()
1187 if (zfcp_qdio_sbals_from_sg(qdio, &req->qdio_req, sg_resp)) in zfcp_fsf_setup_ct_els_sbals()
1192 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_setup_ct_els_sbals()
1229 struct zfcp_qdio *qdio = wka_port->adapter->qdio; in zfcp_fsf_send_ct() local
1233 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_send_ct()
1234 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_send_ct()
1237 req = zfcp_fsf_req_create(qdio, FSF_QTCB_SEND_GENERIC, in zfcp_fsf_send_ct()
1267 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_send_ct()
1326 struct zfcp_qdio *qdio = adapter->qdio; in zfcp_fsf_send_els() local
1329 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_send_els()
1330 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_send_els()
1333 req = zfcp_fsf_req_create(qdio, FSF_QTCB_SEND_ELS, in zfcp_fsf_send_els()
1344 zfcp_qdio_sbal_limit(qdio, &req->qdio_req, 2); in zfcp_fsf_send_els()
1368 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_send_els()
1375 struct zfcp_qdio *qdio = erp_action->adapter->qdio; in zfcp_fsf_exchange_config_data() local
1378 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_exchange_config_data()
1379 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_exchange_config_data()
1382 req = zfcp_fsf_req_create(qdio, FSF_QTCB_EXCHANGE_CONFIG_DATA, in zfcp_fsf_exchange_config_data()
1384 qdio->adapter->pool.erp_req); in zfcp_fsf_exchange_config_data()
1392 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_exchange_config_data()
1411 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_exchange_config_data()
1428 int zfcp_fsf_exchange_config_data_sync(struct zfcp_qdio *qdio, in zfcp_fsf_exchange_config_data_sync() argument
1434 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_exchange_config_data_sync()
1435 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_exchange_config_data_sync()
1438 req = zfcp_fsf_req_create(qdio, FSF_QTCB_EXCHANGE_CONFIG_DATA, in zfcp_fsf_exchange_config_data_sync()
1446 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_exchange_config_data_sync()
1460 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_exchange_config_data_sync()
1477 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_exchange_config_data_sync()
1488 struct zfcp_qdio *qdio = erp_action->adapter->qdio; in zfcp_fsf_exchange_port_data() local
1492 if (!(qdio->adapter->adapter_features & FSF_FEATURE_HBAAPI_MANAGEMENT)) in zfcp_fsf_exchange_port_data()
1495 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_exchange_port_data()
1496 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_exchange_port_data()
1499 req = zfcp_fsf_req_create(qdio, FSF_QTCB_EXCHANGE_PORT_DATA, in zfcp_fsf_exchange_port_data()
1501 qdio->adapter->pool.erp_req); in zfcp_fsf_exchange_port_data()
1509 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_exchange_port_data()
1523 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_exchange_port_data()
1540 int zfcp_fsf_exchange_port_data_sync(struct zfcp_qdio *qdio, in zfcp_fsf_exchange_port_data_sync() argument
1546 if (!(qdio->adapter->adapter_features & FSF_FEATURE_HBAAPI_MANAGEMENT)) in zfcp_fsf_exchange_port_data_sync()
1549 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_exchange_port_data_sync()
1550 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_exchange_port_data_sync()
1553 req = zfcp_fsf_req_create(qdio, FSF_QTCB_EXCHANGE_PORT_DATA, in zfcp_fsf_exchange_port_data_sync()
1564 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_exchange_port_data_sync()
1569 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_exchange_port_data_sync()
1586 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_exchange_port_data_sync()
1781 struct zfcp_qdio *qdio = erp_action->adapter->qdio; in zfcp_fsf_open_port() local
1786 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_open_port()
1787 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_open_port()
1790 req = zfcp_fsf_req_create(qdio, FSF_QTCB_OPEN_PORT_WITH_DID, in zfcp_fsf_open_port()
1792 qdio->adapter->pool.erp_req); in zfcp_fsf_open_port()
1800 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_open_port()
1818 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_open_port()
1849 struct zfcp_qdio *qdio = erp_action->adapter->qdio; in zfcp_fsf_close_port() local
1853 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_close_port()
1854 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_close_port()
1857 req = zfcp_fsf_req_create(qdio, FSF_QTCB_CLOSE_PORT, in zfcp_fsf_close_port()
1859 qdio->adapter->pool.erp_req); in zfcp_fsf_close_port()
1867 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_close_port()
1883 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_close_port()
1923 struct zfcp_qdio *qdio = wka_port->adapter->qdio; in zfcp_fsf_open_wka_port() local
1928 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_open_wka_port()
1929 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_open_wka_port()
1932 req = zfcp_fsf_req_create(qdio, FSF_QTCB_OPEN_PORT_WITH_DID, in zfcp_fsf_open_wka_port()
1934 qdio->adapter->pool.erp_req); in zfcp_fsf_open_wka_port()
1942 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_open_wka_port()
1956 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_open_wka_port()
1982 struct zfcp_qdio *qdio = wka_port->adapter->qdio; in zfcp_fsf_close_wka_port() local
1987 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_close_wka_port()
1988 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_close_wka_port()
1991 req = zfcp_fsf_req_create(qdio, FSF_QTCB_CLOSE_PORT, in zfcp_fsf_close_wka_port()
1993 qdio->adapter->pool.erp_req); in zfcp_fsf_close_wka_port()
2001 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_close_wka_port()
2015 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_close_wka_port()
2076 struct zfcp_qdio *qdio = erp_action->adapter->qdio; in zfcp_fsf_close_physical_port() local
2080 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_close_physical_port()
2081 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_close_physical_port()
2084 req = zfcp_fsf_req_create(qdio, FSF_QTCB_CLOSE_PHYSICAL_PORT, in zfcp_fsf_close_physical_port()
2086 qdio->adapter->pool.erp_req); in zfcp_fsf_close_physical_port()
2094 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_close_physical_port()
2110 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_close_physical_port()
2196 struct zfcp_qdio *qdio = adapter->qdio; in zfcp_fsf_open_lun() local
2200 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_open_lun()
2201 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_open_lun()
2204 req = zfcp_fsf_req_create(qdio, FSF_QTCB_OPEN_LUN, in zfcp_fsf_open_lun()
2214 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_open_lun()
2234 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_open_lun()
2287 struct zfcp_qdio *qdio = erp_action->adapter->qdio; in zfcp_fsf_close_lun() local
2292 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_close_lun()
2293 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_close_lun()
2296 req = zfcp_fsf_req_create(qdio, FSF_QTCB_CLOSE_LUN, in zfcp_fsf_close_lun()
2298 qdio->adapter->pool.erp_req); in zfcp_fsf_close_lun()
2306 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_close_lun()
2323 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_close_lun()
2568 struct zfcp_qdio *qdio = adapter->qdio; in zfcp_fsf_fcp_cmnd() local
2576 spin_lock_irqsave(&qdio->req_q_lock, flags); in zfcp_fsf_fcp_cmnd()
2577 if (atomic_read(&qdio->req_q_free) <= 0) { in zfcp_fsf_fcp_cmnd()
2578 atomic_inc(&qdio->req_q_full); in zfcp_fsf_fcp_cmnd()
2585 req = zfcp_fsf_req_create(qdio, FSF_QTCB_FCP_CMND, in zfcp_fsf_fcp_cmnd()
2619 zfcp_qdio_set_data_div(qdio, &req->qdio_req, in zfcp_fsf_fcp_cmnd()
2621 retval = zfcp_qdio_sbals_from_sg(qdio, &req->qdio_req, in zfcp_fsf_fcp_cmnd()
2629 retval = zfcp_qdio_sbals_from_sg(qdio, &req->qdio_req, in zfcp_fsf_fcp_cmnd()
2634 zfcp_qdio_set_sbale_last(adapter->qdio, &req->qdio_req); in zfcp_fsf_fcp_cmnd()
2636 zfcp_qdio_set_scount(qdio, &req->qdio_req); in zfcp_fsf_fcp_cmnd()
2649 spin_unlock_irqrestore(&qdio->req_q_lock, flags); in zfcp_fsf_fcp_cmnd()
2682 struct zfcp_qdio *qdio = zfcp_sdev->port->adapter->qdio; in zfcp_fsf_fcp_task_mgmt() local
2688 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_fcp_task_mgmt()
2689 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_fcp_task_mgmt()
2692 req = zfcp_fsf_req_create(qdio, FSF_QTCB_FCP_CMND, in zfcp_fsf_fcp_task_mgmt()
2694 qdio->adapter->pool.scsi_req); in zfcp_fsf_fcp_task_mgmt()
2710 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_fcp_task_mgmt()
2724 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_fcp_task_mgmt()
2733 void zfcp_fsf_reqid_check(struct zfcp_qdio *qdio, int sbal_idx) in zfcp_fsf_reqid_check() argument
2735 struct zfcp_adapter *adapter = qdio->adapter; in zfcp_fsf_reqid_check()
2736 struct qdio_buffer *sbal = qdio->res_q[sbal_idx]; in zfcp_fsf_reqid_check()