diff options
author | Brian King <brking@linux.vnet.ibm.com> | 2009-03-20 15:44:39 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-04-03 09:22:43 -0500 |
commit | 10501e1ce3d97cc84a8e29a3a139f74601b59b0f (patch) | |
tree | 47ba1a14b3c3843efc4b39eff17424da391c73b5 /drivers/scsi/ibmvscsi/ibmvfc.h | |
parent | 9ab3610f9c24e7f303f1b0e6bb88a5f804ab847e (diff) |
[SCSI] ibmvfc: Improve ADISC timeout handling
The ibmvfc driver currently breaks the CRQ and essentially
resets the entire virtual FC adapter, killing all outstanding
ops to all attached targets, if an ADISC times out during target
discover/rediscovery. This patch adds some code to cancel the
ADISC if it times out, which prevents a single ADISC timeout from
affecting the other devices attached to the fabric.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/ibmvscsi/ibmvfc.h')
-rw-r--r-- | drivers/scsi/ibmvscsi/ibmvfc.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.h b/drivers/scsi/ibmvscsi/ibmvfc.h index 70107522e3a9..0f14fd3c40d2 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.h +++ b/drivers/scsi/ibmvscsi/ibmvfc.h @@ -33,6 +33,10 @@ #define IBMVFC_DRIVER_DATE "(November 14, 2008)" #define IBMVFC_DEFAULT_TIMEOUT 60 +#define IBMVFC_ADISC_CANCEL_TIMEOUT 45 +#define IBMVFC_ADISC_TIMEOUT 15 +#define IBMVFC_ADISC_PLUS_CANCEL_TIMEOUT \ + (IBMVFC_ADISC_TIMEOUT + IBMVFC_ADISC_CANCEL_TIMEOUT) #define IBMVFC_INIT_TIMEOUT 120 #define IBMVFC_MAX_REQUESTS_DEFAULT 100 @@ -53,9 +57,9 @@ * Ensure we have resources for ERP and initialization: * 1 for ERP * 1 for initialization - * 1 for each discovery thread + * 2 for each discovery thread */ -#define IBMVFC_NUM_INTERNAL_REQ (1 + 1 + disc_threads) +#define IBMVFC_NUM_INTERNAL_REQ (1 + 1 + (disc_threads * 2)) #define IBMVFC_MAD_SUCCESS 0x00 #define IBMVFC_MAD_NOT_SUPPORTED 0xF1 @@ -585,10 +589,12 @@ struct ibmvfc_target { enum ibmvfc_target_action action; int need_login; int init_retries; + u32 cancel_key; struct ibmvfc_service_parms service_parms; struct ibmvfc_service_parms service_parms_change; struct fc_rport_identifiers ids; void (*job_step) (struct ibmvfc_target *); + struct timer_list timer; struct kref kref; }; @@ -672,6 +678,7 @@ struct ibmvfc_host { int task_set; int init_retries; int discovery_threads; + int abort_threads; int client_migrated; int reinit; int delay_init; |