[ar71xx] experimental support for the Planex MZK-W04NU board
[openwrt.git] / target / linux / generic-2.6 / patches-2.6.23 / 610-phy_detect.patch
1 --- a/drivers/net/phy/mdio_bus.c
2 +++ b/drivers/net/phy/mdio_bus.c
3 @@ -131,6 +131,9 @@
4 struct phy_device *phydev = to_phy_device(dev);
5 struct phy_driver *phydrv = to_phy_driver(drv);
6
7 + if (phydrv->detect)
8 + return (phydrv->detect(phydev->bus, phydev->addr));
9 +
10 return ((phydrv->phy_id & phydrv->phy_id_mask) ==
11 (phydev->phy_id & phydrv->phy_id_mask));
12 }
13 --- a/include/linux/phy.h
14 +++ b/include/linux/phy.h
15 @@ -319,6 +319,11 @@
16 u32 features;
17 u32 flags;
18
19 + /* Called during discovery to test if the
20 + * device can attach to the bus, even if
21 + * phy id and mask do not match */
22 + bool (*detect)(struct mii_bus *bus, int addr);
23 +
24 /* Called to initialize the PHY,
25 * including after a reset */
26 int (*config_init)(struct phy_device *phydev);
This page took 0.039118 seconds and 5 git commands to generate.