Skip to content

Commit 92cab0d

Browse files
Christof SchmittJames Bottomley
authored andcommitted
[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 <[email protected]> Signed-off-by: Christof Schmitt <[email protected]> Signed-off-by: James Bottomley <[email protected]>
1 parent 52bfb55 commit 92cab0d

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

drivers/s390/scsi/zfcp_fsf.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -929,8 +929,8 @@ struct zfcp_fsf_req *zfcp_fsf_abort_fcp_command(unsigned long old_req_id,
929929
struct qdio_buffer_element *sbale;
930930
struct zfcp_fsf_req *req = NULL;
931931

932-
spin_lock(&adapter->req_q_lock);
933-
if (!zfcp_fsf_sbal_available(adapter))
932+
spin_lock_bh(&adapter->req_q_lock);
933+
if (zfcp_fsf_req_sbal_get(adapter))
934934
goto out;
935935
req = zfcp_fsf_req_create(adapter, FSF_QTCB_ABORT_FCP_CMND,
936936
req_flags, adapter->pool.fsf_req_abort);
@@ -961,7 +961,7 @@ struct zfcp_fsf_req *zfcp_fsf_abort_fcp_command(unsigned long old_req_id,
961961
zfcp_fsf_req_free(req);
962962
req = NULL;
963963
out:
964-
spin_unlock(&adapter->req_q_lock);
964+
spin_unlock_bh(&adapter->req_q_lock);
965965
return req;
966966
}
967967

@@ -1225,7 +1225,7 @@ int zfcp_fsf_exchange_config_data(struct zfcp_erp_action *erp_action)
12251225
int retval = -EIO;
12261226

12271227
spin_lock_bh(&adapter->req_q_lock);
1228-
if (!zfcp_fsf_sbal_available(adapter))
1228+
if (zfcp_fsf_req_sbal_get(adapter))
12291229
goto out;
12301230
req = zfcp_fsf_req_create(adapter,
12311231
FSF_QTCB_EXCHANGE_CONFIG_DATA,
@@ -1321,7 +1321,7 @@ int zfcp_fsf_exchange_port_data(struct zfcp_erp_action *erp_action)
13211321
return -EOPNOTSUPP;
13221322

13231323
spin_lock_bh(&adapter->req_q_lock);
1324-
if (!zfcp_fsf_sbal_available(adapter))
1324+
if (zfcp_fsf_req_sbal_get(adapter))
13251325
goto out;
13261326
req = zfcp_fsf_req_create(adapter, FSF_QTCB_EXCHANGE_PORT_DATA,
13271327
ZFCP_REQ_AUTO_CLEANUP,
@@ -1367,7 +1367,7 @@ int zfcp_fsf_exchange_port_data_sync(struct zfcp_adapter *adapter,
13671367
return -EOPNOTSUPP;
13681368

13691369
spin_lock_bh(&adapter->req_q_lock);
1370-
if (!zfcp_fsf_sbal_available(adapter))
1370+
if (zfcp_fsf_req_sbal_get(adapter))
13711371
goto out;
13721372

13731373
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,
24522452
ZFCP_STATUS_COMMON_UNBLOCKED)))
24532453
return NULL;
24542454

2455-
spin_lock(&adapter->req_q_lock);
2456-
if (!zfcp_fsf_sbal_available(adapter))
2455+
spin_lock_bh(&adapter->req_q_lock);
2456+
if (zfcp_fsf_req_sbal_get(adapter))
24572457
goto out;
24582458
req = zfcp_fsf_req_create(adapter, FSF_QTCB_FCP_CMND, req_flags,
24592459
adapter->pool.fsf_req_scsi);
@@ -2487,7 +2487,7 @@ struct zfcp_fsf_req *zfcp_fsf_send_fcp_ctm(struct zfcp_adapter *adapter,
24872487
zfcp_fsf_req_free(req);
24882488
req = NULL;
24892489
out:
2490-
spin_unlock(&adapter->req_q_lock);
2490+
spin_unlock_bh(&adapter->req_q_lock);
24912491
return req;
24922492
}
24932493

0 commit comments

Comments
 (0)