aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
diff options
context:
space:
mode:
authorEmil Tantilov <emil.s.tantilov@intel.com>2011-08-16 03:34:18 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2011-09-23 12:05:51 -0400
commitc23f5b6bbb5ba73cafdb354dcace17426fef4d38 (patch)
treedf362819c3d35ef5be8ae9b5ba47f747ca3d9243 /drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
parentff9d1a5aefa70ef161a5716f44ad2c24957db7c8 (diff)
ixgbe: add WOL support for X540
Add support for WOL as determined by the EEPROM. Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ixgbe/ixgbe_main.c')
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_main.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index fae2f4410333..5f50f1b69cad 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -7074,6 +7074,7 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
7074 u16 device_caps; 7074 u16 device_caps;
7075#endif 7075#endif
7076 u32 eec; 7076 u32 eec;
7077 u16 wol_cap;
7077 7078
7078 /* Catch broken hardware that put the wrong VF device ID in 7079 /* Catch broken hardware that put the wrong VF device ID in
7079 * the PCIe SR-IOV capability. 7080 * the PCIe SR-IOV capability.
@@ -7338,6 +7339,8 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
7338 netdev->features &= ~NETIF_F_RXHASH; 7339 netdev->features &= ~NETIF_F_RXHASH;
7339 } 7340 }
7340 7341
7342 /* WOL not supported for all but the following */
7343 adapter->wol = 0;
7341 switch (pdev->device) { 7344 switch (pdev->device) {
7342 case IXGBE_DEV_ID_82599_SFP: 7345 case IXGBE_DEV_ID_82599_SFP:
7343 /* Only this subdevice supports WOL */ 7346 /* Only this subdevice supports WOL */
@@ -7352,8 +7355,15 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
7352 case IXGBE_DEV_ID_82599_KX4: 7355 case IXGBE_DEV_ID_82599_KX4:
7353 adapter->wol = IXGBE_WUFC_MAG; 7356 adapter->wol = IXGBE_WUFC_MAG;
7354 break; 7357 break;
7355 default: 7358 case IXGBE_DEV_ID_X540T:
7356 adapter->wol = 0; 7359 /* Check eeprom to see if it is enabled */
7360 hw->eeprom.ops.read(hw, 0x2c, &adapter->eeprom_cap);
7361 wol_cap = adapter->eeprom_cap & IXGBE_DEVICE_CAPS_WOL_MASK;
7362
7363 if ((wol_cap == IXGBE_DEVICE_CAPS_WOL_PORT0_1) ||
7364 ((wol_cap == IXGBE_DEVICE_CAPS_WOL_PORT0) &&
7365 (hw->bus.func == 0)))
7366 adapter->wol = IXGBE_WUFC_MAG;
7357 break; 7367 break;
7358 } 7368 }
7359 device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol); 7369 device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);