diff options
author | Divy Le Ray <divy@chelsio.com> | 2009-05-20 17:56:12 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-05-21 05:51:59 +0200 |
commit | 703cebabd173a7fe533d6f21df0347b1f2a9a1e1 (patch) | |
tree | cea9c6a7b8b5a4e733a3b2d6366cdcbbfedc8f49 /drivers/net/chelsio/mv88e1xxx.c | |
parent | cxgb3: set phy's mdio dev before the phy init sequence (diff) | |
download | linux-703cebabd173a7fe533d6f21df0347b1f2a9a1e1.tar.xz linux-703cebabd173a7fe533d6f21df0347b1f2a9a1e1.zip |
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/mv88e1xxx.c')
-rw-r--r-- | drivers/net/chelsio/mv88e1xxx.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/chelsio/mv88e1xxx.c b/drivers/net/chelsio/mv88e1xxx.c index 0632be0d6494..809047a99e96 100644 --- a/drivers/net/chelsio/mv88e1xxx.c +++ b/drivers/net/chelsio/mv88e1xxx.c @@ -353,15 +353,16 @@ static struct cphy_ops mv88e1xxx_ops = { .get_link_status = mv88e1xxx_get_link_status, }; -static struct cphy *mv88e1xxx_phy_create(adapter_t *adapter, int phy_addr, +static struct cphy *mv88e1xxx_phy_create(struct net_device *dev, int phy_addr, const struct mdio_ops *mdio_ops) { + struct adapter *adapter = netdev_priv(dev); struct cphy *cphy = kzalloc(sizeof(*cphy), GFP_KERNEL); if (!cphy) return NULL; - cphy_init(cphy, adapter, phy_addr, &mv88e1xxx_ops, mdio_ops); + cphy_init(cphy, dev, phy_addr, &mv88e1xxx_ops, mdio_ops); /* Configure particular PHY's to run in a different mode. */ if ((board_info(adapter)->caps & SUPPORTED_TP) && |