summaryrefslogtreecommitdiff
path: root/target/linux/ar71xx/patches-2.6.31/803-ar71xx-update-dsa-switch-support.patch
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2009-08-24 19:29:50 +0000
committerGabor Juhos <juhosg@openwrt.org>2009-08-24 19:29:50 +0000
commit852451deeb3a3dec609521bf7730912ccf6b50e5 (patch)
treec9a86fcb972e1e498c84709e7f5b022689b51879 /target/linux/ar71xx/patches-2.6.31/803-ar71xx-update-dsa-switch-support.patch
parent167120730bed3bcfdc7585db3f0d4a191481d15d (diff)
downloadmtk-20170518-852451deeb3a3dec609521bf7730912ccf6b50e5.zip
mtk-20170518-852451deeb3a3dec609521bf7730912ccf6b50e5.tar.gz
mtk-20170518-852451deeb3a3dec609521bf7730912ccf6b50e5.tar.bz2
add patches for 2.6.31
SVN-Revision: 17366
Diffstat (limited to 'target/linux/ar71xx/patches-2.6.31/803-ar71xx-update-dsa-switch-support.patch')
-rw-r--r--target/linux/ar71xx/patches-2.6.31/803-ar71xx-update-dsa-switch-support.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/target/linux/ar71xx/patches-2.6.31/803-ar71xx-update-dsa-switch-support.patch b/target/linux/ar71xx/patches-2.6.31/803-ar71xx-update-dsa-switch-support.patch
new file mode 100644
index 0000000..d96a874
--- /dev/null
+++ b/target/linux/ar71xx/patches-2.6.31/803-ar71xx-update-dsa-switch-support.patch
@@ -0,0 +1,46 @@
+--- a/arch/mips/ar71xx/devices.c
++++ b/arch/mips/ar71xx/devices.c
+@@ -792,6 +792,8 @@ static struct platform_device ar71xx_dsa
+ void __init ar71xx_add_device_dsa(unsigned int id,
+ struct dsa_platform_data *d)
+ {
++ int i;
++
+ switch (id) {
+ case 0:
+ d->netdev = &ar71xx_eth0_device.dev;
+@@ -805,7 +807,10 @@ void __init ar71xx_add_device_dsa(unsign
+ id);
+ return;
+ }
+- d->mii_bus = &ar71xx_mdio_device.dev;
++
++ for (i = 0; i < d->nr_chips; i++)
++ d->chip[i].mii_bus = &ar71xx_mdio_device.dev;
++
+ ar71xx_dsa_switch_device.dev.platform_data = d;
+
+ platform_device_register(&ar71xx_dsa_switch_device);
+--- a/arch/mips/ar71xx/mach-tl-wr941nd.c
++++ b/arch/mips/ar71xx/mach-tl-wr941nd.c
+@@ -104,7 +104,7 @@ static struct gpio_button tl_wr941nd_gpi
+ }
+ };
+
+-static struct dsa_platform_data tl_wr941nd_dsa_data = {
++static struct dsa_chip_data tl_wr941nd_dsa_chip = {
+ .port_names[0] = "wan",
+ .port_names[1] = "lan1",
+ .port_names[2] = "lan2",
+@@ -113,6 +113,11 @@ static struct dsa_platform_data tl_wr941
+ .port_names[5] = "cpu",
+ };
+
++static struct dsa_platform_data tl_wr941nd_dsa_data = {
++ .nr_chips = 1,
++ .chip = &tl_wr941nd_dsa_chip,
++};
++
+ static void __init tl_wr941nd_setup(void)
+ {
+ u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);