aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/qlcnic
diff options
context:
space:
mode:
authorAmit Kumar Salecha <amit.salecha@qlogic.com>2010-06-21 23:19:02 -0400
committerDavid S. Miller <davem@davemloft.net>2010-06-23 16:16:30 -0400
commit52486a3ac86eabe5a2f283eb9682a69c14347213 (patch)
tree0944cd00114620be46bb46f38c2899316907a490 /drivers/net/qlcnic
parent8a15ad1fb14d67450742cf975a76e744b3189f4d (diff)
qlcnic: dont free host resources during fw recovery
There is no need to free/alloc host resources during firmware recovery. 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')
-rw-r--r--drivers/net/qlcnic/qlcnic_main.c32
1 files changed, 3 insertions, 29 deletions
diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c
index 38d8fe08b7ff..c4602fa866d4 100644
--- a/drivers/net/qlcnic/qlcnic_main.c
+++ b/drivers/net/qlcnic/qlcnic_main.c
@@ -1392,8 +1392,6 @@ static int __qlcnic_shutdown(struct pci_dev *pdev)
1392 1392
1393 cancel_work_sync(&adapter->tx_timeout_task); 1393 cancel_work_sync(&adapter->tx_timeout_task);
1394 1394
1395 qlcnic_detach(adapter);
1396
1397 qlcnic_clr_all_drv_state(adapter); 1395 qlcnic_clr_all_drv_state(adapter);
1398 1396
1399 clear_bit(__QLCNIC_RESETTING, &adapter->state); 1397 clear_bit(__QLCNIC_RESETTING, &adapter->state);
@@ -1454,28 +1452,16 @@ qlcnic_resume(struct pci_dev *pdev)
1454 } 1452 }
1455 1453
1456 if (netif_running(netdev)) { 1454 if (netif_running(netdev)) {
1457 err = qlcnic_attach(adapter);
1458 if (err)
1459 goto err_out;
1460
1461 err = qlcnic_up(adapter, netdev); 1455 err = qlcnic_up(adapter, netdev);
1462 if (err) 1456 if (err)
1463 goto err_out_detach; 1457 goto done;
1464
1465 1458
1466 qlcnic_config_indev_addr(netdev, NETDEV_UP); 1459 qlcnic_config_indev_addr(netdev, NETDEV_UP);
1467 } 1460 }
1468 1461done:
1469 netif_device_attach(netdev); 1462 netif_device_attach(netdev);
1470 qlcnic_schedule_work(adapter, qlcnic_fw_poll_work, FW_POLL_DELAY); 1463 qlcnic_schedule_work(adapter, qlcnic_fw_poll_work, FW_POLL_DELAY);
1471 return 0; 1464 return 0;
1472
1473err_out_detach:
1474 qlcnic_detach(adapter);
1475err_out:
1476 qlcnic_clr_all_drv_state(adapter);
1477 netif_device_attach(netdev);
1478 return err;
1479} 1465}
1480#endif 1466#endif
1481 1467
@@ -2426,10 +2412,6 @@ qlcnic_detach_work(struct work_struct *work)
2426 2412
2427 qlcnic_down(adapter, netdev); 2413 qlcnic_down(adapter, netdev);
2428 2414
2429 rtnl_lock();
2430 qlcnic_detach(adapter);
2431 rtnl_unlock();
2432
2433 status = QLCRD32(adapter, QLCNIC_PEG_HALT_STATUS1); 2415 status = QLCRD32(adapter, QLCNIC_PEG_HALT_STATUS1);
2434 2416
2435 if (status & QLCNIC_RCODE_FATAL_ERROR) 2417 if (status & QLCNIC_RCODE_FATAL_ERROR)
@@ -2518,18 +2500,10 @@ qlcnic_attach_work(struct work_struct *work)
2518 struct qlcnic_adapter *adapter = container_of(work, 2500 struct qlcnic_adapter *adapter = container_of(work,
2519 struct qlcnic_adapter, fw_work.work); 2501 struct qlcnic_adapter, fw_work.work);
2520 struct net_device *netdev = adapter->netdev; 2502 struct net_device *netdev = adapter->netdev;
2521 int err;
2522 2503
2523 if (netif_running(netdev)) { 2504 if (netif_running(netdev)) {
2524 err = qlcnic_attach(adapter); 2505 if (qlcnic_up(adapter, netdev))
2525 if (err)
2526 goto done;
2527
2528 err = qlcnic_up(adapter, netdev);
2529 if (err) {
2530 qlcnic_detach(adapter);
2531 goto done; 2506 goto done;
2532 }
2533 2507
2534 qlcnic_config_indev_addr(netdev, NETDEV_UP); 2508 qlcnic_config_indev_addr(netdev, NETDEV_UP);
2535 } 2509 }