diff options
author | Hariprasad Shenai <hariprasad@chelsio.com> | 2014-08-05 06:11:28 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-08-05 19:40:40 -0400 |
commit | c2a198569aeab71c36156f83128916dce9561741 (patch) | |
tree | b35603434d794268fe7a66a5273cb07f27e7aa10 | |
parent | 6ff4e36f8b69540b99aac75964154e14e7d6a6db (diff) |
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: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c index f002af190a65..d8d28e82ade1 100644 --- a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c +++ b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | |||
@@ -2876,24 +2876,24 @@ static void cxgb4vf_pci_shutdown(struct pci_dev *pdev) | |||
2876 | if (!adapter) | 2876 | if (!adapter) |
2877 | return; | 2877 | return; |
2878 | 2878 | ||
2879 | /* | 2879 | /* Disable all Virtual Interfaces. This will shut down the |
2880 | * Disable all Virtual Interfaces. This will shut down the | ||
2881 | * delivery of all ingress packets into the chip for these | 2880 | * delivery of all ingress packets into the chip for these |
2882 | * Virtual Interfaces. | 2881 | * Virtual Interfaces. |
2883 | */ | 2882 | */ |
2884 | for_each_port(adapter, pidx) { | 2883 | for_each_port(adapter, pidx) |
2885 | struct net_device *netdev; | 2884 | if (test_bit(pidx, &adapter->registered_device_map)) |
2886 | struct port_info *pi; | 2885 | unregister_netdev(adapter->port[pidx]); |
2887 | |||
2888 | if (!test_bit(pidx, &adapter->registered_device_map)) | ||
2889 | continue; | ||
2890 | |||
2891 | netdev = adapter->port[pidx]; | ||
2892 | if (!netdev) | ||
2893 | continue; | ||
2894 | 2886 | ||
2895 | pi = netdev_priv(netdev); | 2887 | /* Free up all Queues which will prevent further DMA and |
2896 | t4vf_enable_vi(adapter, pi->viid, false, false); | 2888 | * Interrupts allowing various internal pathways to drain. |
2889 | */ | ||
2890 | t4vf_sge_stop(adapter); | ||
2891 | if (adapter->flags & USING_MSIX) { | ||
2892 | pci_disable_msix(adapter->pdev); | ||
2893 | adapter->flags &= ~USING_MSIX; | ||
2894 | } else if (adapter->flags & USING_MSI) { | ||
2895 | pci_disable_msi(adapter->pdev); | ||
2896 | adapter->flags &= ~USING_MSI; | ||
2897 | } | 2897 | } |
2898 | 2898 | ||
2899 | /* | 2899 | /* |
@@ -2901,6 +2901,7 @@ static void cxgb4vf_pci_shutdown(struct pci_dev *pdev) | |||
2901 | * Interrupts allowing various internal pathways to drain. | 2901 | * Interrupts allowing various internal pathways to drain. |
2902 | */ | 2902 | */ |
2903 | t4vf_free_sge_resources(adapter); | 2903 | t4vf_free_sge_resources(adapter); |
2904 | pci_set_drvdata(pdev, NULL); | ||
2904 | } | 2905 | } |
2905 | 2906 | ||
2906 | /* | 2907 | /* |