summaryrefslogtreecommitdiffstats
path: root/drivers/net/cpsw.c
diff options
context:
space:
mode:
authorHeiko Schocher <hs@denx.de>2013-07-23 15:32:36 +0200
committerTom Rini <trini@ti.com>2013-07-30 09:21:42 -0400
commitf6d1f6e4a58edae4776937647381a43fea5e83a5 (patch)
treee9c2f7d57da0fb9740a105357f136cc25b12d706 /drivers/net/cpsw.c
parent486da22967474f3f72717883a4315fda46346897 (diff)
downloadtalos-obmc-uboot-f6d1f6e4a58edae4776937647381a43fea5e83a5.tar.gz
talos-obmc-uboot-f6d1f6e4a58edae4776937647381a43fea5e83a5.zip
net, phy, cpsw: fix gigabit register access
accessing a lan9303 switch with the cpsw driver results in wrong speed detection, as the switch sets the BMSR_ERCAP in BMSR register, and follow read of the MII_STAT1000 register fails, as the switch does not support it. Current code did not check, if a phy_read() fails ... fix this. Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Joe Hershberger <joe.hershberger@gmail.com> Acked-by: Mugunthan V N <mugunthanvnm@ti.com> Signed-off-by: Tom Rini <trini@ti.com>
Diffstat (limited to 'drivers/net/cpsw.c')
-rw-r--r--drivers/net/cpsw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/cpsw.c b/drivers/net/cpsw.c
index f1e9f720a7..9bab71a212 100644
--- a/drivers/net/cpsw.c
+++ b/drivers/net/cpsw.c
@@ -487,7 +487,7 @@ static inline void wait_for_idle(void)
static int cpsw_mdio_read(struct mii_dev *bus, int phy_id,
int dev_addr, int phy_reg)
{
- unsigned short data;
+ int data;
u32 reg;
if (phy_reg & ~PHY_REG_MASK || phy_id & ~PHY_ID_MASK)
OpenPOWER on IntegriCloud