phy: Add an mdio_device structure
Not all devices attached to an MDIO bus are phys. So add an mdio_device structure to represent the generic parts of an mdio device, and place this structure into the phy_device. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
e7f4dc3536
commit
e5a03bfd87
@@ -2305,7 +2305,7 @@ static int b44_register_phy_one(struct b44 *bp)
|
||||
|
||||
bp->phydev = phydev;
|
||||
bp->old_link = 0;
|
||||
bp->phy_addr = phydev->addr;
|
||||
bp->phy_addr = phydev->mdio.addr;
|
||||
|
||||
phy_attached_info(phydev);
|
||||
|
||||
|
@@ -401,7 +401,7 @@ int bcmgenet_mii_probe(struct net_device *dev)
|
||||
* Ethernet MAC ISRs
|
||||
*/
|
||||
if (priv->internal_phy)
|
||||
priv->mii_bus->irq[phydev->addr] = PHY_IGNORE_INTERRUPT;
|
||||
priv->mii_bus->irq[phydev->mdio.addr] = PHY_IGNORE_INTERRUPT;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@@ -2366,8 +2366,8 @@ static int sbmac_mii_probe(struct net_device *dev)
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
phy_dev = phy_connect(dev, dev_name(&phy_dev->dev), &sbmac_mii_poll,
|
||||
PHY_INTERFACE_MODE_GMII);
|
||||
phy_dev = phy_connect(dev, dev_name(&phy_dev->mdio.dev),
|
||||
&sbmac_mii_poll, PHY_INTERFACE_MODE_GMII);
|
||||
if (IS_ERR(phy_dev)) {
|
||||
printk(KERN_ERR "%s: could not attach to PHY\n", dev->name);
|
||||
return PTR_ERR(phy_dev);
|
||||
|
Reference in New Issue
Block a user