diff options
author | Arun Easi <arun.easi@qlogic.com> | 2011-05-10 14:18:17 -0400 |
---|---|---|
committer | James Bottomley <jbottomley@parallels.com> | 2011-05-17 03:25:38 -0400 |
commit | 9f40682e2857a3c2ddb80a87b185af3c6a708346 (patch) | |
tree | 910dcba158d0da3f9297274022fa3d69423d1439 | |
parent | 7630abd0c690e90cea9412846f596fe1565aaa0e (diff) |
[SCSI] qla2xxx: Fix vport delete hang when logins are outstanding.
Timer is required to flush out entries that may be present in work queues.
Cc: stable@kernel.org
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>
-rw-r--r-- | drivers/scsi/qla2xxx/qla_attr.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index 75faf480aa73..260c0300b3e7 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) | |||
1877 | 1877 | ||
1878 | scsi_remove_host(vha->host); | 1878 | scsi_remove_host(vha->host); |
1879 | 1879 | ||
1880 | /* Allow timer to run to drain queued items, when removing vp */ | ||
1881 | qla24xx_deallocate_vp_id(vha); | ||
1882 | |||
1880 | if (vha->timer_active) { | 1883 | if (vha->timer_active) { |
1881 | qla2x00_vp_stop_timer(vha); | 1884 | qla2x00_vp_stop_timer(vha); |
1882 | DEBUG15(printk(KERN_INFO "scsi(%ld): timer for the vport[%d]" | 1885 | DEBUG15(printk(KERN_INFO "scsi(%ld): timer for the vport[%d]" |
1883 | " = %p has stopped\n", vha->host_no, vha->vp_idx, vha)); | 1886 | " = %p has stopped\n", vha->host_no, vha->vp_idx, vha)); |
1884 | } | 1887 | } |
1885 | 1888 | ||
1886 | qla24xx_deallocate_vp_id(vha); | ||
1887 | |||
1888 | /* No pending activities shall be there on the vha now */ | 1889 | /* No pending activities shall be there on the vha now */ |
1889 | DEBUG(msleep(random32()%10)); /* Just to see if something falls on | 1890 | DEBUG(msleep(random32()%10)); /* Just to see if something falls on |
1890 | * the net we have placed below */ | 1891 | * the net we have placed below */ |