projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[ar71xx] ag71xx driver: handle TX timout
[openwrt.git]
/
target
/
linux
/
ar71xx
/
files
/
drivers
/
net
/
ag71xx
/
ag71xx_mdio.c
diff --git
a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_mdio.c
b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_mdio.c
index
b58d3cb
..
01888f1
100644
(file)
--- a/
target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_mdio.c
+++ b/
target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_mdio.c
@@
-50,7
+50,7
@@
static int ag71xx_mdio_mii_read(struct ag71xx_mdio *am, int addr, int reg)
ag71xx_mdio_wr(am, AG71XX_REG_MII_CMD, MII_CMD_WRITE);
ag71xx_mdio_wr(am, AG71XX_REG_MII_ADDR,
ag71xx_mdio_wr(am, AG71XX_REG_MII_CMD, MII_CMD_WRITE);
ag71xx_mdio_wr(am, AG71XX_REG_MII_ADDR,
- ((addr & 0xff) << MII_ADDR_S) | (reg & 0xff));
+ ((addr & 0xff) << MII_ADDR_S
HIFT
) | (reg & 0xff));
ag71xx_mdio_wr(am, AG71XX_REG_MII_CMD, MII_CMD_READ);
i = AG71XX_MDIO_RETRY;
ag71xx_mdio_wr(am, AG71XX_REG_MII_CMD, MII_CMD_READ);
i = AG71XX_MDIO_RETRY;
@@
-69,7
+69,7
@@
static int ag71xx_mdio_mii_read(struct ag71xx_mdio *am, int addr, int reg)
DBG("mii_read: addr=%04x, reg=%04x, value=%04x\n", addr, reg, ret);
DBG("mii_read: addr=%04x, reg=%04x, value=%04x\n", addr, reg, ret);
-out:
+
out:
return ret;
}
return ret;
}
@@
-81,7
+81,7
@@
static void ag71xx_mdio_mii_write(struct ag71xx_mdio *am,
DBG("mii_write: addr=%04x, reg=%04x, value=%04x\n", addr, reg, val);
ag71xx_mdio_wr(am, AG71XX_REG_MII_ADDR,
DBG("mii_write: addr=%04x, reg=%04x, value=%04x\n", addr, reg, val);
ag71xx_mdio_wr(am, AG71XX_REG_MII_ADDR,
- ((addr & 0xff) << MII_ADDR_S) | (reg & 0xff));
+ ((addr & 0xff) << MII_ADDR_S
HIFT
) | (reg & 0xff));
ag71xx_mdio_wr(am, AG71XX_REG_MII_CTRL, val);
i = AG71XX_MDIO_RETRY;
ag71xx_mdio_wr(am, AG71XX_REG_MII_CTRL, val);
i = AG71XX_MDIO_RETRY;
@@
-159,13
+159,9
@@
static int __init ag71xx_mdio_probe(struct platform_device *pdev)
am->mii_bus.write = ag71xx_mdio_write;
am->mii_bus.reset = ag71xx_mdio_reset;
am->mii_bus.irq = am->mii_irq;
am->mii_bus.write = ag71xx_mdio_write;
am->mii_bus.reset = ag71xx_mdio_reset;
am->mii_bus.irq = am->mii_irq;
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26))
- am->mii_bus.id = 0;
-#else
- snprintf(am->mii_bus.id, MII_BUS_ID_SIZE, "%x", 0);
-#endif
am->mii_bus.priv = am;
am->mii_bus.dev = &pdev->dev;
am->mii_bus.priv = am;
am->mii_bus.dev = &pdev->dev;
+ snprintf(am->mii_bus.id, MII_BUS_ID_SIZE, "%x", 0);
pdata = pdev->dev.platform_data;
if (pdata)
pdata = pdev->dev.platform_data;
if (pdata)
@@
-184,11
+180,11
@@
static int __init ag71xx_mdio_probe(struct platform_device *pdev)
ag71xx_mdio_bus = am;
return 0;
ag71xx_mdio_bus = am;
return 0;
-err_iounmap:
+
err_iounmap:
iounmap(am->mdio_base);
iounmap(am->mdio_base);
-err_free_mdio:
+
err_free_mdio:
kfree(am);
kfree(am);
-err_out:
+
err_out:
return err;
}
return err;
}
This page took
0.021884 seconds
and
4
git commands to generate.