summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorArun Easi <arun.easi@qlogic.com>2011-05-10 11:18:17 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2011-06-03 10:33:36 +0900
commit8a72111ee11db1030a9291bf05d87ffc1dd9cff5 (patch)
tree7aba6678357d034f186db932575591d44ef49a29 /drivers
parent2ce89b71185b877d6ffd8d39aa0e088405719408 (diff)
qla2xxx: Fix vport delete hang when logins are outstanding.
commit 9f40682e2857a3c2ddb80a87b185af3c6a708346 upstream. Timer is required to flush out entries that may be present in work queues. Signed-off-by: Arun Easi <arun.easi@qlogic.com> Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> Signed-off-by: James Bottomley <jbottomley@parallels.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/qla2xxx/qla_attr.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index d3e58d763b43..c52a0a26f2a7 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -1877,14 +1877,15 @@ qla24xx_vport_delete(struct fc_vport *fc_vport)
scsi_remove_host(vha->host);
+ /* Allow timer to run to drain queued items, when removing vp */
+ qla24xx_deallocate_vp_id(vha);
+
if (vha->timer_active) {
qla2x00_vp_stop_timer(vha);
DEBUG15(printk(KERN_INFO "scsi(%ld): timer for the vport[%d]"
" = %p has stopped\n", vha->host_no, vha->vp_idx, vha));
}
- qla24xx_deallocate_vp_id(vha);
-
/* No pending activities shall be there on the vha now */
DEBUG(msleep(random32()%10)); /* Just to see if something falls on
* the net we have placed below */