|
|
|
@ -6598,7 +6598,7 @@ static netdev_features_t ixgbe_fix_features(struct net_device *netdev, |
|
|
|
|
/* Turn off LRO if not RSC capable */ |
|
|
|
|
if (!(adapter->flags2 & IXGBE_FLAG2_RSC_CAPABLE)) |
|
|
|
|
features &= ~NETIF_F_LRO; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return features; |
|
|
|
|
} |
|
|
|
@ -6785,6 +6785,57 @@ static void __devinit ixgbe_probe_vf(struct ixgbe_adapter *adapter, |
|
|
|
|
#endif /* CONFIG_PCI_IOV */ |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* ixgbe_wol_supported - Check whether device supports WoL |
|
|
|
|
* @hw: hw specific details |
|
|
|
|
* @device_id: the device ID |
|
|
|
|
* @subdev_id: the subsystem device ID |
|
|
|
|
* |
|
|
|
|
* This function is used by probe and ethtool to determine |
|
|
|
|
* which devices have WoL support |
|
|
|
|
* |
|
|
|
|
**/ |
|
|
|
|
int ixgbe_wol_supported(struct ixgbe_adapter *adapter, u16 device_id, |
|
|
|
|
u16 subdevice_id) |
|
|
|
|
{ |
|
|
|
|
struct ixgbe_hw *hw = &adapter->hw; |
|
|
|
|
u16 wol_cap = adapter->eeprom_cap & IXGBE_DEVICE_CAPS_WOL_MASK; |
|
|
|
|
int is_wol_supported = 0; |
|
|
|
|
|
|
|
|
|
switch (device_id) { |
|
|
|
|
case IXGBE_DEV_ID_82599_SFP: |
|
|
|
|
/* Only these subdevices could supports WOL */ |
|
|
|
|
switch (subdevice_id) { |
|
|
|
|
case IXGBE_SUBDEV_ID_82599_560FLR: |
|
|
|
|
/* only support first port */ |
|
|
|
|
if (hw->bus.func != 0) |
|
|
|
|
break; |
|
|
|
|
case IXGBE_SUBDEV_ID_82599_SFP: |
|
|
|
|
is_wol_supported = 1; |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
case IXGBE_DEV_ID_82599_COMBO_BACKPLANE: |
|
|
|
|
/* All except this subdevice support WOL */ |
|
|
|
|
if (subdevice_id != IXGBE_SUBDEV_ID_82599_KX4_KR_MEZZ) |
|
|
|
|
is_wol_supported = 1; |
|
|
|
|
break; |
|
|
|
|
case IXGBE_DEV_ID_82599_KX4: |
|
|
|
|
is_wol_supported = 1; |
|
|
|
|
break; |
|
|
|
|
case IXGBE_DEV_ID_X540T: |
|
|
|
|
/* check eeprom to see if enabled wol */ |
|
|
|
|
if ((wol_cap == IXGBE_DEVICE_CAPS_WOL_PORT0_1) || |
|
|
|
|
((wol_cap == IXGBE_DEVICE_CAPS_WOL_PORT0) && |
|
|
|
|
(hw->bus.func == 0))) { |
|
|
|
|
is_wol_supported = 1; |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return is_wol_supported; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* ixgbe_probe - Device Initialization Routine |
|
|
|
|
* @pdev: PCI device information struct |
|
|
|
@ -6811,7 +6862,6 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, |
|
|
|
|
u16 device_caps; |
|
|
|
|
#endif |
|
|
|
|
u32 eec; |
|
|
|
|
u16 wol_cap; |
|
|
|
|
|
|
|
|
|
/* Catch broken hardware that put the wrong VF device ID in
|
|
|
|
|
* the PCIe SR-IOV capability. |
|
|
|
@ -7075,40 +7125,12 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, |
|
|
|
|
netdev->features &= ~NETIF_F_RXHASH; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* WOL not supported for all but the following */ |
|
|
|
|
/* WOL not supported for all devices */ |
|
|
|
|
adapter->wol = 0; |
|
|
|
|
switch (pdev->device) { |
|
|
|
|
case IXGBE_DEV_ID_82599_SFP: |
|
|
|
|
/* Only these subdevice supports WOL */ |
|
|
|
|
switch (pdev->subsystem_device) { |
|
|
|
|
case IXGBE_SUBDEV_ID_82599_560FLR: |
|
|
|
|
/* only support first port */ |
|
|
|
|
if (hw->bus.func != 0) |
|
|
|
|
break; |
|
|
|
|
case IXGBE_SUBDEV_ID_82599_SFP: |
|
|
|
|
adapter->wol = IXGBE_WUFC_MAG; |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
case IXGBE_DEV_ID_82599_COMBO_BACKPLANE: |
|
|
|
|
/* All except this subdevice support WOL */ |
|
|
|
|
if (pdev->subsystem_device != IXGBE_SUBDEV_ID_82599_KX4_KR_MEZZ) |
|
|
|
|
adapter->wol = IXGBE_WUFC_MAG; |
|
|
|
|
break; |
|
|
|
|
case IXGBE_DEV_ID_82599_KX4: |
|
|
|
|
hw->eeprom.ops.read(hw, 0x2c, &adapter->eeprom_cap); |
|
|
|
|
if (ixgbe_wol_supported(adapter, pdev->device, pdev->subsystem_device)) |
|
|
|
|
adapter->wol = IXGBE_WUFC_MAG; |
|
|
|
|
break; |
|
|
|
|
case IXGBE_DEV_ID_X540T: |
|
|
|
|
/* Check eeprom to see if it is enabled */ |
|
|
|
|
hw->eeprom.ops.read(hw, 0x2c, &adapter->eeprom_cap); |
|
|
|
|
wol_cap = adapter->eeprom_cap & IXGBE_DEVICE_CAPS_WOL_MASK; |
|
|
|
|
|
|
|
|
|
if ((wol_cap == IXGBE_DEVICE_CAPS_WOL_PORT0_1) || |
|
|
|
|
((wol_cap == IXGBE_DEVICE_CAPS_WOL_PORT0) && |
|
|
|
|
(hw->bus.func == 0))) |
|
|
|
|
adapter->wol = IXGBE_WUFC_MAG; |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol); |
|
|
|
|
|
|
|
|
|
/* save off EEPROM version number */ |
|
|
|
|