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>
This commit is contained in:
committed by
David S. Miller
parent
86c890ab1b
commit
703cebabd1
@@ -1135,14 +1135,13 @@ int __devinit t1_init_sw_modules(adapter_t *adapter,
|
||||
struct cmac *mac;
|
||||
int phy_addr = bi->mdio_phybaseaddr + i;
|
||||
|
||||
adapter->port[i].phy = bi->gphy->create(adapter, phy_addr,
|
||||
bi->mdio_ops);
|
||||
adapter->port[i].phy = bi->gphy->create(adapter->port[i].dev,
|
||||
phy_addr, bi->mdio_ops);
|
||||
if (!adapter->port[i].phy) {
|
||||
CH_ERR("%s: PHY %d initialization failed\n",
|
||||
adapter->name, i);
|
||||
goto error;
|
||||
}
|
||||
adapter->port[i].phy->mdio.dev = adapter->port[i].dev;
|
||||
|
||||
adapter->port[i].mac = mac = bi->gmac->create(adapter, i);
|
||||
if (!mac) {
|
||||
|
Reference in New Issue
Block a user