aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorAndreas Herrmann <aherrman@de.ibm.com>2005-06-13 07:15:15 -0400
committerJames Bottomley <jejb@mulgrave.(none)>2005-06-13 22:26:41 -0400
commit22753fa514aad02342e647ad13048caa282d9238 (patch)
treec21c84da406344fd055e226a2fb066bb19a3e673 /drivers/s390
parent66c8684abf80a9999392d639627afea80ac62e06 (diff)
[SCSI] zfcp: fix: allow more time for adapter initialization
From: Maxim Shchetynin <maxim@de.ibm.com> Extend the time for adapter initialization: In case of protocol status HOST_CONNECTION_INITIALIZING for the exchange config data command do a first retry in 1 second, then double the sleep time for each following retry until recovery exceeds 2 minutes. The old behaviour of allowing 6 retries with .5 seconds delay between retries was insufficient and qdio queues were shut down too erarly. Signed-off-by: Andreas Herrmann <aherrman@de.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/scsi/zfcp_def.h6
-rw-r--r--drivers/s390/scsi/zfcp_erp.c25
2 files changed, 17 insertions, 14 deletions
diff --git a/drivers/s390/scsi/zfcp_def.h b/drivers/s390/scsi/zfcp_def.h
index ead324019ff2..08369b9dad68 100644
--- a/drivers/s390/scsi/zfcp_def.h
+++ b/drivers/s390/scsi/zfcp_def.h
@@ -149,8 +149,10 @@ typedef u32 scsi_lun_t;
149#define FSF_QTCB_UNSOLICITED_STATUS 0x6305 149#define FSF_QTCB_UNSOLICITED_STATUS 0x6305
150#define ZFCP_STATUS_READ_FAILED_THRESHOLD 3 150#define ZFCP_STATUS_READ_FAILED_THRESHOLD 3
151#define ZFCP_STATUS_READS_RECOM FSF_STATUS_READS_RECOM 151#define ZFCP_STATUS_READS_RECOM FSF_STATUS_READS_RECOM
152#define ZFCP_EXCHANGE_CONFIG_DATA_RETRIES 6 152
153#define ZFCP_EXCHANGE_CONFIG_DATA_SLEEP 50 153/* Do 1st retry in 1 second, then double the timeout for each following retry */
154#define ZFCP_EXCHANGE_CONFIG_DATA_FIRST_SLEEP 100
155#define ZFCP_EXCHANGE_CONFIG_DATA_RETRIES 7
154 156
155/* timeout value for "default timer" for fsf requests */ 157/* timeout value for "default timer" for fsf requests */
156#define ZFCP_FSF_REQUEST_TIMEOUT (60*HZ); 158#define ZFCP_FSF_REQUEST_TIMEOUT (60*HZ);
diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c
index 53ebc1cdfe2d..60ba1ba112d6 100644
--- a/drivers/s390/scsi/zfcp_erp.c
+++ b/drivers/s390/scsi/zfcp_erp.c
@@ -2286,12 +2286,12 @@ zfcp_erp_adapter_strategy_open_fsf_xconfig(struct zfcp_erp_action *erp_action)
2286{ 2286{
2287 int retval = ZFCP_ERP_SUCCEEDED; 2287 int retval = ZFCP_ERP_SUCCEEDED;
2288 int retries; 2288 int retries;
2289 int sleep = ZFCP_EXCHANGE_CONFIG_DATA_FIRST_SLEEP;
2289 struct zfcp_adapter *adapter = erp_action->adapter; 2290 struct zfcp_adapter *adapter = erp_action->adapter;
2290 2291
2291 atomic_clear_mask(ZFCP_STATUS_ADAPTER_XCONFIG_OK, &adapter->status); 2292 atomic_clear_mask(ZFCP_STATUS_ADAPTER_XCONFIG_OK, &adapter->status);
2292 retries = ZFCP_EXCHANGE_CONFIG_DATA_RETRIES;
2293 2293
2294 do { 2294 for (retries = ZFCP_EXCHANGE_CONFIG_DATA_RETRIES; retries; retries--) {
2295 atomic_clear_mask(ZFCP_STATUS_ADAPTER_HOST_CON_INIT, 2295 atomic_clear_mask(ZFCP_STATUS_ADAPTER_HOST_CON_INIT,
2296 &adapter->status); 2296 &adapter->status);
2297 ZFCP_LOG_DEBUG("Doing exchange config data\n"); 2297 ZFCP_LOG_DEBUG("Doing exchange config data\n");
@@ -2329,16 +2329,17 @@ zfcp_erp_adapter_strategy_open_fsf_xconfig(struct zfcp_erp_action *erp_action)
2329 zfcp_get_busid_by_adapter(adapter)); 2329 zfcp_get_busid_by_adapter(adapter));
2330 break; 2330 break;
2331 } 2331 }
2332 if (atomic_test_mask(ZFCP_STATUS_ADAPTER_HOST_CON_INIT, 2332
2333 &adapter->status)) { 2333 if (!atomic_test_mask(ZFCP_STATUS_ADAPTER_HOST_CON_INIT,
2334 ZFCP_LOG_DEBUG("host connection still initialising... " 2334 &adapter->status))
2335 "waiting and retrying...\n"); 2335 break;
2336 /* sleep a little bit before retry */ 2336
2337 msleep(jiffies_to_msecs(ZFCP_EXCHANGE_CONFIG_DATA_SLEEP)); 2337 ZFCP_LOG_DEBUG("host connection still initialising... "
2338 } 2338 "waiting and retrying...\n");
2339 } while ((retries--) && 2339 /* sleep a little bit before retry */
2340 atomic_test_mask(ZFCP_STATUS_ADAPTER_HOST_CON_INIT, 2340 msleep(jiffies_to_msecs(sleep));
2341 &adapter->status)); 2341 sleep *= 2;
2342 }
2342 2343
2343 if (!atomic_test_mask(ZFCP_STATUS_ADAPTER_XCONFIG_OK, 2344 if (!atomic_test_mask(ZFCP_STATUS_ADAPTER_XCONFIG_OK,
2344 &adapter->status)) { 2345 &adapter->status)) {