Lines Matching refs:qdio
700 static struct zfcp_fsf_req *zfcp_fsf_req_create(struct zfcp_qdio *qdio, in zfcp_fsf_req_create() argument
704 struct zfcp_adapter *adapter = qdio->adapter; in zfcp_fsf_req_create()
743 zfcp_qdio_req_init(adapter->qdio, &req->qdio_req, req->req_id, sbtype, in zfcp_fsf_req_create()
752 struct zfcp_qdio *qdio = adapter->qdio; in zfcp_fsf_req_send() local
758 req->qdio_req.qdio_outb_usage = atomic_read(&qdio->req_q_free); in zfcp_fsf_req_send()
760 if (zfcp_qdio_send(qdio, &req->qdio_req)) { in zfcp_fsf_req_send()
782 int zfcp_fsf_status_read(struct zfcp_qdio *qdio) in zfcp_fsf_status_read() argument
784 struct zfcp_adapter *adapter = qdio->adapter; in zfcp_fsf_status_read()
790 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_status_read()
791 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_status_read()
794 req = zfcp_fsf_req_create(qdio, FSF_QTCB_UNSOLICITED_STATUS, in zfcp_fsf_status_read()
811 zfcp_qdio_fill_next(qdio, &req->qdio_req, sr_buf, sizeof(*sr_buf)); in zfcp_fsf_status_read()
812 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_status_read()
827 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_status_read()
899 struct zfcp_qdio *qdio = zfcp_sdev->port->adapter->qdio; in zfcp_fsf_abort_fcp_cmnd() local
902 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_abort_fcp_cmnd()
903 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_abort_fcp_cmnd()
905 req = zfcp_fsf_req_create(qdio, FSF_QTCB_ABORT_FCP_CMND, in zfcp_fsf_abort_fcp_cmnd()
907 qdio->adapter->pool.scsi_abort); in zfcp_fsf_abort_fcp_cmnd()
917 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_abort_fcp_cmnd()
933 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_abort_fcp_cmnd()
984 static void zfcp_fsf_setup_ct_els_unchained(struct zfcp_qdio *qdio, in zfcp_fsf_setup_ct_els_unchained() argument
989 zfcp_qdio_fill_next(qdio, q_req, sg_virt(sg_req), sg_req->length); in zfcp_fsf_setup_ct_els_unchained()
990 zfcp_qdio_fill_next(qdio, q_req, sg_virt(sg_resp), sg_resp->length); in zfcp_fsf_setup_ct_els_unchained()
991 zfcp_qdio_set_sbale_last(qdio, q_req); in zfcp_fsf_setup_ct_els_unchained()
999 struct zfcp_qdio *qdio = adapter->qdio; in zfcp_fsf_setup_ct_els_sbals() local
1004 if (zfcp_qdio_sbals_from_sg(qdio, &req->qdio_req, sg_req)) in zfcp_fsf_setup_ct_els_sbals()
1008 if (zfcp_qdio_sbals_from_sg(qdio, &req->qdio_req, sg_resp)) in zfcp_fsf_setup_ct_els_sbals()
1013 zfcp_qdio_set_data_div(qdio, &req->qdio_req, sg_nents(sg_req)); in zfcp_fsf_setup_ct_els_sbals()
1014 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_setup_ct_els_sbals()
1015 zfcp_qdio_set_scount(qdio, &req->qdio_req); in zfcp_fsf_setup_ct_els_sbals()
1021 zfcp_fsf_setup_ct_els_unchained(qdio, &req->qdio_req, in zfcp_fsf_setup_ct_els_sbals()
1029 if (zfcp_qdio_sbals_from_sg(qdio, &req->qdio_req, sg_req)) in zfcp_fsf_setup_ct_els_sbals()
1034 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_setup_ct_els_sbals()
1035 zfcp_qdio_skip_to_last_sbale(qdio, &req->qdio_req); in zfcp_fsf_setup_ct_els_sbals()
1037 if (zfcp_qdio_sbals_from_sg(qdio, &req->qdio_req, sg_resp)) in zfcp_fsf_setup_ct_els_sbals()
1042 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_setup_ct_els_sbals()
1077 struct zfcp_qdio *qdio = wka_port->adapter->qdio; in zfcp_fsf_send_ct() local
1081 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_send_ct()
1082 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_send_ct()
1085 req = zfcp_fsf_req_create(qdio, FSF_QTCB_SEND_GENERIC, in zfcp_fsf_send_ct()
1114 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_send_ct()
1170 struct zfcp_qdio *qdio = adapter->qdio; in zfcp_fsf_send_els() local
1173 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_send_els()
1174 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_send_els()
1177 req = zfcp_fsf_req_create(qdio, FSF_QTCB_SEND_ELS, in zfcp_fsf_send_els()
1188 zfcp_qdio_sbal_limit(qdio, &req->qdio_req, 2); in zfcp_fsf_send_els()
1211 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_send_els()
1218 struct zfcp_qdio *qdio = erp_action->adapter->qdio; in zfcp_fsf_exchange_config_data() local
1221 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_exchange_config_data()
1222 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_exchange_config_data()
1225 req = zfcp_fsf_req_create(qdio, FSF_QTCB_EXCHANGE_CONFIG_DATA, in zfcp_fsf_exchange_config_data()
1227 qdio->adapter->pool.erp_req); in zfcp_fsf_exchange_config_data()
1235 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_exchange_config_data()
1251 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_exchange_config_data()
1255 int zfcp_fsf_exchange_config_data_sync(struct zfcp_qdio *qdio, in zfcp_fsf_exchange_config_data_sync() argument
1261 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_exchange_config_data_sync()
1262 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_exchange_config_data_sync()
1265 req = zfcp_fsf_req_create(qdio, FSF_QTCB_EXCHANGE_CONFIG_DATA, in zfcp_fsf_exchange_config_data_sync()
1273 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_exchange_config_data_sync()
1285 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_exchange_config_data_sync()
1293 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_exchange_config_data_sync()
1304 struct zfcp_qdio *qdio = erp_action->adapter->qdio; in zfcp_fsf_exchange_port_data() local
1308 if (!(qdio->adapter->adapter_features & FSF_FEATURE_HBAAPI_MANAGEMENT)) in zfcp_fsf_exchange_port_data()
1311 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_exchange_port_data()
1312 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_exchange_port_data()
1315 req = zfcp_fsf_req_create(qdio, FSF_QTCB_EXCHANGE_PORT_DATA, in zfcp_fsf_exchange_port_data()
1317 qdio->adapter->pool.erp_req); in zfcp_fsf_exchange_port_data()
1325 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_exchange_port_data()
1338 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_exchange_port_data()
1348 int zfcp_fsf_exchange_port_data_sync(struct zfcp_qdio *qdio, in zfcp_fsf_exchange_port_data_sync() argument
1354 if (!(qdio->adapter->adapter_features & FSF_FEATURE_HBAAPI_MANAGEMENT)) in zfcp_fsf_exchange_port_data_sync()
1357 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_exchange_port_data_sync()
1358 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_exchange_port_data_sync()
1361 req = zfcp_fsf_req_create(qdio, FSF_QTCB_EXCHANGE_PORT_DATA, in zfcp_fsf_exchange_port_data_sync()
1372 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_exchange_port_data_sync()
1377 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_exchange_port_data_sync()
1387 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_exchange_port_data_sync()
1465 struct zfcp_qdio *qdio = erp_action->adapter->qdio; in zfcp_fsf_open_port() local
1470 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_open_port()
1471 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_open_port()
1474 req = zfcp_fsf_req_create(qdio, FSF_QTCB_OPEN_PORT_WITH_DID, in zfcp_fsf_open_port()
1476 qdio->adapter->pool.erp_req); in zfcp_fsf_open_port()
1484 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_open_port()
1501 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_open_port()
1532 struct zfcp_qdio *qdio = erp_action->adapter->qdio; in zfcp_fsf_close_port() local
1536 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_close_port()
1537 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_close_port()
1540 req = zfcp_fsf_req_create(qdio, FSF_QTCB_CLOSE_PORT, in zfcp_fsf_close_port()
1542 qdio->adapter->pool.erp_req); in zfcp_fsf_close_port()
1550 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_close_port()
1565 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_close_port()
1605 struct zfcp_qdio *qdio = wka_port->adapter->qdio; in zfcp_fsf_open_wka_port() local
1610 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_open_wka_port()
1611 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_open_wka_port()
1614 req = zfcp_fsf_req_create(qdio, FSF_QTCB_OPEN_PORT_WITH_DID, in zfcp_fsf_open_wka_port()
1616 qdio->adapter->pool.erp_req); in zfcp_fsf_open_wka_port()
1624 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_open_wka_port()
1637 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_open_wka_port()
1663 struct zfcp_qdio *qdio = wka_port->adapter->qdio; in zfcp_fsf_close_wka_port() local
1668 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_close_wka_port()
1669 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_close_wka_port()
1672 req = zfcp_fsf_req_create(qdio, FSF_QTCB_CLOSE_PORT, in zfcp_fsf_close_wka_port()
1674 qdio->adapter->pool.erp_req); in zfcp_fsf_close_wka_port()
1682 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_close_wka_port()
1695 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_close_wka_port()
1757 struct zfcp_qdio *qdio = erp_action->adapter->qdio; in zfcp_fsf_close_physical_port() local
1761 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_close_physical_port()
1762 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_close_physical_port()
1765 req = zfcp_fsf_req_create(qdio, FSF_QTCB_CLOSE_PHYSICAL_PORT, in zfcp_fsf_close_physical_port()
1767 qdio->adapter->pool.erp_req); in zfcp_fsf_close_physical_port()
1775 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_close_physical_port()
1790 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_close_physical_port()
1876 struct zfcp_qdio *qdio = adapter->qdio; in zfcp_fsf_open_lun() local
1880 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_open_lun()
1881 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_open_lun()
1884 req = zfcp_fsf_req_create(qdio, FSF_QTCB_OPEN_LUN, in zfcp_fsf_open_lun()
1894 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_open_lun()
1913 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_open_lun()
1966 struct zfcp_qdio *qdio = erp_action->adapter->qdio; in zfcp_fsf_close_lun() local
1971 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_close_lun()
1972 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_close_lun()
1975 req = zfcp_fsf_req_create(qdio, FSF_QTCB_CLOSE_LUN, in zfcp_fsf_close_lun()
1977 qdio->adapter->pool.erp_req); in zfcp_fsf_close_lun()
1985 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_close_lun()
2001 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_close_lun()
2240 struct zfcp_qdio *qdio = adapter->qdio; in zfcp_fsf_fcp_cmnd() local
2248 spin_lock_irqsave(&qdio->req_q_lock, flags); in zfcp_fsf_fcp_cmnd()
2249 if (atomic_read(&qdio->req_q_free) <= 0) { in zfcp_fsf_fcp_cmnd()
2250 atomic_inc(&qdio->req_q_full); in zfcp_fsf_fcp_cmnd()
2257 req = zfcp_fsf_req_create(qdio, FSF_QTCB_FCP_CMND, in zfcp_fsf_fcp_cmnd()
2290 zfcp_qdio_set_data_div(qdio, &req->qdio_req, in zfcp_fsf_fcp_cmnd()
2292 retval = zfcp_qdio_sbals_from_sg(qdio, &req->qdio_req, in zfcp_fsf_fcp_cmnd()
2300 retval = zfcp_qdio_sbals_from_sg(qdio, &req->qdio_req, in zfcp_fsf_fcp_cmnd()
2305 zfcp_qdio_set_sbale_last(adapter->qdio, &req->qdio_req); in zfcp_fsf_fcp_cmnd()
2307 zfcp_qdio_set_scount(qdio, &req->qdio_req); in zfcp_fsf_fcp_cmnd()
2319 spin_unlock_irqrestore(&qdio->req_q_lock, flags); in zfcp_fsf_fcp_cmnd()
2352 struct zfcp_qdio *qdio = zfcp_sdev->port->adapter->qdio; in zfcp_fsf_fcp_task_mgmt() local
2358 spin_lock_irq(&qdio->req_q_lock); in zfcp_fsf_fcp_task_mgmt()
2359 if (zfcp_qdio_sbal_get(qdio)) in zfcp_fsf_fcp_task_mgmt()
2362 req = zfcp_fsf_req_create(qdio, FSF_QTCB_FCP_CMND, in zfcp_fsf_fcp_task_mgmt()
2364 qdio->adapter->pool.scsi_req); in zfcp_fsf_fcp_task_mgmt()
2380 zfcp_qdio_set_sbale_last(qdio, &req->qdio_req); in zfcp_fsf_fcp_task_mgmt()
2392 spin_unlock_irq(&qdio->req_q_lock); in zfcp_fsf_fcp_task_mgmt()
2401 void zfcp_fsf_reqid_check(struct zfcp_qdio *qdio, int sbal_idx) in zfcp_fsf_reqid_check() argument
2403 struct zfcp_adapter *adapter = qdio->adapter; in zfcp_fsf_reqid_check()
2404 struct qdio_buffer *sbal = qdio->res_q[sbal_idx]; in zfcp_fsf_reqid_check()