diff options
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 420238cc794e..114bc5a81171 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) | |||
1838 | 1838 | ||
1839 | qla24xx_disable_vp(vha); | 1839 | qla24xx_disable_vp(vha); |
1840 | 1840 | ||
1841 | vha->flags.delete_progress = 1; | ||
1842 | |||
1841 | fc_remove_host(vha->host); | 1843 | fc_remove_host(vha->host); |
1842 | 1844 | ||
1843 | scsi_remove_host(vha->host); | 1845 | scsi_remove_host(vha->host); |
1844 | 1846 | ||
1845 | qla2x00_free_fcports(vha); | 1847 | if (vha->timer_active) { |
1848 | qla2x00_vp_stop_timer(vha); | ||
1849 | DEBUG15(printk(KERN_INFO "scsi(%ld): timer for the vport[%d]" | ||
1850 | " = %p has stopped\n", vha->host_no, vha->vp_idx, vha)); | ||
1851 | } | ||
1846 | 1852 | ||
1847 | qla24xx_deallocate_vp_id(vha); | 1853 | qla24xx_deallocate_vp_id(vha); |
1848 | 1854 | ||
1855 | /* No pending activities shall be there on the vha now */ | ||
1856 | DEBUG(msleep(random32()%10)); /* Just to see if something falls on | ||
1857 | * the net we have placed below */ | ||
1858 | |||
1859 | BUG_ON(atomic_read(&vha->vref_count)); | ||
1860 | |||
1861 | qla2x00_free_fcports(vha); | ||
1862 | |||
1849 | mutex_lock(&ha->vport_lock); | 1863 | mutex_lock(&ha->vport_lock); |
1850 | ha->cur_vport_count--; | 1864 | ha->cur_vport_count--; |
1851 | clear_bit(vha->vp_idx, ha->vp_idx_map); | 1865 | clear_bit(vha->vp_idx, ha->vp_idx_map); |
1852 | mutex_unlock(&ha->vport_lock); | 1866 | mutex_unlock(&ha->vport_lock); |
1853 | 1867 | ||
1854 | if (vha->timer_active) { | ||
1855 | qla2x00_vp_stop_timer(vha); | ||
1856 | DEBUG15(printk ("scsi(%ld): timer for the vport[%d] = %p " | ||
1857 | "has stopped\n", | ||
1858 | vha->host_no, vha->vp_idx, vha)); | ||
1859 | } | ||
1860 | |||
1861 | if (vha->req->id && !ha->flags.cpu_affinity_enabled) { | 1868 | if (vha->req->id && !ha->flags.cpu_affinity_enabled) { |
1862 | if (qla25xx_delete_req_que(vha, vha->req) != QLA_SUCCESS) | 1869 | if (qla25xx_delete_req_que(vha, vha->req) != QLA_SUCCESS) |
1863 | qla_printk(KERN_WARNING, ha, | 1870 | qla_printk(KERN_WARNING, ha, |