Skip to contentSkip to conversation

cxgb3: set phy's mdio dev before the phy init sequence

PATCH Applied Divy Le Ray 2 participants 2 messages May 21, 2009

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

PATCH 1/1 cxgb3: set phy's mdio dev before the phy init sequence

From: Divy Le Ray <[email protected]>

mdio's dev field needs to be set before mdio ops occur.

---

 drivers/net/cxgb3/t3_hw.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/cxgb3/t3_hw.c +1 -1
index c8a865a..7e502ff 100644
@@ -3864,11 +3864,11 @@ int t3_prep_adapter(struct adapter *adapter, const struct adapter_info *ai,
 			return -EINVAL;
 		}
 
+		p->phy.mdio.dev = adapter->port[i];
 		ret = pti->phy_prep(&p->phy, adapter, ai->phy_base_addr + j,
 				    ai->mdio_ops);
 		if (ret)
 			return ret;
-		p->phy.mdio.dev = adapter->port[i];
 		mac_prep(&p->mac, adapter, j);
 
 		/*