summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVipin KUMAR <vipin.kumar@st.com>2012-03-26 00:09:54 +0000
committerJoe Hershberger <joe.hershberger@ni.com>2012-04-04 10:46:59 -0500
commit024333c96fecb698efe703e01f2326c1256114a4 (patch)
tree83bf62a814498800c4999e261293521111d4c0d5
parent97a6caa6e5429082d4daf689cfa355b6d8ddb2f3 (diff)
downloadu-boot-imx-024333c96fecb698efe703e01f2326c1256114a4.zip
u-boot-imx-024333c96fecb698efe703e01f2326c1256114a4.tar.gz
u-boot-imx-024333c96fecb698efe703e01f2326c1256114a4.tar.bz2
net/designware: Phy address fix
The code assumes the phy address to be > 0, which is not true, the phy address can be in the range 0-31. Signed-off-by: Vipin Kumar <vipin.kumar@st.com> Signed-off-by: Amit Virdi <amit.virdi@st.com>
-rw-r--r--drivers/net/designware.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index ea8a406..fc14b70 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -384,7 +384,7 @@ static int configure_phy(struct eth_device *dev)
#if defined(CONFIG_DW_SEARCH_PHY)
phy_addr = find_phy(dev);
- if (phy_addr > 0)
+ if (phy_addr >= 0)
priv->address = phy_addr;
else
return -1;