aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/chelsio/mv88e1xxx.c
diff options
context:
space:
mode:
authorDivy Le Ray <divy@chelsio.com>2009-05-20 11:56:12 -0400
committerDavid S. Miller <davem@davemloft.net>2009-05-20 23:51:59 -0400
commit703cebabd173a7fe533d6f21df0347b1f2a9a1e1 (patch)
treecea9c6a7b8b5a4e733a3b2d6366cdcbbfedc8f49 /drivers/net/chelsio/mv88e1xxx.c
parent86c890ab1b183f8f17ce03c24b62c564e95f957f (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/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 = {
353 .get_link_status = mv88e1xxx_get_link_status, 353 .get_link_status = mv88e1xxx_get_link_status,
354}; 354};
355 355
356static struct cphy *mv88e1xxx_phy_create(adapter_t *adapter, int phy_addr, 356static struct cphy *mv88e1xxx_phy_create(struct net_device *dev, int phy_addr,
357 const struct mdio_ops *mdio_ops) 357 const struct mdio_ops *mdio_ops)
358{ 358{
359 struct adapter *adapter = netdev_priv(dev);
359 struct cphy *cphy = kzalloc(sizeof(*cphy), GFP_KERNEL); 360 struct cphy *cphy = kzalloc(sizeof(*cphy), GFP_KERNEL);
360 361
361 if (!cphy) 362 if (!cphy)
362 return NULL; 363 return NULL;
363 364
364 cphy_init(cphy, adapter, phy_addr, &mv88e1xxx_ops, mdio_ops); 365 cphy_init(cphy, dev, phy_addr, &mv88e1xxx_ops, mdio_ops);
365 366
366 /* Configure particular PHY's to run in a different mode. */ 367 /* Configure particular PHY's to run in a different mode. */
367 if ((board_info(adapter)->caps & SUPPORTED_TP) && 368 if ((board_info(adapter)->caps & SUPPORTED_TP) &&