]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ixgbe: Two small fixes for 82599 when bringing the device down and for WoL
authorPJ Waskiewicz <peter.p.waskiewicz.jr@intel.com>
Fri, 13 Mar 2009 22:15:10 +0000 (22:15 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 14 Mar 2009 19:41:13 +0000 (12:41 -0700)
The Tx DMA unit should be disabled when bringing the device down.  Also,
the KX4 device with 82599 supports WoL, so we should clear the Wake Up
Status (WUS) after a PCIe slot reset.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Acked-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ixgbe/ixgbe_main.c

index 892195f2ad9b75691328d1de95f0b053ebcef06e..3e981a1b0cd6d9612c9161c9f195e07e8cdefb09 100644 (file)
@@ -2558,6 +2558,11 @@ void ixgbe_down(struct ixgbe_adapter *adapter)
                IXGBE_WRITE_REG(hw, IXGBE_TXDCTL(j),
                                (txdctl & ~IXGBE_TXDCTL_ENABLE));
        }
+       /* Disable the Tx DMA engine on 82599 */
+       if (hw->mac.type == ixgbe_mac_82599EB)
+               IXGBE_WRITE_REG(hw, IXGBE_DMATXCTL,
+                               (IXGBE_READ_REG(hw, IXGBE_DMATXCTL) &
+                                ~IXGBE_DMATXCTL_TE));
 
        netif_carrier_off(netdev);
 
@@ -4794,7 +4799,7 @@ static pci_ers_result_t ixgbe_io_slot_reset(struct pci_dev *pdev)
                pci_enable_wake(pdev, PCI_D3cold, 0);
 
                ixgbe_reset(adapter);
-
+               IXGBE_WRITE_REG(&adapter->hw, IXGBE_WUS, ~0);
                result = PCI_ERS_RESULT_RECOVERED;
        }