igb: support wol on second port
authorAlexander Duyck <alexander.h.duyck@intel.com>
Fri, 13 Mar 2009 20:41:17 +0000 (20:41 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 14 Mar 2009 19:41:03 +0000 (12:41 -0700)
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: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/igb/e1000_defines.h
drivers/net/igb/igb_main.c

index 62e378b64611a5aae775435ea6348eb6c46c2bbb..ad2d319d0f8be731579a435de45618beba376b92 100644 (file)
 #define NVM_ID_LED_SETTINGS        0x0004
 /* For SERDES output amplitude adjustment. */
 #define NVM_INIT_CONTROL2_REG      0x000F
+#define NVM_INIT_CONTROL3_PORT_B   0x0014
 #define NVM_INIT_CONTROL3_PORT_A   0x0024
 #define NVM_ALT_MAC_ADDR_PTR       0x0037
 #define NVM_CHECKSUM_REG           0x003F
index 5277d56e989edbcfb6c9a1aab96183d7ffb530c4..f0c3a01452c81c080ae78bd3861f8ea2c3898937 100644 (file)
@@ -1351,9 +1351,10 @@ static int __devinit igb_probe(struct pci_dev *pdev,
         * enable the ACPI Magic Packet filter
         */
 
-       if (hw->bus.func == 0 ||
-           hw->device_id == E1000_DEV_ID_82575EB_COPPER)
+       if (hw->bus.func == 0)
                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)
                adapter->eeprom_wol |= E1000_WUFC_MAG;