aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2010-03-06 22:33:25 +0000
committerFlorian Fainelli <florian@openwrt.org>2010-03-06 22:33:25 +0000
commitac0b6ee5596fcede180f1c0fcc013e1b73160fb8 (patch)
tree2709e315b8beab1749725424cfac4a0aa11fb1c6 /target
parentffd352b2bad63eb77de0540ce68c2b63ba8620db (diff)
downloadupstream-ac0b6ee5596fcede180f1c0fcc013e1b73160fb8.tar.gz
upstream-ac0b6ee5596fcede180f1c0fcc013e1b73160fb8.tar.bz2
upstream-ac0b6ee5596fcede180f1c0fcc013e1b73160fb8.zip
fallback to "dumb switch" mode if no PHY was detected
This will enable the second Ethernet MAC in most cases, but will allow previously non working devices to work. SVN-Revision: 20022
Diffstat (limited to 'target')
-rw-r--r--target/linux/ar7/patches-2.6.32/950-cpmac_fallback_switch.patch16
1 files changed, 16 insertions, 0 deletions
diff --git a/target/linux/ar7/patches-2.6.32/950-cpmac_fallback_switch.patch b/target/linux/ar7/patches-2.6.32/950-cpmac_fallback_switch.patch
new file mode 100644
index 0000000000..b5ba861552
--- /dev/null
+++ b/target/linux/ar7/patches-2.6.32/950-cpmac_fallback_switch.patch
@@ -0,0 +1,16 @@
+Index: linux-2.6.32.9/drivers/net/cpmac.c
+===================================================================
+--- linux-2.6.32.9.orig/drivers/net/cpmac.c 2010-03-06 23:12:46.000000000 +0100
++++ linux-2.6.32.9/drivers/net/cpmac.c 2010-03-06 23:13:14.000000000 +0100
+@@ -1132,8 +1132,9 @@
+ }
+
+ if (phy_id == PHY_MAX_ADDR) {
+- dev_err(&pdev->dev, "no PHY present\n");
+- return -ENODEV;
++ dev_err(&pdev->dev, "no PHY present, falling back to switch mode\n");
++ strncpy(mdio_bus_id, "0", MII_BUS_ID_SIZE); /* fixed phys bus */
++ phy_id = pdev->id;
+ }
+
+ dev = alloc_etherdev_mq(sizeof(*priv), CPMAC_QUEUES);