diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2007-06-28 20:26:06 +0200 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2007-06-28 20:26:06 +0200 |
commit | 5f708dd91d15876e26d7a57f97a255cedffca463 (patch) | |
tree | 5492646ee87a183a3c96446738bbe70cdb19b613 /drivers/net/phy/mdio_bus.c | |
parent | Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/... (diff) | |
download | linux-5f708dd91d15876e26d7a57f97a255cedffca463.tar.xz linux-5f708dd91d15876e26d7a57f97a255cedffca463.zip |
phy: Fix phy_id for Vitesse 824x PHY
The phy_id specified for the Vitesse 824x PHY would never match because
it was expecting bits to be set that would be masked by the phy_id_mask.
Fix the phy_id so it will match properly, and changed the mdio_bus_match
to mask both the driver and devices phy_id with the mask so we dont have
this issue in the future.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'drivers/net/phy/mdio_bus.c')
-rw-r--r-- | drivers/net/phy/mdio_bus.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c index fc4aee96cdfd..fc2f0e695a13 100644 --- a/drivers/net/phy/mdio_bus.c +++ b/drivers/net/phy/mdio_bus.c @@ -131,7 +131,8 @@ static int mdio_bus_match(struct device *dev, struct device_driver *drv) struct phy_device *phydev = to_phy_device(dev); struct phy_driver *phydrv = to_phy_driver(drv); - return (phydrv->phy_id == (phydev->phy_id & phydrv->phy_id_mask)); + return ((phydrv->phy_id & phydrv->phy_id_mask) == + (phydev->phy_id & phydrv->phy_id_mask)); } /* Suspend and resume. Copied from platform_suspend and |