@@ -82,7 +82,7 @@ static int bnx2fc_bind_pcidev(struct bnx2fc_hba *hba);
82
82
static void bnx2fc_unbind_pcidev (struct bnx2fc_hba * hba );
83
83
static struct fc_lport * bnx2fc_if_create (struct bnx2fc_interface * interface ,
84
84
struct device * parent , int npiv );
85
- static void bnx2fc_destroy_work (struct work_struct * work );
85
+ static void bnx2fc_port_destroy (struct fcoe_port * port );
86
86
87
87
static struct bnx2fc_hba * bnx2fc_hba_lookup (struct net_device * phys_dev );
88
88
static struct bnx2fc_interface * bnx2fc_interface_lookup (struct net_device
@@ -907,9 +907,6 @@ static void bnx2fc_indicate_netevent(void *context, unsigned long event,
907
907
__bnx2fc_destroy (interface );
908
908
}
909
909
mutex_unlock (& bnx2fc_dev_lock );
910
-
911
- /* Ensure ALL destroy work has been completed before return */
912
- flush_workqueue (bnx2fc_wq );
913
910
return ;
914
911
915
912
default :
@@ -1215,8 +1212,8 @@ static int bnx2fc_vport_destroy(struct fc_vport *vport)
1215
1212
mutex_unlock (& n_port -> lp_mutex );
1216
1213
bnx2fc_free_vport (interface -> hba , port -> lport );
1217
1214
bnx2fc_port_shutdown (port -> lport );
1215
+ bnx2fc_port_destroy (port );
1218
1216
bnx2fc_interface_put (interface );
1219
- queue_work (bnx2fc_wq , & port -> destroy_work );
1220
1217
return 0 ;
1221
1218
}
1222
1219
@@ -1525,7 +1522,6 @@ static struct fc_lport *bnx2fc_if_create(struct bnx2fc_interface *interface,
1525
1522
port -> lport = lport ;
1526
1523
port -> priv = interface ;
1527
1524
port -> get_netdev = bnx2fc_netdev ;
1528
- INIT_WORK (& port -> destroy_work , bnx2fc_destroy_work );
1529
1525
1530
1526
/* Configure fcoe_port */
1531
1527
rc = bnx2fc_lport_config (lport );
@@ -1653,8 +1649,8 @@ static void __bnx2fc_destroy(struct bnx2fc_interface *interface)
1653
1649
bnx2fc_interface_cleanup (interface );
1654
1650
bnx2fc_stop (interface );
1655
1651
list_del (& interface -> list );
1652
+ bnx2fc_port_destroy (port );
1656
1653
bnx2fc_interface_put (interface );
1657
- queue_work (bnx2fc_wq , & port -> destroy_work );
1658
1654
}
1659
1655
1660
1656
/**
@@ -1694,15 +1690,12 @@ static int bnx2fc_destroy(struct net_device *netdev)
1694
1690
return rc ;
1695
1691
}
1696
1692
1697
- static void bnx2fc_destroy_work (struct work_struct * work )
1693
+ static void bnx2fc_port_destroy (struct fcoe_port * port )
1698
1694
{
1699
- struct fcoe_port * port ;
1700
1695
struct fc_lport * lport ;
1701
1696
1702
- port = container_of (work , struct fcoe_port , destroy_work );
1703
1697
lport = port -> lport ;
1704
-
1705
- BNX2FC_HBA_DBG (lport , "Entered bnx2fc_destroy_work\n" );
1698
+ BNX2FC_HBA_DBG (lport , "Entered %s, destroying lport %p\n" , __func__ , lport );
1706
1699
1707
1700
bnx2fc_if_destroy (lport );
1708
1701
}
@@ -2556,9 +2549,6 @@ static void bnx2fc_ulp_exit(struct cnic_dev *dev)
2556
2549
__bnx2fc_destroy (interface );
2557
2550
mutex_unlock (& bnx2fc_dev_lock );
2558
2551
2559
- /* Ensure ALL destroy work has been completed before return */
2560
- flush_workqueue (bnx2fc_wq );
2561
-
2562
2552
bnx2fc_ulp_stop (hba );
2563
2553
/* unregister cnic device */
2564
2554
if (test_and_clear_bit (BNX2FC_CNIC_REGISTERED , & hba -> reg_with_cnic ))
0 commit comments