Commit c2a19856 authored by Hariprasad Shenai's avatar Hariprasad Shenai Committed by David S. Miller

cxgb4vf: Turn off SGE RX/TX Callback Timers and interrupts in PCI shutdown routine

Need to turn off  SGE RX/TX Callback Timers & interrupt in cxgb4vf PCI Shutdown
routine in order to prevent crashes during reboot/poweroff when traffic is
running.
Signed-off-by: default avatarHariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6ff4e36f
...@@ -2876,24 +2876,24 @@ static void cxgb4vf_pci_shutdown(struct pci_dev *pdev) ...@@ -2876,24 +2876,24 @@ static void cxgb4vf_pci_shutdown(struct pci_dev *pdev)
if (!adapter) if (!adapter)
return; return;
/* /* Disable all Virtual Interfaces. This will shut down the
* Disable all Virtual Interfaces. This will shut down the
* delivery of all ingress packets into the chip for these * delivery of all ingress packets into the chip for these
* Virtual Interfaces. * Virtual Interfaces.
*/ */
for_each_port(adapter, pidx) { for_each_port(adapter, pidx)
struct net_device *netdev; if (test_bit(pidx, &adapter->registered_device_map))
struct port_info *pi; unregister_netdev(adapter->port[pidx]);
if (!test_bit(pidx, &adapter->registered_device_map))
continue;
netdev = adapter->port[pidx];
if (!netdev)
continue;
pi = netdev_priv(netdev); /* Free up all Queues which will prevent further DMA and
t4vf_enable_vi(adapter, pi->viid, false, false); * Interrupts allowing various internal pathways to drain.
*/
t4vf_sge_stop(adapter);
if (adapter->flags & USING_MSIX) {
pci_disable_msix(adapter->pdev);
adapter->flags &= ~USING_MSIX;
} else if (adapter->flags & USING_MSI) {
pci_disable_msi(adapter->pdev);
adapter->flags &= ~USING_MSI;
} }
/* /*
...@@ -2901,6 +2901,7 @@ static void cxgb4vf_pci_shutdown(struct pci_dev *pdev) ...@@ -2901,6 +2901,7 @@ static void cxgb4vf_pci_shutdown(struct pci_dev *pdev)
* Interrupts allowing various internal pathways to drain. * Interrupts allowing various internal pathways to drain.
*/ */
t4vf_free_sge_resources(adapter); t4vf_free_sge_resources(adapter);
pci_set_drvdata(pdev, NULL);
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment