summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/phy/mdio_bus.c3
-rw-r--r--include/linux/phy.h3
2 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
index ad93b0da87f..5eab9c42a11 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))
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 72cb67b66e0..92a9696fdeb 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -72,6 +72,9 @@ struct mii_bus {
/* list of all PHYs on bus */
struct phy_device *phy_map[PHY_MAX_ADDR];
+ /* Phy addresses to be ignored when probing */
+ u32 phy_mask;
+
/* Pointer to an array of interrupts, each PHY's
* interrupt at the index matching its address */
int *irq;