Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183965
b: refs/heads/master
c: f8f76db
h: refs/heads/master
i:
  183963: a694f43
v: v3
  • Loading branch information
Jiri Pirko authored and David S. Miller committed Feb 4, 2010
1 parent 43117a2 commit 5185989
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6683ece36e3531fc8c75f69e7165c5f20930be88
refs/heads/master: f8f76db1db369f3a130ac3fd33e2eee5f1610d9c
16 changes: 16 additions & 0 deletions trunk/drivers/net/phy/phy_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,22 @@ int phy_device_register(struct phy_device *phydev)
}
EXPORT_SYMBOL(phy_device_register);

/**
* phy_find_first - finds the first PHY device on the bus
* @bus: the target MII bus
*/
struct phy_device *phy_find_first(struct mii_bus *bus)
{
int addr;

for (addr = 0; addr < PHY_MAX_ADDR; addr++) {
if (bus->phy_map[addr])
return bus->phy_map[addr];
}
return NULL;
}
EXPORT_SYMBOL(phy_find_first);

/**
* phy_prepare_link - prepares the PHY layer to monitor link status
* @phydev: target phy_device struct
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/phy.h
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,7 @@ int phy_attach_direct(struct net_device *dev, struct phy_device *phydev,
u32 flags, phy_interface_t interface);
struct phy_device * phy_attach(struct net_device *dev,
const char *bus_id, u32 flags, phy_interface_t interface);
struct phy_device *phy_find_first(struct mii_bus *bus);
int phy_connect_direct(struct net_device *dev, struct phy_device *phydev,
void (*handler)(struct net_device *), u32 flags,
phy_interface_t interface);
Expand Down

0 comments on commit 5185989

Please sign in to comment.