diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2013-02-08 10:13:49 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-12-11 12:32:20 +0100 |
commit | bfc9a6985c13f3159cf7a867fe7e695983e0c269 (patch) | |
tree | 89ce6d7fc42428e3ff198cd4e4f4238b4f09b8ab /include | |
parent | 5200678e86f76de80abbad52eb49a6a9ea8081f1 (diff) | |
download | barebox-bfc9a6985c13f3159cf7a867fe7e695983e0c269.tar.gz barebox-bfc9a6985c13f3159cf7a867fe7e695983e0c269.tar.xz |
net: phy: Track mii buses on a list
To be able to iterate over registered mii buses
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/phy.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/phy.h b/include/linux/phy.h index 19e4d20662..5f3b33f66a 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -85,6 +85,8 @@ struct mii_bus { /* PHY addresses to be ignored when probing */ u32 phy_mask; + + struct list_head list; }; #define to_mii_bus(d) container_of(d, struct mii_bus, dev) @@ -92,6 +94,11 @@ int mdiobus_register(struct mii_bus *bus); void mdiobus_unregister(struct mii_bus *bus); struct phy_device *mdiobus_scan(struct mii_bus *bus, int addr); +extern struct list_head mii_bus_list; + +#define for_each_mii_bus(mii) \ + list_for_each_entry(mii, &mii_bus_list, list) + /** * mdiobus_read - Convenience function for reading a given MII mgmt register * @bus: the mii_bus struct |