diff options
Diffstat (limited to 'drivers/s390/scsi/zfcp_fsf.c')
-rw-r--r-- | drivers/s390/scsi/zfcp_fsf.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index cc69db3b71e7..9c3f91a343f3 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c | |||
@@ -647,14 +647,6 @@ static void zfcp_fsf_exchange_port_data_handler(struct zfcp_fsf_req *req) | |||
647 | } | 647 | } |
648 | } | 648 | } |
649 | 649 | ||
650 | static int zfcp_fsf_sbal_available(struct zfcp_adapter *adapter) | ||
651 | { | ||
652 | if (atomic_read(&adapter->req_q.count) > 0) | ||
653 | return 1; | ||
654 | atomic_inc(&adapter->qdio_outb_full); | ||
655 | return 0; | ||
656 | } | ||
657 | |||
658 | static int zfcp_fsf_req_sbal_get(struct zfcp_adapter *adapter) | 650 | static int zfcp_fsf_req_sbal_get(struct zfcp_adapter *adapter) |
659 | __releases(&adapter->req_q_lock) | 651 | __releases(&adapter->req_q_lock) |
660 | __acquires(&adapter->req_q_lock) | 652 | __acquires(&adapter->req_q_lock) |
@@ -1177,8 +1169,8 @@ int zfcp_fsf_send_els(struct zfcp_send_els *els) | |||
1177 | ZFCP_STATUS_COMMON_UNBLOCKED))) | 1169 | ZFCP_STATUS_COMMON_UNBLOCKED))) |
1178 | return -EBUSY; | 1170 | return -EBUSY; |
1179 | 1171 | ||
1180 | spin_lock(&adapter->req_q_lock); | 1172 | spin_lock_bh(&adapter->req_q_lock); |
1181 | if (!zfcp_fsf_sbal_available(adapter)) | 1173 | if (zfcp_fsf_req_sbal_get(adapter)) |
1182 | goto out; | 1174 | goto out; |
1183 | req = zfcp_fsf_req_create(adapter, FSF_QTCB_SEND_ELS, | 1175 | req = zfcp_fsf_req_create(adapter, FSF_QTCB_SEND_ELS, |
1184 | ZFCP_REQ_AUTO_CLEANUP, NULL); | 1176 | ZFCP_REQ_AUTO_CLEANUP, NULL); |
@@ -1211,7 +1203,7 @@ int zfcp_fsf_send_els(struct zfcp_send_els *els) | |||
1211 | failed_send: | 1203 | failed_send: |
1212 | zfcp_fsf_req_free(req); | 1204 | zfcp_fsf_req_free(req); |
1213 | out: | 1205 | out: |
1214 | spin_unlock(&adapter->req_q_lock); | 1206 | spin_unlock_bh(&adapter->req_q_lock); |
1215 | return ret; | 1207 | return ret; |
1216 | } | 1208 | } |
1217 | 1209 | ||
@@ -2324,8 +2316,10 @@ int zfcp_fsf_send_fcp_command_task(struct zfcp_unit *unit, | |||
2324 | return -EBUSY; | 2316 | return -EBUSY; |
2325 | 2317 | ||
2326 | spin_lock(&adapter->req_q_lock); | 2318 | spin_lock(&adapter->req_q_lock); |
2327 | if (!zfcp_fsf_sbal_available(adapter)) | 2319 | if (atomic_read(&adapter->req_q.count) <= 0) { |
2320 | atomic_inc(&adapter->qdio_outb_full); | ||
2328 | goto out; | 2321 | goto out; |
2322 | } | ||
2329 | req = zfcp_fsf_req_create(adapter, FSF_QTCB_FCP_CMND, | 2323 | req = zfcp_fsf_req_create(adapter, FSF_QTCB_FCP_CMND, |
2330 | ZFCP_REQ_AUTO_CLEANUP, | 2324 | ZFCP_REQ_AUTO_CLEANUP, |
2331 | adapter->pool.fsf_req_scsi); | 2325 | adapter->pool.fsf_req_scsi); |