From ff179e0f4a4da030df52c0632b0615e9a13b5e66 Mon Sep 17 00:00:00 2001 From: Krishna Gudipati Date: Tue, 13 Mar 2012 17:40:31 -0700 Subject: [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 Signed-off-by: James Bottomley --- drivers/scsi/bfa/bfad_attr.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'drivers/scsi/bfa/bfad_attr.c') diff --git a/drivers/scsi/bfa/bfad_attr.c b/drivers/scsi/bfa/bfad_attr.c index 06310b8e562..7b1ecd2b3ff 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) unsigned long flags; struct completion fcomp; - if (im_port->flags & BFAD_PORT_DELETE) - goto free_scsi_host; + if (im_port->flags & BFAD_PORT_DELETE) { + bfad_scsi_host_free(bfad, im_port); + list_del(&vport->list_entry); + return 0; + } port = im_port->port; @@ -526,7 +529,6 @@ bfad_im_vport_delete(struct fc_vport *fc_vport) wait_for_completion(vport->comp_del); -free_scsi_host: bfad_scsi_host_free(bfad, im_port); list_del(&vport->list_entry); kfree(vport); -- cgit v1.2.3