summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/ti
diff options
context:
space:
mode:
authorAnatolij Gustschin <agust@denx.de>2012-04-23 12:06:43 +0000
committerDavid S. Miller <davem@davemloft.net>2012-04-24 00:43:55 -0400
commit1ab8be4a14409c55050db69271631afebac29b5a (patch)
treebfa51cb6cc51ccd8b60d9359097833ce6553db35 /drivers/net/ethernet/ti
parentc2f1244b86492b6cc89202f3f9ed43c88fb3e79d (diff)
downloadblackbird-op-linux-1ab8be4a14409c55050db69271631afebac29b5a.tar.gz
blackbird-op-linux-1ab8be4a14409c55050db69271631afebac29b5a.zip
net/davinci_emac: fix failing PHY connect attempts
PHY connect attempts fail if no PHY id is specified in the emac platform data and another mdio bus has been registered before 'davinci_mdio' bus. In this case when configuring the interface, there will be an attempt to connect to already attached PHY on the previously registered mdio bus: net eth1: PHY already attached net eth1: could not connect to phy smsc911x-0:01 IP-Config: Failed to open eth1 IP-Config: Device `eth1' not found Fix this by modifying match_first_device() to match first PHY device on 'davinci_mdio' bus. Signed-off-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ti')
-rw-r--r--drivers/net/ethernet/ti/davinci_emac.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/ti/davinci_emac.c b/drivers/net/ethernet/ti/davinci_emac.c
index 174a3348f676..08aff1a2087c 100644
--- a/drivers/net/ethernet/ti/davinci_emac.c
+++ b/drivers/net/ethernet/ti/davinci_emac.c
@@ -1511,7 +1511,7 @@ static int emac_devioctl(struct net_device *ndev, struct ifreq *ifrq, int cmd)
static int match_first_device(struct device *dev, void *data)
{
- return 1;
+ return !strncmp(dev_name(dev), "davinci_mdio", 12);
}
/**
OpenPOWER on IntegriCloud