[linux-yocto] [PATCH 18/89] drivers/net/ethernet: FEMAC Driver
Paul Butler
butler.paul at gmail.com
Sun Oct 27 12:32:43 PDT 2013
From: David Mercado <david.mercado at windriver.com>
The driver takes phy address as a parameter but ignores it, and instead
takes the first available phy in the address range. This patch allows
one to select a specific phy on boards that have multiple phys.
Signed-off-by: David Mercado <david.mercado at windriver.com>
---
drivers/net/ethernet/lsi/lsi_acp_net.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/net/ethernet/lsi/lsi_acp_net.c b/drivers/net/ethernet/lsi/lsi_acp_net.c
index 22578a6..a574656 100644
--- a/drivers/net/ethernet/lsi/lsi_acp_net.c
+++ b/drivers/net/ethernet/lsi/lsi_acp_net.c
@@ -3941,6 +3941,12 @@ static int appnic_mii_probe(struct net_device *dev)
struct phy_device *phydev = NULL;
int ret;
+ if (pdata->phy_address && (pdata->phy_address < PHY_MAX_ADDR)) {
+ phydev = pdata->mii_bus->phy_map[pdata->phy_address];
+ if (phydev)
+ goto skip_first;
+ }
+
/* Find the first phy */
phydev = phy_find_first(pdata->mii_bus);
if (!phydev) {
@@ -3948,6 +3954,8 @@ static int appnic_mii_probe(struct net_device *dev)
return -ENODEV;
}
+skip_first:
+
ret = phy_connect_direct(dev, phydev,
&appnic_handle_link_change, 0,
PHY_INTERFACE_MODE_MII);
--
1.8.3.4
More information about the linux-yocto
mailing list