aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/chelsio/mv88e1xxx.c
diff options
context:
space:
mode:
authorDivy Le Ray <divy@chelsio.com>2009-05-20 15:56:12 +0000
committerDavid S. Miller <davem@davemloft.net>2009-05-20 20:51:59 -0700
commit703cebabd173a7fe533d6f21df0347b1f2a9a1e1 (patch)
treecea9c6a7b8b5a4e733a3b2d6366cdcbbfedc8f49 /drivers/net/chelsio/mv88e1xxx.c
parentcxgb3: set phy's mdio dev before the phy init sequence (diff)
downloadlinux-dev-703cebabd173a7fe533d6f21df0347b1f2a9a1e1.tar.xz
linux-dev-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.c5
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) &&