diff options
author | Andreas Herrmann <aherrman@de.ibm.com> | 2005-06-13 07:15:15 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-06-13 22:26:41 -0400 |
commit | 22753fa514aad02342e647ad13048caa282d9238 (patch) | |
tree | c21c84da406344fd055e226a2fb066bb19a3e673 /drivers/s390/scsi/zfcp_erp.c | |
parent | 66c8684abf80a9999392d639627afea80ac62e06 (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/scsi/zfcp_erp.c')
-rw-r--r-- | drivers/s390/scsi/zfcp_erp.c | 25 |
1 files changed, 13 insertions, 12 deletions
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)) { |