File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -5078,6 +5078,7 @@ static void mpi3mr_remove(struct pci_dev *pdev)
5078
5078
struct workqueue_struct * wq ;
5079
5079
unsigned long flags ;
5080
5080
struct mpi3mr_tgt_dev * tgtdev , * tgtdev_next ;
5081
+ struct mpi3mr_hba_port * port , * hba_port_next ;
5081
5082
5082
5083
if (!shost )
5083
5084
return ;
@@ -5117,6 +5118,16 @@ static void mpi3mr_remove(struct pci_dev *pdev)
5117
5118
mpi3mr_free_mem (mrioc );
5118
5119
mpi3mr_cleanup_resources (mrioc );
5119
5120
5121
+ spin_lock_irqsave (& mrioc -> sas_node_lock , flags );
5122
+ list_for_each_entry_safe (port , hba_port_next , & mrioc -> hba_port_table_list , list ) {
5123
+ ioc_info (mrioc ,
5124
+ "removing hba_port entry: %p port: %d from hba_port list\n" ,
5125
+ port , port -> port_id );
5126
+ list_del (& port -> list );
5127
+ kfree (port );
5128
+ }
5129
+ spin_unlock_irqrestore (& mrioc -> sas_node_lock , flags );
5130
+
5120
5131
spin_lock (& mrioc_list_lock );
5121
5132
list_del (& mrioc -> list );
5122
5133
spin_unlock (& mrioc_list_lock );
You can’t perform that action at this time.
0 commit comments