aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/files/drivers
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2008-10-15 18:31:21 +0000
committerGabor Juhos <juhosg@openwrt.org>2008-10-15 18:31:21 +0000
commit1f385fa9cfd81f0ea22d34c7ed5ab848529bcf84 (patch)
treef2df5082fbfdc5f2b89f707b25603d2f6613ed21 /target/linux/ar71xx/files/drivers
parent215ed4cae6c145cb4afb7a87bd6b19b5bf217494 (diff)
downloadupstream-1f385fa9cfd81f0ea22d34c7ed5ab848529bcf84.tar.gz
upstream-1f385fa9cfd81f0ea22d34c7ed5ab848529bcf84.tar.bz2
upstream-1f385fa9cfd81f0ea22d34c7ed5ab848529bcf84.zip
[ar71xx] minor ethernet driver update
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12985 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/files/drivers')
-rw-r--r--target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h2
-rw-r--r--target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_phy.c16
2 files changed, 9 insertions, 9 deletions
diff --git a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h
index d2d055d556..2f60d19b5f 100644
--- a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h
+++ b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h
@@ -37,7 +37,7 @@
#define ETH_FCS_LEN 4
#define AG71XX_DRV_NAME "ag71xx"
-#define AG71XX_DRV_VERSION "0.4.1"
+#define AG71XX_DRV_VERSION "0.4.2"
#define AG71XX_NAPI_TX 1
diff --git a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_phy.c b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_phy.c
index 086de22291..512b42eb5c 100644
--- a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_phy.c
+++ b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_phy.c
@@ -193,8 +193,10 @@ void ag71xx_phy_start(struct ag71xx *ag)
if (ag->phy_dev) {
phy_start(ag->phy_dev);
} else {
- ag->duplex = DUPLEX_FULL;
- ag->speed = SPEED_100;
+ struct ag71xx_platform_data *pdata = ag71xx_get_pdata(ag);
+
+ ag->duplex = pdata->duplex;
+ ag->speed = pdata->speed;
ag->link = 1;
ag71xx_phy_link_update(ag);
}
@@ -220,8 +222,8 @@ int ag71xx_phy_connect(struct ag71xx *ag)
int phy_count = 0;
int phy_addr;
- if (ag->mii_bus) {
- /* TODO: use mutex of the mdio bus */
+ if (ag->mii_bus && pdata->phy_mask) {
+ /* TODO: use mutex of the mdio bus? */
for (phy_addr = 0; phy_addr < PHY_MAX_ADDR; phy_addr++) {
if (!(pdata->phy_mask & (1 << phy_addr)))
continue;
@@ -242,9 +244,6 @@ int ag71xx_phy_connect(struct ag71xx *ag)
}
switch (phy_count) {
- case 0:
- printk(KERN_ERR "%s: no PHY found\n", dev->name);
- return -ENODEV;
case 1:
ag->phy_dev = phy_connect(dev, phydev->dev.bus_id,
&ag71xx_phy_link_adjust, 0, pdata->phy_if_mode);
@@ -275,9 +274,10 @@ int ag71xx_phy_connect(struct ag71xx *ag)
ag->speed = 0;
ag->duplex = -1;
break;
+
default:
ag->phy_dev = NULL;
- printk(KERN_DEBUG "%s: connected to multiple PHYs (%d)\n",
+ printk(KERN_DEBUG "%s: connected to %d PHYs\n",
dev->name, phy_count);
break;
}