Browse Source

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

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

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Divy Le Ray 16 years ago
parent
commit
86c890ab1b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/net/cxgb3/t3_hw.c

+ 1 - 1
drivers/net/cxgb3/t3_hw.c

@@ -3866,11 +3866,11 @@ int t3_prep_adapter(struct adapter *adapter, const struct adapter_info *ai,
 			return -EINVAL;
 			return -EINVAL;
 		}
 		}
 
 
+		p->phy.mdio.dev = adapter->port[i];
 		ret = pti->phy_prep(&p->phy, adapter, ai->phy_base_addr + j,
 		ret = pti->phy_prep(&p->phy, adapter, ai->phy_base_addr + j,
 				    ai->mdio_ops);
 				    ai->mdio_ops);
 		if (ret)
 		if (ret)
 			return ret;
 			return ret;
-		p->phy.mdio.dev = adapter->port[i];
 		mac_prep(&p->mac, adapter, j);
 		mac_prep(&p->mac, adapter, j);
 
 
 		/*
 		/*