aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bfa/bfad_attr.c
diff options
context:
space:
mode:
authorKrishna Gudipati <kgudipat@brocade.com>2012-03-13 20:40:31 -0400
committerJames Bottomley <JBottomley@Parallels.com>2012-03-28 04:57:09 -0400
commitff179e0f4a4da030df52c0632b0615e9a13b5e66 (patch)
tree802f4a9caf9b9774f75709bce1779e88b17e51ee /drivers/scsi/bfa/bfad_attr.c
parentf0cdfcee19b259c209a9acda45ab063fd962b66d (diff)
[SCSI] bfa: Fix to avoid vport delete hang on request queue full scenario.
Fixed the LPS (Logical Port Services) state machine to send a FDISC/FLOGI to the FW from the request queue wait state, when there is space available again on the request queue. Made changes to free the vport on LOGO/cleanup complete instead of free'ing it from vport_delete_handler in the module unload scenario. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/bfa/bfad_attr.c')
-rw-r--r--drivers/scsi/bfa/bfad_attr.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/scsi/bfa/bfad_attr.c b/drivers/scsi/bfa/bfad_attr.c
index 06310b8e562d..7b1ecd2b3ffe 100644
--- a/drivers/scsi/bfa/bfad_attr.c
+++ b/drivers/scsi/bfa/bfad_attr.c
@@ -494,8 +494,11 @@ bfad_im_vport_delete(struct fc_vport *fc_vport)
494 unsigned long flags; 494 unsigned long flags;
495 struct completion fcomp; 495 struct completion fcomp;
496 496
497 if (im_port->flags & BFAD_PORT_DELETE) 497 if (im_port->flags & BFAD_PORT_DELETE) {
498 goto free_scsi_host; 498 bfad_scsi_host_free(bfad, im_port);
499 list_del(&vport->list_entry);
500 return 0;
501 }
499 502
500 port = im_port->port; 503 port = im_port->port;
501 504
@@ -526,7 +529,6 @@ bfad_im_vport_delete(struct fc_vport *fc_vport)
526 529
527 wait_for_completion(vport->comp_del); 530 wait_for_completion(vport->comp_del);
528 531
529free_scsi_host:
530 bfad_scsi_host_free(bfad, im_port); 532 bfad_scsi_host_free(bfad, im_port);
531 list_del(&vport->list_entry); 533 list_del(&vport->list_entry);
532 kfree(vport); 534 kfree(vport);