aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/qlcnic/qlcnic_hw.c
diff options
context:
space:
mode:
authorAmit Kumar Salecha <amit.salecha@qlogic.com>2010-06-21 23:19:01 -0400
committerDavid S. Miller <davem@davemloft.net>2010-06-23 16:16:30 -0400
commit8a15ad1fb14d67450742cf975a76e744b3189f4d (patch)
treed64402cdeec98e3838d8c73924db199a294ba845 /drivers/net/qlcnic/qlcnic_hw.c
parent42f65cbad4168958dff8a307bfe4b528409951d3 (diff)
qlcnic: release device resources during interface down
Previously we were allocating device resources during probe and release them during remove. Now alloc during interface up and release in interface down. This helps in device performance, as it doesn't need to keep track of inactive resources. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlcnic/qlcnic_hw.c')
-rw-r--r--drivers/net/qlcnic/qlcnic_hw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/qlcnic/qlcnic_hw.c b/drivers/net/qlcnic/qlcnic_hw.c
index ad124254b6a9..e08c8b0556a4 100644
--- a/drivers/net/qlcnic/qlcnic_hw.c
+++ b/drivers/net/qlcnic/qlcnic_hw.c
@@ -327,7 +327,7 @@ qlcnic_send_cmd_descs(struct qlcnic_adapter *adapter,
327 327
328 i = 0; 328 i = 0;
329 329
330 if (adapter->is_up != QLCNIC_ADAPTER_UP_MAGIC) 330 if (!test_bit(__QLCNIC_FW_ATTACHED, &adapter->state))
331 return -EIO; 331 return -EIO;
332 332
333 tx_ring = adapter->tx_ring; 333 tx_ring = adapter->tx_ring;
@@ -431,7 +431,7 @@ void qlcnic_set_multi(struct net_device *netdev)
431 u8 bcast_addr[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; 431 u8 bcast_addr[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
432 u32 mode = VPORT_MISS_MODE_DROP; 432 u32 mode = VPORT_MISS_MODE_DROP;
433 433
434 if (adapter->is_up != QLCNIC_ADAPTER_UP_MAGIC) 434 if (!test_bit(__QLCNIC_FW_ATTACHED, &adapter->state))
435 return; 435 return;
436 436
437 qlcnic_nic_add_mac(adapter, adapter->mac_addr); 437 qlcnic_nic_add_mac(adapter, adapter->mac_addr);