Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 314687
b: refs/heads/master
c: a30e2c1
h: refs/heads/master
i:
  314685: 1bf5d5d
  314683: 899805a
  314679: ed65172
  314671: 20d6fae
  314655: 331bd25
  314623: 6498535
v: v3
  • Loading branch information
David Daney authored and David S. Miller committed Jun 28, 2012
1 parent eefa49f commit 4f1be06
Show file tree
Hide file tree
Showing 3 changed files with 14 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: 6bd47ac2e434611e52027155438d7b4ad3c76bdb
refs/heads/master: a30e2c1891296b5ee8de48430a07fdf8b818c661
7 changes: 7 additions & 0 deletions trunk/drivers/net/phy/mdio_bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/of_device.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
Expand Down Expand Up @@ -308,6 +309,12 @@ static int mdio_bus_match(struct device *dev, struct device_driver *drv)
struct phy_device *phydev = to_phy_device(dev);
struct phy_driver *phydrv = to_phy_driver(drv);

if (of_driver_match_device(dev, drv))
return 1;

if (phydrv->match_phy_device)
return phydrv->match_phy_device(phydev);

return ((phydrv->phy_id & phydrv->phy_id_mask) ==
(phydev->phy_id & phydrv->phy_id_mask));
}
Expand Down
6 changes: 6 additions & 0 deletions trunk/include/linux/phy.h
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,12 @@ struct phy_driver {
/* Clears up any memory if needed */
void (*remove)(struct phy_device *phydev);

/* Returns true if this is a suitable driver for the given
* phydev. If NULL, matching is based on phy_id and
* phy_id_mask.
*/
int (*match_phy_device)(struct phy_device *phydev);

/* Handles ethtool queries for hardware time stamping. */
int (*ts_info)(struct phy_device *phydev, struct ethtool_ts_info *ti);

Expand Down

0 comments on commit 4f1be06

Please sign in to comment.