summaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/mdio_bus.c
diff options
context:
space:
mode:
authorMatt Porter <mporter@kernel.crashing.org>2005-11-03 00:13:06 +0100
committerJeff Garzik <jgarzik@pobox.com>2005-11-05 20:40:55 +0100
commitf896424cbc61225e8f029fe23e5aae3e32103229 (patch)
treeabfc35832b8bbd3a66b38db6dfc5d6705103436f /drivers/net/phy/mdio_bus.c
parent[PATCH] pcnet32: Prevent hang with 79c976 (diff)
downloadlinux-f896424cbc61225e8f029fe23e5aae3e32103229.tar.xz
linux-f896424cbc61225e8f029fe23e5aae3e32103229.zip
[PATCH] phy address mask support for generic phy layer
Adds a phy_mask field to struct mii_bus and uses it. This field indicates each phy address to be ignored when probing the mdio bus. This support is needed for the fs_enet and ibm_emac drivers to be converted to the generic phy layer among other drivers. Many systems lock up on probing certain phy addresses or probing doesn't return 0xffff when nothing is found at the address. A new driver I'm working on also makes use of this mask. Signed-off-by: Matt Porter <mporter@kernel.crashing.org> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/phy/mdio_bus.c')
-rw-r--r--drivers/net/phy/mdio_bus.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
index ad93b0da87f0..5eab9c42a111 100644
--- a/drivers/net/phy/mdio_bus.c
+++ b/drivers/net/phy/mdio_bus.c
@@ -61,6 +61,9 @@ int mdiobus_register(struct mii_bus *bus)
for (i = 0; i < PHY_MAX_ADDR; i++) {
struct phy_device *phydev;
+ if (bus->phy_mask & (1 << i))
+ continue;
+
phydev = get_phy_device(bus, i);
if (IS_ERR(phydev))