diff options
author | Divy Le Ray <divy@chelsio.com> | 2009-05-20 15:56:12 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-05-20 20:51:59 -0700 |
commit | 703cebabd173a7fe533d6f21df0347b1f2a9a1e1 (patch) | |
tree | cea9c6a7b8b5a4e733a3b2d6366cdcbbfedc8f49 /drivers/net/chelsio/cphy.h | |
parent | 86c890ab1b183f8f17ce03c24b62c564e95f957f (diff) | |
download | kernel_samsung_smdk4412-703cebabd173a7fe533d6f21df0347b1f2a9a1e1.zip kernel_samsung_smdk4412-703cebabd173a7fe533d6f21df0347b1f2a9a1e1.tar.gz kernel_samsung_smdk4412-703cebabd173a7fe533d6f21df0347b1f2a9a1e1.tar.bz2 |
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/cphy.h')
-rw-r--r-- | drivers/net/chelsio/cphy.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/chelsio/cphy.h b/drivers/net/chelsio/cphy.h index 8b5165a..1f095a9 100644 --- a/drivers/net/chelsio/cphy.h +++ b/drivers/net/chelsio/cphy.h @@ -137,10 +137,11 @@ static inline int simple_mdio_write(struct cphy *cphy, int reg, } /* Convenience initializer */ -static inline void cphy_init(struct cphy *phy, adapter_t *adapter, +static inline void cphy_init(struct cphy *phy, struct net_device *dev, int phy_addr, struct cphy_ops *phy_ops, const struct mdio_ops *mdio_ops) { + struct adapter *adapter = netdev_priv(dev); phy->adapter = adapter; phy->ops = phy_ops; if (mdio_ops) { @@ -150,12 +151,13 @@ static inline void cphy_init(struct cphy *phy, adapter_t *adapter, phy->mdio.mdio_read = mdio_ops->read; phy->mdio.mdio_write = mdio_ops->write; } + phy->mdio.dev = dev; } /* Operations of the PHY-instance factory */ struct gphy { /* Construct a PHY instance with the given PHY address */ - struct cphy *(*create)(adapter_t *adapter, int phy_addr, + struct cphy *(*create)(struct net_device *dev, int phy_addr, const struct mdio_ops *mdio_ops); /* |