提交 92cab0d9 编写于 作者: C Christof Schmitt 提交者: James Bottomley

[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: NSwen Schillig <swen@vnet.ibm.com>
Signed-off-by: NChristof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
上级 52bfb558
...@@ -929,8 +929,8 @@ struct zfcp_fsf_req *zfcp_fsf_abort_fcp_command(unsigned long old_req_id, ...@@ -929,8 +929,8 @@ struct zfcp_fsf_req *zfcp_fsf_abort_fcp_command(unsigned long old_req_id,
struct qdio_buffer_element *sbale; struct qdio_buffer_element *sbale;
struct zfcp_fsf_req *req = NULL; struct zfcp_fsf_req *req = NULL;
spin_lock(&adapter->req_q_lock); spin_lock_bh(&adapter->req_q_lock);
if (!zfcp_fsf_sbal_available(adapter)) if (zfcp_fsf_req_sbal_get(adapter))
goto out; goto out;
req = zfcp_fsf_req_create(adapter, FSF_QTCB_ABORT_FCP_CMND, req = zfcp_fsf_req_create(adapter, FSF_QTCB_ABORT_FCP_CMND,
req_flags, adapter->pool.fsf_req_abort); 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, ...@@ -961,7 +961,7 @@ struct zfcp_fsf_req *zfcp_fsf_abort_fcp_command(unsigned long old_req_id,
zfcp_fsf_req_free(req); zfcp_fsf_req_free(req);
req = NULL; req = NULL;
out: out:
spin_unlock(&adapter->req_q_lock); spin_unlock_bh(&adapter->req_q_lock);
return req; return req;
} }
...@@ -1225,7 +1225,7 @@ int zfcp_fsf_exchange_config_data(struct zfcp_erp_action *erp_action) ...@@ -1225,7 +1225,7 @@ int zfcp_fsf_exchange_config_data(struct zfcp_erp_action *erp_action)
int retval = -EIO; int retval = -EIO;
spin_lock_bh(&adapter->req_q_lock); spin_lock_bh(&adapter->req_q_lock);
if (!zfcp_fsf_sbal_available(adapter)) if (zfcp_fsf_req_sbal_get(adapter))
goto out; goto out;
req = zfcp_fsf_req_create(adapter, req = zfcp_fsf_req_create(adapter,
FSF_QTCB_EXCHANGE_CONFIG_DATA, FSF_QTCB_EXCHANGE_CONFIG_DATA,
...@@ -1321,7 +1321,7 @@ int zfcp_fsf_exchange_port_data(struct zfcp_erp_action *erp_action) ...@@ -1321,7 +1321,7 @@ int zfcp_fsf_exchange_port_data(struct zfcp_erp_action *erp_action)
return -EOPNOTSUPP; return -EOPNOTSUPP;
spin_lock_bh(&adapter->req_q_lock); spin_lock_bh(&adapter->req_q_lock);
if (!zfcp_fsf_sbal_available(adapter)) if (zfcp_fsf_req_sbal_get(adapter))
goto out; goto out;
req = zfcp_fsf_req_create(adapter, FSF_QTCB_EXCHANGE_PORT_DATA, req = zfcp_fsf_req_create(adapter, FSF_QTCB_EXCHANGE_PORT_DATA,
ZFCP_REQ_AUTO_CLEANUP, ZFCP_REQ_AUTO_CLEANUP,
...@@ -1367,7 +1367,7 @@ int zfcp_fsf_exchange_port_data_sync(struct zfcp_adapter *adapter, ...@@ -1367,7 +1367,7 @@ int zfcp_fsf_exchange_port_data_sync(struct zfcp_adapter *adapter,
return -EOPNOTSUPP; return -EOPNOTSUPP;
spin_lock_bh(&adapter->req_q_lock); spin_lock_bh(&adapter->req_q_lock);
if (!zfcp_fsf_sbal_available(adapter)) if (zfcp_fsf_req_sbal_get(adapter))
goto out; goto out;
req = zfcp_fsf_req_create(adapter, FSF_QTCB_EXCHANGE_PORT_DATA, 0, 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,8 +2452,8 @@ struct zfcp_fsf_req *zfcp_fsf_send_fcp_ctm(struct zfcp_adapter *adapter,
ZFCP_STATUS_COMMON_UNBLOCKED))) ZFCP_STATUS_COMMON_UNBLOCKED)))
return NULL; return NULL;
spin_lock(&adapter->req_q_lock); spin_lock_bh(&adapter->req_q_lock);
if (!zfcp_fsf_sbal_available(adapter)) if (zfcp_fsf_req_sbal_get(adapter))
goto out; goto out;
req = zfcp_fsf_req_create(adapter, FSF_QTCB_FCP_CMND, req_flags, req = zfcp_fsf_req_create(adapter, FSF_QTCB_FCP_CMND, req_flags,
adapter->pool.fsf_req_scsi); adapter->pool.fsf_req_scsi);
...@@ -2487,7 +2487,7 @@ struct zfcp_fsf_req *zfcp_fsf_send_fcp_ctm(struct zfcp_adapter *adapter, ...@@ -2487,7 +2487,7 @@ struct zfcp_fsf_req *zfcp_fsf_send_fcp_ctm(struct zfcp_adapter *adapter,
zfcp_fsf_req_free(req); zfcp_fsf_req_free(req);
req = NULL; req = NULL;
out: out:
spin_unlock(&adapter->req_q_lock); spin_unlock_bh(&adapter->req_q_lock);
return req; return req;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册