aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_attr.c
diff options
context:
space:
mode:
authorChad Dupuis <chad.dupuis@qlogic.com>2010-07-23 06:28:30 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-07-28 10:06:11 -0400
commit8867048b486a64125b62f93af13a379d6d575ee2 (patch)
tree72bd8422dddba119d0b90831cbe8d6441d0b189f /drivers/scsi/qla2xxx/qla_attr.c
parent14e303d98bcfe4a6075407b531b1df2f237deb28 (diff)
[SCSI] qla2xxx: Add qla2x00_free_fcports() function
This function was added to encapsulate freeing the memory for all the fcports associated with a particular vha. Also added a call to qla2x00_free_fcports() to qla2x00_free_device() to free the memory for all the fcports associated with a vha during device removal. 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.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index 7ebf365043cf..93a4c20e2113 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -1827,7 +1827,6 @@ static int
1827qla24xx_vport_delete(struct fc_vport *fc_vport) 1827qla24xx_vport_delete(struct fc_vport *fc_vport)
1828{ 1828{
1829 scsi_qla_host_t *vha = fc_vport->dd_data; 1829 scsi_qla_host_t *vha = fc_vport->dd_data;
1830 fc_port_t *fcport, *tfcport;
1831 struct qla_hw_data *ha = vha->hw; 1830 struct qla_hw_data *ha = vha->hw;
1832 uint16_t id = vha->vp_idx; 1831 uint16_t id = vha->vp_idx;
1833 1832
@@ -1841,11 +1840,7 @@ qla24xx_vport_delete(struct fc_vport *fc_vport)
1841 1840
1842 scsi_remove_host(vha->host); 1841 scsi_remove_host(vha->host);
1843 1842
1844 list_for_each_entry_safe(fcport, tfcport, &vha->vp_fcports, list) { 1843 qla2x00_free_fcports(vha);
1845 list_del(&fcport->list);
1846 kfree(fcport);
1847 fcport = NULL;
1848 }
1849 1844
1850 qla24xx_deallocate_vp_id(vha); 1845 qla24xx_deallocate_vp_id(vha);
1851 1846