aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_aux.c
diff options
context:
space:
mode:
authorSwen Schillig <swen@vnet.ibm.com>2008-07-02 04:56:33 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-07-12 09:22:34 -0400
commit7afe29f7dd6dccbe454d7fd6cd6a5a7f7bcbc530 (patch)
treedaf51c1875d1080d1dedc9094159ad44cc557a10 /drivers/s390/scsi/zfcp_aux.c
parent3968ce800f45d8795ceb6f186c1efe420c98e1b0 (diff)
[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>
Diffstat (limited to 'drivers/s390/scsi/zfcp_aux.c')
-rw-r--r--drivers/s390/scsi/zfcp_aux.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c
index 2bd80fdcceff..bfcd1ba28ae1 100644
--- a/drivers/s390/scsi/zfcp_aux.c
+++ b/drivers/s390/scsi/zfcp_aux.c
@@ -550,15 +550,14 @@ static void zfcp_dummy_release(struct device *dev)
550int zfcp_status_read_refill(struct zfcp_adapter *adapter) 550int zfcp_status_read_refill(struct zfcp_adapter *adapter)
551{ 551{
552 while (atomic_read(&adapter->stat_miss) > 0) 552 while (atomic_read(&adapter->stat_miss) > 0)
553 if (zfcp_fsf_status_read(adapter, ZFCP_WAIT_FOR_SBAL)) 553 if (zfcp_fsf_status_read(adapter, ZFCP_WAIT_FOR_SBAL)) {
554 if (atomic_read(&adapter->stat_miss) >= 16) {
555 zfcp_erp_adapter_reopen(adapter, 0, 103, NULL);
556 return 1;
557 }
554 break; 558 break;
555 else 559 } else
556 atomic_dec(&adapter->stat_miss); 560 atomic_dec(&adapter->stat_miss);
557
558 if (ZFCP_STATUS_READS_RECOM <= atomic_read(&adapter->stat_miss)) {
559 zfcp_erp_adapter_reopen(adapter, 0, 103, NULL);
560 return 1;
561 }
562 return 0; 561 return 0;
563} 562}
564 563