From: Arun Easi Date: Tue, 10 May 2011 18:18:17 +0000 (-0700) Subject: [SCSI] qla2xxx: Fix vport delete hang when logins are outstanding. X-Git-Tag: v3.0-rc1~383^2~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9f40682e2857a3c2ddb80a87b185af3c6a708346;p=profile%2Fivi%2Fkernel-x86-ivi.git [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 Signed-off-by: Madhuranath Iyengar Signed-off-by: James Bottomley Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index 75faf48..260c030 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 */