[SCSI] zfcp: Adapter reopen for large number of unsolicited status
When zfcp receives 16 unsolicited status messages, this could trigger an adapter reopen. In this case, first try to send a new status read, and only if this fails, go through the recovery. Signed-off-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>
This commit is contained in:
parent
3968ce800f
commit
7afe29f7dd
|
@ -550,15 +550,14 @@ static void zfcp_dummy_release(struct device *dev)
|
||||||
int zfcp_status_read_refill(struct zfcp_adapter *adapter)
|
int zfcp_status_read_refill(struct zfcp_adapter *adapter)
|
||||||
{
|
{
|
||||||
while (atomic_read(&adapter->stat_miss) > 0)
|
while (atomic_read(&adapter->stat_miss) > 0)
|
||||||
if (zfcp_fsf_status_read(adapter, ZFCP_WAIT_FOR_SBAL))
|
if (zfcp_fsf_status_read(adapter, ZFCP_WAIT_FOR_SBAL)) {
|
||||||
break;
|
if (atomic_read(&adapter->stat_miss) >= 16) {
|
||||||
else
|
|
||||||
atomic_dec(&adapter->stat_miss);
|
|
||||||
|
|
||||||
if (ZFCP_STATUS_READS_RECOM <= atomic_read(&adapter->stat_miss)) {
|
|
||||||
zfcp_erp_adapter_reopen(adapter, 0, 103, NULL);
|
zfcp_erp_adapter_reopen(adapter, 0, 103, NULL);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
} else
|
||||||
|
atomic_dec(&adapter->stat_miss);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -108,7 +108,6 @@ zfcp_address_to_sg(void *address, struct scatterlist *list, unsigned int size)
|
||||||
#define ZFCP_QTCB_VERSION FSF_QTCB_CURRENT_VERSION
|
#define ZFCP_QTCB_VERSION FSF_QTCB_CURRENT_VERSION
|
||||||
/* ATTENTION: value must not be used by hardware */
|
/* ATTENTION: value must not be used by hardware */
|
||||||
#define FSF_QTCB_UNSOLICITED_STATUS 0x6305
|
#define FSF_QTCB_UNSOLICITED_STATUS 0x6305
|
||||||
#define ZFCP_STATUS_READS_RECOM FSF_STATUS_READS_RECOM
|
|
||||||
|
|
||||||
/* Do 1st retry in 1 second, then double the timeout for each following retry */
|
/* Do 1st retry in 1 second, then double the timeout for each following retry */
|
||||||
#define ZFCP_EXCHANGE_CONFIG_DATA_FIRST_SLEEP 1
|
#define ZFCP_EXCHANGE_CONFIG_DATA_FIRST_SLEEP 1
|
||||||
|
@ -743,7 +742,7 @@ struct zfcp_data {
|
||||||
#define ZFCP_POOL_FSF_REQ_ERP_NR 1
|
#define ZFCP_POOL_FSF_REQ_ERP_NR 1
|
||||||
#define ZFCP_POOL_FSF_REQ_SCSI_NR 1
|
#define ZFCP_POOL_FSF_REQ_SCSI_NR 1
|
||||||
#define ZFCP_POOL_FSF_REQ_ABORT_NR 1
|
#define ZFCP_POOL_FSF_REQ_ABORT_NR 1
|
||||||
#define ZFCP_POOL_STATUS_READ_NR ZFCP_STATUS_READS_RECOM
|
#define ZFCP_POOL_STATUS_READ_NR FSF_STATUS_READS_RECOM
|
||||||
#define ZFCP_POOL_DATA_GID_PN_NR 1
|
#define ZFCP_POOL_DATA_GID_PN_NR 1
|
||||||
|
|
||||||
/* struct used by memory pools for fsf_requests */
|
/* struct used by memory pools for fsf_requests */
|
||||||
|
|
Loading…
Reference in New Issue