|
@@ -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>
|
|
@@ -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));
|
|
|
}
|