Skip to contentSkip to conversation

igb: set lan id prior to configuring phy

PATCH Applied Jeff Kirsher 2 participants 2 messages Jul 7, 2009 – Jul 8, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 igb: set lan id prior to configuring phy

From: Alexander Duyck <[email protected]>

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.

---

 drivers/net/igb/e1000_82575.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/net/igb/e1000_82575.c +4 -0
index efd9be2..ac28dd5 100644
@@ -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)
maintainer Applied
#1 lore raw

From: Jeff Kirsher <[email protected]>
Date: Tue, 07 Jul 2009 16:01:55 -0700

Quoted 9 lines

From: Alexander Duyck <[email protected]>

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.

Applied to net-2.6