diff options
| author | Christof Schmitt <christof.schmitt@de.ibm.com> | 2009-03-02 07:08:59 -0500 |
|---|---|---|
| committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-03-12 13:58:19 -0400 |
| commit | 92cab0d93a1107ad7f6d827fde62d1aa4db15e86 (patch) | |
| tree | ad379f6e8c9b56c92b373a7953505b0d63c5e6cf | |
| parent | 52bfb558d2803590f86360ec3af1750897a9c010 (diff) | |
[SCSI] zfcp: Wait for free SBALs when possible
For calls from zfcp erp, scsi_eh and sysfs switch the calls issuing
FSF requests to zfcp_fsf_req_sbal_get to wait for free SBALs.
Acked-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
| -rw-r--r-- | drivers/s390/scsi/zfcp_fsf.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index 14d7413b9e86..1b25158c50f0 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c | |||
| @@ -929,8 +929,8 @@ struct zfcp_fsf_req *zfcp_fsf_abort_fcp_command(unsigned long old_req_id, | |||
| 929 | struct qdio_buffer_element *sbale; | 929 | struct qdio_buffer_element *sbale; |
| 930 | struct zfcp_fsf_req *req = NULL; | 930 | struct zfcp_fsf_req *req = NULL; |
| 931 | 931 | ||
| 932 | spin_lock(&adapter->req_q_lock); | 932 | spin_lock_bh(&adapter->req_q_lock); |
| 933 | if (!zfcp_fsf_sbal_available(adapter)) | 933 | if (zfcp_fsf_req_sbal_get(adapter)) |
| 934 | goto out; | 934 | goto out; |
| 935 | req = zfcp_fsf_req_create(adapter, FSF_QTCB_ABORT_FCP_CMND, | 935 | req = zfcp_fsf_req_create(adapter, FSF_QTCB_ABORT_FCP_CMND, |
| 936 | req_flags, adapter->pool.fsf_req_abort); | 936 | req_flags, adapter->pool.fsf_req_abort); |
| @@ -961,7 +961,7 @@ out_error_free: | |||
| 961 | zfcp_fsf_req_free(req); | 961 | zfcp_fsf_req_free(req); |
| 962 | req = NULL; | 962 | req = NULL; |
| 963 | out: | 963 | out: |
| 964 | spin_unlock(&adapter->req_q_lock); | 964 | spin_unlock_bh(&adapter->req_q_lock); |
| 965 | return req; | 965 | return req; |
| 966 | } | 966 | } |
| 967 | 967 | ||
| @@ -1225,7 +1225,7 @@ int zfcp_fsf_exchange_config_data(struct zfcp_erp_action *erp_action) | |||
| 1225 | int retval = -EIO; | 1225 | int retval = -EIO; |
| 1226 | 1226 | ||
| 1227 | spin_lock_bh(&adapter->req_q_lock); | 1227 | spin_lock_bh(&adapter->req_q_lock); |
| 1228 | if (!zfcp_fsf_sbal_available(adapter)) | 1228 | if (zfcp_fsf_req_sbal_get(adapter)) |
| 1229 | goto out; | 1229 | goto out; |
| 1230 | req = zfcp_fsf_req_create(adapter, | 1230 | req = zfcp_fsf_req_create(adapter, |
| 1231 | FSF_QTCB_EXCHANGE_CONFIG_DATA, | 1231 | FSF_QTCB_EXCHANGE_CONFIG_DATA, |
| @@ -1321,7 +1321,7 @@ int zfcp_fsf_exchange_port_data(struct zfcp_erp_action *erp_action) | |||
| 1321 | return -EOPNOTSUPP; | 1321 | return -EOPNOTSUPP; |
| 1322 | 1322 | ||
| 1323 | spin_lock_bh(&adapter->req_q_lock); | 1323 | spin_lock_bh(&adapter->req_q_lock); |
| 1324 | if (!zfcp_fsf_sbal_available(adapter)) | 1324 | if (zfcp_fsf_req_sbal_get(adapter)) |
| 1325 | goto out; | 1325 | goto out; |
| 1326 | req = zfcp_fsf_req_create(adapter, FSF_QTCB_EXCHANGE_PORT_DATA, | 1326 | req = zfcp_fsf_req_create(adapter, FSF_QTCB_EXCHANGE_PORT_DATA, |
| 1327 | ZFCP_REQ_AUTO_CLEANUP, | 1327 | ZFCP_REQ_AUTO_CLEANUP, |
| @@ -1367,7 +1367,7 @@ int zfcp_fsf_exchange_port_data_sync(struct zfcp_adapter *adapter, | |||
| 1367 | return -EOPNOTSUPP; | 1367 | return -EOPNOTSUPP; |
| 1368 | 1368 | ||
| 1369 | spin_lock_bh(&adapter->req_q_lock); | 1369 | spin_lock_bh(&adapter->req_q_lock); |
| 1370 | if (!zfcp_fsf_sbal_available(adapter)) | 1370 | if (zfcp_fsf_req_sbal_get(adapter)) |
| 1371 | goto out; | 1371 | goto out; |
| 1372 | 1372 | ||
| 1373 | req = zfcp_fsf_req_create(adapter, FSF_QTCB_EXCHANGE_PORT_DATA, 0, | 1373 | req = zfcp_fsf_req_create(adapter, FSF_QTCB_EXCHANGE_PORT_DATA, 0, |
| @@ -2452,8 +2452,8 @@ struct zfcp_fsf_req *zfcp_fsf_send_fcp_ctm(struct zfcp_adapter *adapter, | |||
| 2452 | ZFCP_STATUS_COMMON_UNBLOCKED))) | 2452 | ZFCP_STATUS_COMMON_UNBLOCKED))) |
| 2453 | return NULL; | 2453 | return NULL; |
| 2454 | 2454 | ||
| 2455 | spin_lock(&adapter->req_q_lock); | 2455 | spin_lock_bh(&adapter->req_q_lock); |
| 2456 | if (!zfcp_fsf_sbal_available(adapter)) | 2456 | if (zfcp_fsf_req_sbal_get(adapter)) |
| 2457 | goto out; | 2457 | goto out; |
| 2458 | req = zfcp_fsf_req_create(adapter, FSF_QTCB_FCP_CMND, req_flags, | 2458 | req = zfcp_fsf_req_create(adapter, FSF_QTCB_FCP_CMND, req_flags, |
| 2459 | adapter->pool.fsf_req_scsi); | 2459 | adapter->pool.fsf_req_scsi); |
| @@ -2487,7 +2487,7 @@ struct zfcp_fsf_req *zfcp_fsf_send_fcp_ctm(struct zfcp_adapter *adapter, | |||
| 2487 | zfcp_fsf_req_free(req); | 2487 | zfcp_fsf_req_free(req); |
| 2488 | req = NULL; | 2488 | req = NULL; |
| 2489 | out: | 2489 | out: |
| 2490 | spin_unlock(&adapter->req_q_lock); | 2490 | spin_unlock_bh(&adapter->req_q_lock); |
| 2491 | return req; | 2491 | return req; |
| 2492 | } | 2492 | } |
| 2493 | 2493 | ||
