All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, gospo@redhat.com,
	Alexander Duyck <alexander.h.duyck@intel.com>,
	Jesse Brandeburg <jesse.brandeburg@intel.com>,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next PATCH 4/8] igb: support wol on second port
Date: Fri, 13 Mar 2009 23:41:17 -0700	[thread overview]
Message-ID: <20090314064117.4052.33684.stgit@lost.foo-projects.org> (raw)
In-Reply-To: <20090314064020.4052.46249.stgit@lost.foo-projects.org>

From: Alexander Duyck <alexander.h.duyck@intel.com>

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>
---

 drivers/net/igb/e1000_defines.h |    1 +
 drivers/net/igb/igb_main.c      |    5 +++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/igb/e1000_defines.h b/drivers/net/igb/e1000_defines.h
index 62e378b..ad2d319 100644
--- a/drivers/net/igb/e1000_defines.h
+++ b/drivers/net/igb/e1000_defines.h
@@ -512,6 +512,7 @@
 #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
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index d83d30e..4e2cb82 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -1329,9 +1329,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;


  parent reply	other threads:[~2009-03-14  6:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-14  6:40 [net-next PATCH 1/8] igb: switch to new dca API Jeff Kirsher
2009-03-14  6:40 ` [net-next PATCH 2/8] igb: remove netif running call from igb_poll Jeff Kirsher
2009-03-14  6:40 ` [net-next PATCH 3/8] igb: resolve warning of unused adapter struct Jeff Kirsher
2009-03-14  6:41 ` Jeff Kirsher [this message]
2009-03-14  6:41 ` [net-next PATCH 5/8] igb: add PF to pool Jeff Kirsher
2009-03-14  6:41 ` [net-next PATCH 6/8] igb: correct typo that was setting vfta mask to 1 Jeff Kirsher
2009-03-14  6:42 ` [net-next PATCH 7/8] igb: add support for another dual port 82576 non-security nic Jeff Kirsher
2009-03-14  6:42 ` [net-next PATCH 8/8] igb: add support for 82576 quad copper adapter Jeff Kirsher
2009-03-14 19:51 ` [net-next PATCH 1/8] igb: switch to new dca API David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090314064117.4052.33684.stgit@lost.foo-projects.org \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=alexander.h.duyck@intel.com \
    --cc=davem@davemloft.net \
    --cc=gospo@redhat.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.