aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorBrian King <brking@linux.vnet.ibm.com>2008-12-18 10:26:51 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-12-29 12:24:34 -0500
commitd2131b33c7e07c2905ee2f2321cc4dae1928c483 (patch)
tree9f1dfb9ab936ca7963f93106cb2eaf6c03f26850 /drivers/scsi
parent87b5c328c7e32ab9075086f990001bffb7b19550 (diff)
[SCSI] ibmvfc: Improve async event handling
While doing various error injection testing, such as cable pulls and target moves, some issues were observed in handling these events. This patch improves the way these events are handled by increasing the delay waiting for the fabric to settle and also changes the behavior of Link Up to break the CRQ to ensure everything gets cleaned up properly on the VIOS. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/ibmvscsi/ibmvfc.c10
-rw-r--r--drivers/scsi/ibmvscsi/ibmvfc.h2
2 files changed, 7 insertions, 5 deletions
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c
index a401e938a87a..44f202f33101 100644
--- a/drivers/scsi/ibmvscsi/ibmvfc.c
+++ b/drivers/scsi/ibmvscsi/ibmvfc.c
@@ -2156,15 +2156,17 @@ static void ibmvfc_handle_async(struct ibmvfc_async_crq *crq,
2156 case IBMVFC_AE_LINK_UP: 2156 case IBMVFC_AE_LINK_UP:
2157 case IBMVFC_AE_RESUME: 2157 case IBMVFC_AE_RESUME:
2158 vhost->events_to_log |= IBMVFC_AE_LINKUP; 2158 vhost->events_to_log |= IBMVFC_AE_LINKUP;
2159 ibmvfc_init_host(vhost, 1); 2159 vhost->delay_init = 1;
2160 __ibmvfc_reset_host(vhost);
2160 break; 2161 break;
2161 case IBMVFC_AE_SCN_FABRIC: 2162 case IBMVFC_AE_SCN_FABRIC:
2163 case IBMVFC_AE_SCN_DOMAIN:
2162 vhost->events_to_log |= IBMVFC_AE_RSCN; 2164 vhost->events_to_log |= IBMVFC_AE_RSCN;
2163 ibmvfc_init_host(vhost, 1); 2165 vhost->delay_init = 1;
2166 __ibmvfc_reset_host(vhost);
2164 break; 2167 break;
2165 case IBMVFC_AE_SCN_NPORT: 2168 case IBMVFC_AE_SCN_NPORT:
2166 case IBMVFC_AE_SCN_GROUP: 2169 case IBMVFC_AE_SCN_GROUP:
2167 case IBMVFC_AE_SCN_DOMAIN:
2168 vhost->events_to_log |= IBMVFC_AE_RSCN; 2170 vhost->events_to_log |= IBMVFC_AE_RSCN;
2169 case IBMVFC_AE_ELS_LOGO: 2171 case IBMVFC_AE_ELS_LOGO:
2170 case IBMVFC_AE_ELS_PRLO: 2172 case IBMVFC_AE_ELS_PRLO:
@@ -3619,7 +3621,7 @@ static void ibmvfc_do_work(struct ibmvfc_host *vhost)
3619 if (vhost->delay_init) { 3621 if (vhost->delay_init) {
3620 vhost->delay_init = 0; 3622 vhost->delay_init = 0;
3621 spin_unlock_irqrestore(vhost->host->host_lock, flags); 3623 spin_unlock_irqrestore(vhost->host->host_lock, flags);
3622 ssleep(5); 3624 ssleep(15);
3623 return; 3625 return;
3624 } else 3626 } else
3625 vhost->job_step(vhost); 3627 vhost->job_step(vhost);
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.h b/drivers/scsi/ibmvscsi/ibmvfc.h
index cf02216dc8db..babdf3db59df 100644
--- a/drivers/scsi/ibmvscsi/ibmvfc.h
+++ b/drivers/scsi/ibmvscsi/ibmvfc.h
@@ -33,7 +33,7 @@
33#define IBMVFC_DRIVER_DATE "(November 14, 2008)" 33#define IBMVFC_DRIVER_DATE "(November 14, 2008)"
34 34
35#define IBMVFC_DEFAULT_TIMEOUT 15 35#define IBMVFC_DEFAULT_TIMEOUT 15
36#define IBMVFC_INIT_TIMEOUT 30 36#define IBMVFC_INIT_TIMEOUT 120
37#define IBMVFC_MAX_REQUESTS_DEFAULT 100 37#define IBMVFC_MAX_REQUESTS_DEFAULT 100
38 38
39#define IBMVFC_DEBUG 0 39#define IBMVFC_DEBUG 0