netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-2.6 PATCH] igb: set lan id prior to configuring phy
@ 2009-07-07 23:01 Jeff Kirsher
  2009-07-08  2:13 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Jeff Kirsher @ 2009-07-07 23:01 UTC (permalink / raw)
  To: davem; +Cc: netdev, gospo, Alexander Duyck, Jeff Kirsher

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

The igb driver was defaulting to using the lock for pci-e function 0 for
all of the phys due to the fact that the lan id was not being set prior to
initialization.  This change makes it so that the function id is set prior
to checking for the phy id.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 drivers/net/igb/e1000_82575.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/net/igb/e1000_82575.c b/drivers/net/igb/e1000_82575.c
index efd9be2..ac28dd5 100644
--- a/drivers/net/igb/e1000_82575.c
+++ b/drivers/net/igb/e1000_82575.c
@@ -190,6 +190,10 @@ static s32 igb_get_invariants_82575(struct e1000_hw *hw)
 		phy->ops.write_reg          = igb_write_phy_reg_igp;
 	}
 
+	/* set lan id */
+	hw->bus.func = (rd32(E1000_STATUS) & E1000_STATUS_FUNC_MASK) >>
+	               E1000_STATUS_FUNC_SHIFT;
+
 	/* Set phy->phy_addr and phy->id. */
 	ret_val = igb_get_phy_id_82575(hw);
 	if (ret_val)


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [net-2.6 PATCH] igb: set lan id prior to configuring phy
  2009-07-07 23:01 [net-2.6 PATCH] igb: set lan id prior to configuring phy Jeff Kirsher
@ 2009-07-08  2:13 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2009-07-08  2:13 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, gospo, alexander.h.duyck

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Tue, 07 Jul 2009 16:01:55 -0700

> From: Alexander Duyck <alexander.h.duyck@intel.com>
> 
> The igb driver was defaulting to using the lock for pci-e function 0 for
> all of the phys due to the fact that the lan id was not being set prior to
> initialization.  This change makes it so that the function id is set prior
> to checking for the phy id.
> 
> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

Applied to net-2.6

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-07-08  2:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-07 23:01 [net-2.6 PATCH] igb: set lan id prior to configuring phy Jeff Kirsher
2009-07-08  2:13 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).