diff options
author | Arun Easi <arun.easi@qlogic.com> | 2010-09-03 14:57:00 -0700 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-09-05 15:13:12 -0300 |
commit | feafb7b1714cf599a6d0fed45801ab3f66046cbd (patch) | |
tree | 9f8d61c64bc40fff36666f5b7f172fd2921da880 /drivers/scsi/qla2xxx/qla_attr.c | |
parent | 2e4c332913b5d39fef686b3964098f0d8fd97ead (diff) | |
download | kernel_samsung_smdk4412-feafb7b1714cf599a6d0fed45801ab3f66046cbd.tar.gz kernel_samsung_smdk4412-feafb7b1714cf599a6d0fed45801ab3f66046cbd.tar.bz2 kernel_samsung_smdk4412-feafb7b1714cf599a6d0fed45801ab3f66046cbd.zip |
[SCSI] qla2xxx: Fix vport delete issues
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_attr.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_attr.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index 420238cc794..114bc5a8117 100644 --- a/drivers/scsi/qla2xxx/qla_attr.c +++ b/drivers/scsi/qla2xxx/qla_attr.c @@ -1838,26 +1838,33 @@ qla24xx_vport_delete(struct fc_vport *fc_vport) qla24xx_disable_vp(vha); + vha->flags.delete_progress = 1; + fc_remove_host(vha->host); scsi_remove_host(vha->host); - qla2x00_free_fcports(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 */ + + BUG_ON(atomic_read(&vha->vref_count)); + + qla2x00_free_fcports(vha); + mutex_lock(&ha->vport_lock); ha->cur_vport_count--; clear_bit(vha->vp_idx, ha->vp_idx_map); mutex_unlock(&ha->vport_lock); - if (vha->timer_active) { - qla2x00_vp_stop_timer(vha); - DEBUG15(printk ("scsi(%ld): timer for the vport[%d] = %p " - "has stopped\n", - vha->host_no, vha->vp_idx, vha)); - } - if (vha->req->id && !ha->flags.cpu_affinity_enabled) { if (qla25xx_delete_req_que(vha, vha->req) != QLA_SUCCESS) qla_printk(KERN_WARNING, ha, |