diff options
author | Divy Le Ray <divy@chelsio.com> | 2009-05-20 11:56:12 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-05-20 23:51:59 -0400 |
commit | 703cebabd173a7fe533d6f21df0347b1f2a9a1e1 (patch) | |
tree | cea9c6a7b8b5a4e733a3b2d6366cdcbbfedc8f49 /drivers/net/chelsio/subr.c | |
parent | 86c890ab1b183f8f17ce03c24b62c564e95f957f (diff) |
cxgb: 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>
Diffstat (limited to 'drivers/net/chelsio/subr.c')
-rw-r--r-- | drivers/net/chelsio/subr.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/chelsio/subr.c b/drivers/net/chelsio/subr.c index 2564312b3056..17720c6e5bfe 100644 --- a/drivers/net/chelsio/subr.c +++ b/drivers/net/chelsio/subr.c | |||
@@ -1135,14 +1135,13 @@ int __devinit t1_init_sw_modules(adapter_t *adapter, | |||
1135 | struct cmac *mac; | 1135 | struct cmac *mac; |
1136 | int phy_addr = bi->mdio_phybaseaddr + i; | 1136 | int phy_addr = bi->mdio_phybaseaddr + i; |
1137 | 1137 | ||
1138 | adapter->port[i].phy = bi->gphy->create(adapter, phy_addr, | 1138 | adapter->port[i].phy = bi->gphy->create(adapter->port[i].dev, |
1139 | bi->mdio_ops); | 1139 | phy_addr, bi->mdio_ops); |
1140 | if (!adapter->port[i].phy) { | 1140 | if (!adapter->port[i].phy) { |
1141 | CH_ERR("%s: PHY %d initialization failed\n", | 1141 | CH_ERR("%s: PHY %d initialization failed\n", |
1142 | adapter->name, i); | 1142 | adapter->name, i); |
1143 | goto error; | 1143 | goto error; |
1144 | } | 1144 | } |
1145 | adapter->port[i].phy->mdio.dev = adapter->port[i].dev; | ||
1146 | 1145 | ||
1147 | adapter->port[i].mac = mac = bi->gmac->create(adapter, i); | 1146 | adapter->port[i].mac = mac = bi->gmac->create(adapter, i); |
1148 | if (!mac) { | 1147 | if (!mac) { |