diff options
author | Bhanu Prakash Gollapudi <bprakash@broadcom.com> | 2011-08-24 21:56:42 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-08-29 03:16:19 -0400 |
commit | eccdcd026ae7359e22b70444b8a45f712f05cc37 (patch) | |
tree | 556c4778d8eae08a63173f2b49d7b7fe7f7c8299 /drivers/scsi/bnx2fc/bnx2fc_fcoe.c | |
parent | 1dbf5a370606284aa2ed8ba54848631201121638 (diff) |
[SCSI] bnx2fc: Need not schedule destroy_work from __bnx2fc_destroy
Since it is already called in the right context with rtnl_lock and dev_mutex
held.
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/bnx2fc/bnx2fc_fcoe.c')
-rw-r--r-- | drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c index e6c987946b69..24e707151d3e 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c +++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c | |||
@@ -56,7 +56,7 @@ static struct scsi_host_template bnx2fc_shost_template; | |||
56 | static struct fc_function_template bnx2fc_transport_function; | 56 | static struct fc_function_template bnx2fc_transport_function; |
57 | static struct fc_function_template bnx2fc_vport_xport_function; | 57 | static struct fc_function_template bnx2fc_vport_xport_function; |
58 | static int bnx2fc_create(struct net_device *netdev, enum fip_state fip_mode); | 58 | static int bnx2fc_create(struct net_device *netdev, enum fip_state fip_mode); |
59 | static void __bnx2fc_destroy(struct bnx2fc_interface *interface, bool schedule); | 59 | static void __bnx2fc_destroy(struct bnx2fc_interface *interface); |
60 | static int bnx2fc_destroy(struct net_device *net_device); | 60 | static int bnx2fc_destroy(struct net_device *net_device); |
61 | static int bnx2fc_enable(struct net_device *netdev); | 61 | static int bnx2fc_enable(struct net_device *netdev); |
62 | static int bnx2fc_disable(struct net_device *netdev); | 62 | static int bnx2fc_disable(struct net_device *netdev); |
@@ -840,7 +840,7 @@ static void bnx2fc_indicate_netevent(void *context, unsigned long event, | |||
840 | list_for_each_entry_safe(interface, tmp, &if_list, list) { | 840 | list_for_each_entry_safe(interface, tmp, &if_list, list) { |
841 | if (interface->hba != hba) | 841 | if (interface->hba != hba) |
842 | continue; | 842 | continue; |
843 | __bnx2fc_destroy(interface, true); | 843 | __bnx2fc_destroy(interface); |
844 | } | 844 | } |
845 | mutex_unlock(&bnx2fc_dev_lock); | 845 | mutex_unlock(&bnx2fc_dev_lock); |
846 | return; | 846 | return; |
@@ -1479,21 +1479,16 @@ static void bnx2fc_if_destroy(struct fc_lport *lport) | |||
1479 | scsi_host_put(lport->host); | 1479 | scsi_host_put(lport->host); |
1480 | } | 1480 | } |
1481 | 1481 | ||
1482 | static void __bnx2fc_destroy(struct bnx2fc_interface *interface, bool schedule) | 1482 | static void __bnx2fc_destroy(struct bnx2fc_interface *interface) |
1483 | { | 1483 | { |
1484 | struct fc_lport *lport = interface->ctlr.lp; | 1484 | struct fc_lport *lport = interface->ctlr.lp; |
1485 | struct fcoe_port *port = lport_priv(lport); | ||
1486 | 1485 | ||
1487 | bnx2fc_interface_cleanup(interface); | 1486 | bnx2fc_interface_cleanup(interface); |
1488 | bnx2fc_stop(interface); | 1487 | bnx2fc_stop(interface); |
1489 | |||
1490 | list_del(&interface->list); | 1488 | list_del(&interface->list); |
1491 | lport = interface->ctlr.lp; | 1489 | lport = interface->ctlr.lp; |
1492 | bnx2fc_interface_put(interface); | 1490 | bnx2fc_interface_put(interface); |
1493 | if (schedule) | 1491 | bnx2fc_if_destroy(lport); |
1494 | queue_work(bnx2fc_wq, &port->destroy_work); | ||
1495 | else | ||
1496 | bnx2fc_if_destroy(lport); | ||
1497 | } | 1492 | } |
1498 | 1493 | ||
1499 | /** | 1494 | /** |
@@ -1523,7 +1518,7 @@ static int bnx2fc_destroy(struct net_device *netdev) | |||
1523 | 1518 | ||
1524 | 1519 | ||
1525 | destroy_workqueue(interface->timer_work_queue); | 1520 | destroy_workqueue(interface->timer_work_queue); |
1526 | __bnx2fc_destroy(interface, false); | 1521 | __bnx2fc_destroy(interface); |
1527 | 1522 | ||
1528 | netdev_err: | 1523 | netdev_err: |
1529 | mutex_unlock(&bnx2fc_dev_lock); | 1524 | mutex_unlock(&bnx2fc_dev_lock); |
@@ -2110,7 +2105,7 @@ static void bnx2fc_ulp_exit(struct cnic_dev *dev) | |||
2110 | list_for_each_entry_safe(interface, tmp, &if_list, list) | 2105 | list_for_each_entry_safe(interface, tmp, &if_list, list) |
2111 | /* destroy not called yet, move to quiesced list */ | 2106 | /* destroy not called yet, move to quiesced list */ |
2112 | if (interface->hba == hba) | 2107 | if (interface->hba == hba) |
2113 | __bnx2fc_destroy(interface, false); | 2108 | __bnx2fc_destroy(interface); |
2114 | mutex_unlock(&bnx2fc_dev_lock); | 2109 | mutex_unlock(&bnx2fc_dev_lock); |
2115 | 2110 | ||
2116 | bnx2fc_ulp_stop(hba); | 2111 | bnx2fc_ulp_stop(hba); |