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()
926 int zfcp_fsf_status_read(struct zfcp_qdio *qdio) in zfcp_fsf_status_read() argument
928 struct zfcp_adapter *adapter = qdio->adapter; in zfcp_fsf_status_read()
934 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_status_read()
935 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_status_read()
938 req = zfcp_fsf_req_create(qdio, FSF_QTCB_UNSOLICITED_STATUS, in zfcp_fsf_status_read()
955 zfcp_qdio_fill_next(qdio, &req->qdio_req, sr_buf, sizeof(*sr_buf)); in zfcp_fsf_status_read()
956 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_status_read()
972 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_status_read()
1044 struct zfcp_qdio *qdio = zfcp_sdev->port->adapter->qdio; in zfcp_fsf_abort_fcp_cmnd() local
1047 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_abort_fcp_cmnd()
1048 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_abort_fcp_cmnd()
1050 req = zfcp_fsf_req_create(qdio, FSF_QTCB_ABORT_FCP_CMND, in zfcp_fsf_abort_fcp_cmnd()
1052 qdio->adapter->pool.scsi_abort); in zfcp_fsf_abort_fcp_cmnd()
1062 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_abort_fcp_cmnd()
1080 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_abort_fcp_cmnd()
1131 static void zfcp_fsf_setup_ct_els_unchained(struct zfcp_qdio *qdio, in zfcp_fsf_setup_ct_els_unchained() argument
1136 zfcp_qdio_fill_next(qdio, q_req, sg_virt(sg_req), sg_req->length); in zfcp_fsf_setup_ct_els_unchained()
1137 zfcp_qdio_fill_next(qdio, q_req, sg_virt(sg_resp), sg_resp->length); in zfcp_fsf_setup_ct_els_unchained()
1138 zfcp_qdio_set_sbale_last(qdio, q_req); in zfcp_fsf_setup_ct_els_unchained()
1146 struct zfcp_qdio *qdio = adapter->qdio; in zfcp_fsf_setup_ct_els_sbals() local
1151 if (zfcp_qdio_sbals_from_sg(qdio, &req->qdio_req, sg_req)) in zfcp_fsf_setup_ct_els_sbals()
1155 if (zfcp_qdio_sbals_from_sg(qdio, &req->qdio_req, sg_resp)) in zfcp_fsf_setup_ct_els_sbals()
1160 zfcp_qdio_set_data_div(qdio, &req->qdio_req, sg_nents(sg_req)); in zfcp_fsf_setup_ct_els_sbals()
1161 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_setup_ct_els_sbals()
1162 zfcp_qdio_set_scount(qdio, &req->qdio_req); in zfcp_fsf_setup_ct_els_sbals()
1168 zfcp_fsf_setup_ct_els_unchained(qdio, &req->qdio_req, in zfcp_fsf_setup_ct_els_sbals()
1176 if (zfcp_qdio_sbals_from_sg(qdio, &req->qdio_req, sg_req)) in zfcp_fsf_setup_ct_els_sbals()
1181 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_setup_ct_els_sbals()
1182 zfcp_qdio_skip_to_last_sbale(qdio, &req->qdio_req); in zfcp_fsf_setup_ct_els_sbals()
1184 if (zfcp_qdio_sbals_from_sg(qdio, &req->qdio_req, sg_resp)) in zfcp_fsf_setup_ct_els_sbals()
1189 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_setup_ct_els_sbals()
1226 struct zfcp_qdio *qdio = wka_port->adapter->qdio; in zfcp_fsf_send_ct() local
1230 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_send_ct()
1231 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_send_ct()
1234 req = zfcp_fsf_req_create(qdio, FSF_QTCB_SEND_GENERIC, in zfcp_fsf_send_ct()
1264 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_send_ct()
1323 struct zfcp_qdio *qdio = adapter->qdio; in zfcp_fsf_send_els() local
1326 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_send_els()
1327 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_send_els()
1330 req = zfcp_fsf_req_create(qdio, FSF_QTCB_SEND_ELS, in zfcp_fsf_send_els()
1341 zfcp_qdio_sbal_limit(qdio, &req->qdio_req, 2); in zfcp_fsf_send_els()
1365 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_send_els()
1372 struct zfcp_qdio *qdio = erp_action->adapter->qdio; in zfcp_fsf_exchange_config_data() local
1375 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_exchange_config_data()
1376 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_exchange_config_data()
1379 req = zfcp_fsf_req_create(qdio, FSF_QTCB_EXCHANGE_CONFIG_DATA, in zfcp_fsf_exchange_config_data()
1381 qdio->adapter->pool.erp_req); in zfcp_fsf_exchange_config_data()
1389 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_exchange_config_data()
1408 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_exchange_config_data()
1425 int zfcp_fsf_exchange_config_data_sync(struct zfcp_qdio *qdio, in zfcp_fsf_exchange_config_data_sync() argument
1431 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_exchange_config_data_sync()
1432 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_exchange_config_data_sync()
1435 req = zfcp_fsf_req_create(qdio, FSF_QTCB_EXCHANGE_CONFIG_DATA, in zfcp_fsf_exchange_config_data_sync()
1443 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_exchange_config_data_sync()
1457 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_exchange_config_data_sync()
1474 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_exchange_config_data_sync()
1485 struct zfcp_qdio *qdio = erp_action->adapter->qdio; in zfcp_fsf_exchange_port_data() local
1489 if (!(qdio->adapter->adapter_features & FSF_FEATURE_HBAAPI_MANAGEMENT)) in zfcp_fsf_exchange_port_data()
1492 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_exchange_port_data()
1493 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_exchange_port_data()
1496 req = zfcp_fsf_req_create(qdio, FSF_QTCB_EXCHANGE_PORT_DATA, in zfcp_fsf_exchange_port_data()
1498 qdio->adapter->pool.erp_req); in zfcp_fsf_exchange_port_data()
1506 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_exchange_port_data()
1520 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_exchange_port_data()
1537 int zfcp_fsf_exchange_port_data_sync(struct zfcp_qdio *qdio, in zfcp_fsf_exchange_port_data_sync() argument
1543 if (!(qdio->adapter->adapter_features & FSF_FEATURE_HBAAPI_MANAGEMENT)) in zfcp_fsf_exchange_port_data_sync()
1546 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_exchange_port_data_sync()
1547 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_exchange_port_data_sync()
1550 req = zfcp_fsf_req_create(qdio, FSF_QTCB_EXCHANGE_PORT_DATA, in zfcp_fsf_exchange_port_data_sync()
1561 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_exchange_port_data_sync()
1566 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_exchange_port_data_sync()
1583 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_exchange_port_data_sync()
1778 struct zfcp_qdio *qdio = erp_action->adapter->qdio; in zfcp_fsf_open_port() local
1783 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_open_port()
1784 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_open_port()
1787 req = zfcp_fsf_req_create(qdio, FSF_QTCB_OPEN_PORT_WITH_DID, in zfcp_fsf_open_port()
1789 qdio->adapter->pool.erp_req); in zfcp_fsf_open_port()
1797 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_open_port()
1815 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_open_port()
1846 struct zfcp_qdio *qdio = erp_action->adapter->qdio; in zfcp_fsf_close_port() local
1850 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_close_port()
1851 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_close_port()
1854 req = zfcp_fsf_req_create(qdio, FSF_QTCB_CLOSE_PORT, in zfcp_fsf_close_port()
1856 qdio->adapter->pool.erp_req); in zfcp_fsf_close_port()
1864 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_close_port()
1880 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_close_port()
1920 struct zfcp_qdio *qdio = wka_port->adapter->qdio; in zfcp_fsf_open_wka_port() local
1925 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_open_wka_port()
1926 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_open_wka_port()
1929 req = zfcp_fsf_req_create(qdio, FSF_QTCB_OPEN_PORT_WITH_DID, in zfcp_fsf_open_wka_port()
1931 qdio->adapter->pool.erp_req); in zfcp_fsf_open_wka_port()
1939 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_open_wka_port()
1953 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_open_wka_port()
1979 struct zfcp_qdio *qdio = wka_port->adapter->qdio; in zfcp_fsf_close_wka_port() local
1984 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_close_wka_port()
1985 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_close_wka_port()
1988 req = zfcp_fsf_req_create(qdio, FSF_QTCB_CLOSE_PORT, in zfcp_fsf_close_wka_port()
1990 qdio->adapter->pool.erp_req); in zfcp_fsf_close_wka_port()
1998 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_close_wka_port()
2012 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_close_wka_port()
2073 struct zfcp_qdio *qdio = erp_action->adapter->qdio; in zfcp_fsf_close_physical_port() local
2077 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_close_physical_port()
2078 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_close_physical_port()
2081 req = zfcp_fsf_req_create(qdio, FSF_QTCB_CLOSE_PHYSICAL_PORT, in zfcp_fsf_close_physical_port()
2083 qdio->adapter->pool.erp_req); in zfcp_fsf_close_physical_port()
2091 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_close_physical_port()
2107 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_close_physical_port()
2193 struct zfcp_qdio *qdio = adapter->qdio; in zfcp_fsf_open_lun() local
2197 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_open_lun()
2198 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_open_lun()
2201 req = zfcp_fsf_req_create(qdio, FSF_QTCB_OPEN_LUN, in zfcp_fsf_open_lun()
2211 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_open_lun()
2231 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_open_lun()
2284 struct zfcp_qdio *qdio = erp_action->adapter->qdio; in zfcp_fsf_close_lun() local
2289 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_close_lun()
2290 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_close_lun()
2293 req = zfcp_fsf_req_create(qdio, FSF_QTCB_CLOSE_LUN, in zfcp_fsf_close_lun()
2295 qdio->adapter->pool.erp_req); in zfcp_fsf_close_lun()
2303 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_close_lun()
2320 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_close_lun()
2565 struct zfcp_qdio *qdio = adapter->qdio; in zfcp_fsf_fcp_cmnd() local
2573 spin_lock_irqsave(&qdio->req_q_lock, flags); in zfcp_fsf_fcp_cmnd()
2574 if (atomic_read(&qdio->req_q_free) <= 0) { in zfcp_fsf_fcp_cmnd()
2575 atomic_inc(&qdio->req_q_full); in zfcp_fsf_fcp_cmnd()
2582 req = zfcp_fsf_req_create(qdio, FSF_QTCB_FCP_CMND, in zfcp_fsf_fcp_cmnd()
2615 zfcp_qdio_set_data_div(qdio, &req->qdio_req, in zfcp_fsf_fcp_cmnd()
2617 retval = zfcp_qdio_sbals_from_sg(qdio, &req->qdio_req, in zfcp_fsf_fcp_cmnd()
2625 retval = zfcp_qdio_sbals_from_sg(qdio, &req->qdio_req, in zfcp_fsf_fcp_cmnd()
2630 zfcp_qdio_set_sbale_last(adapter->qdio, &req->qdio_req); in zfcp_fsf_fcp_cmnd()
2632 zfcp_qdio_set_scount(qdio, &req->qdio_req); in zfcp_fsf_fcp_cmnd()
2645 spin_unlock_irqrestore(&qdio->req_q_lock, flags); in zfcp_fsf_fcp_cmnd()
2678 struct zfcp_qdio *qdio = zfcp_sdev->port->adapter->qdio; in zfcp_fsf_fcp_task_mgmt() local
2684 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_fcp_task_mgmt()
2685 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_fcp_task_mgmt()
2688 req = zfcp_fsf_req_create(qdio, FSF_QTCB_FCP_CMND, in zfcp_fsf_fcp_task_mgmt()
2690 qdio->adapter->pool.scsi_req); in zfcp_fsf_fcp_task_mgmt()
2706 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_fcp_task_mgmt()
2720 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_fcp_task_mgmt()
2729 void zfcp_fsf_reqid_check(struct zfcp_qdio *qdio, int sbal_idx) in zfcp_fsf_reqid_check() argument
2731 struct zfcp_adapter *adapter = qdio->adapter; in zfcp_fsf_reqid_check()
2732 struct qdio_buffer *sbal = qdio->res_q[sbal_idx]; in zfcp_fsf_reqid_check()