提交 52486a3a 编写于 作者: A Amit Kumar Salecha 提交者: David S. Miller

qlcnic: dont free host resources during fw recovery

There is no need to free/alloc host resources during firmware
recovery.
Signed-off-by: NAmit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 8a15ad1f
...@@ -1392,8 +1392,6 @@ static int __qlcnic_shutdown(struct pci_dev *pdev) ...@@ -1392,8 +1392,6 @@ static int __qlcnic_shutdown(struct pci_dev *pdev)
cancel_work_sync(&adapter->tx_timeout_task); cancel_work_sync(&adapter->tx_timeout_task);
qlcnic_detach(adapter);
qlcnic_clr_all_drv_state(adapter); qlcnic_clr_all_drv_state(adapter);
clear_bit(__QLCNIC_RESETTING, &adapter->state); clear_bit(__QLCNIC_RESETTING, &adapter->state);
...@@ -1454,28 +1452,16 @@ qlcnic_resume(struct pci_dev *pdev) ...@@ -1454,28 +1452,16 @@ qlcnic_resume(struct pci_dev *pdev)
} }
if (netif_running(netdev)) { if (netif_running(netdev)) {
err = qlcnic_attach(adapter);
if (err)
goto err_out;
err = qlcnic_up(adapter, netdev); err = qlcnic_up(adapter, netdev);
if (err) if (err)
goto err_out_detach; goto done;
qlcnic_config_indev_addr(netdev, NETDEV_UP); qlcnic_config_indev_addr(netdev, NETDEV_UP);
} }
done:
netif_device_attach(netdev); netif_device_attach(netdev);
qlcnic_schedule_work(adapter, qlcnic_fw_poll_work, FW_POLL_DELAY); qlcnic_schedule_work(adapter, qlcnic_fw_poll_work, FW_POLL_DELAY);
return 0; return 0;
err_out_detach:
qlcnic_detach(adapter);
err_out:
qlcnic_clr_all_drv_state(adapter);
netif_device_attach(netdev);
return err;
} }
#endif #endif
...@@ -2426,10 +2412,6 @@ qlcnic_detach_work(struct work_struct *work) ...@@ -2426,10 +2412,6 @@ qlcnic_detach_work(struct work_struct *work)
qlcnic_down(adapter, netdev); qlcnic_down(adapter, netdev);
rtnl_lock();
qlcnic_detach(adapter);
rtnl_unlock();
status = QLCRD32(adapter, QLCNIC_PEG_HALT_STATUS1); status = QLCRD32(adapter, QLCNIC_PEG_HALT_STATUS1);
if (status & QLCNIC_RCODE_FATAL_ERROR) if (status & QLCNIC_RCODE_FATAL_ERROR)
...@@ -2518,18 +2500,10 @@ qlcnic_attach_work(struct work_struct *work) ...@@ -2518,18 +2500,10 @@ qlcnic_attach_work(struct work_struct *work)
struct qlcnic_adapter *adapter = container_of(work, struct qlcnic_adapter *adapter = container_of(work,
struct qlcnic_adapter, fw_work.work); struct qlcnic_adapter, fw_work.work);
struct net_device *netdev = adapter->netdev; struct net_device *netdev = adapter->netdev;
int err;
if (netif_running(netdev)) { if (netif_running(netdev)) {
err = qlcnic_attach(adapter); if (qlcnic_up(adapter, netdev))
if (err)
goto done;
err = qlcnic_up(adapter, netdev);
if (err) {
qlcnic_detach(adapter);
goto done; goto done;
}
qlcnic_config_indev_addr(netdev, NETDEV_UP); qlcnic_config_indev_addr(netdev, NETDEV_UP);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册