Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a2cf8b6c authored by Alexander Duyck's avatar Alexander Duyck Committed by David S. Miller
Browse files

igb: support wol on second port



We need to support wol on the second port for situations such as when the
lan ports are on the motherboard itself.

Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
Acked-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bd38e5d1
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -512,6 +512,7 @@
#define NVM_ID_LED_SETTINGS        0x0004
#define NVM_ID_LED_SETTINGS        0x0004
/* For SERDES output amplitude adjustment. */
/* For SERDES output amplitude adjustment. */
#define NVM_INIT_CONTROL2_REG      0x000F
#define NVM_INIT_CONTROL2_REG      0x000F
#define NVM_INIT_CONTROL3_PORT_B   0x0014
#define NVM_INIT_CONTROL3_PORT_A   0x0024
#define NVM_INIT_CONTROL3_PORT_A   0x0024
#define NVM_ALT_MAC_ADDR_PTR       0x0037
#define NVM_ALT_MAC_ADDR_PTR       0x0037
#define NVM_CHECKSUM_REG           0x003F
#define NVM_CHECKSUM_REG           0x003F
+3 −2
Original line number Original line Diff line number Diff line
@@ -1351,9 +1351,10 @@ static int __devinit igb_probe(struct pci_dev *pdev,
	 * enable the ACPI Magic Packet filter
	 * enable the ACPI Magic Packet filter
	 */
	 */


	if (hw->bus.func == 0 ||
	if (hw->bus.func == 0)
	    hw->device_id == E1000_DEV_ID_82575EB_COPPER)
		hw->nvm.ops.read(hw, NVM_INIT_CONTROL3_PORT_A, 1, &eeprom_data);
		hw->nvm.ops.read(hw, NVM_INIT_CONTROL3_PORT_A, 1, &eeprom_data);
	else if (hw->bus.func == 1)
		hw->nvm.ops.read(hw, NVM_INIT_CONTROL3_PORT_B, 1, &eeprom_data);


	if (eeprom_data & eeprom_apme_mask)
	if (eeprom_data & eeprom_apme_mask)
		adapter->eeprom_wol |= E1000_WUFC_MAG;
		adapter->eeprom_wol |= E1000_WUFC_MAG;