aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/files/drivers/net
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2014-03-30 09:15:16 +0000
committerJohn Crispin <john@openwrt.org>2014-03-30 09:15:16 +0000
commitdeba38f2a7ee7daea08905b6d45412c1469d7c84 (patch)
tree302c28fc30f1a34be3157c284de855a49976cae2 /target/linux/generic/files/drivers/net
parent72cdb34ae8fc0784d18539bac4552c863f3e910a (diff)
downloadupstream-deba38f2a7ee7daea08905b6d45412c1469d7c84.tar.gz
upstream-deba38f2a7ee7daea08905b6d45412c1469d7c84.tar.bz2
upstream-deba38f2a7ee7daea08905b6d45412c1469d7c84.zip
kernel: rtl8306: fix vlan support on lantiq ar9 p2601hnfx
If the CPU port is not forced up, the link, at least on this board, is lost after changes are applied. This makes sure that the link is restored. Regression tests should confirm it doesn't break other boards. Signed-off-by: Antonios Vamporakis <ant@area128.com> SVN-Revision: 40305
Diffstat (limited to 'target/linux/generic/files/drivers/net')
-rw-r--r--target/linux/generic/files/drivers/net/phy/rtl8306.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/rtl8306.c b/target/linux/generic/files/drivers/net/phy/rtl8306.c
index 33dbf969c1..a5886b60ee 100644
--- a/target/linux/generic/files/drivers/net/phy/rtl8306.c
+++ b/target/linux/generic/files/drivers/net/phy/rtl8306.c
@@ -126,6 +126,7 @@ enum rtl_regidx {
RTL_REG_EN_TAG_CLR,
RTL_REG_EN_TAG_IN,
RTL_REG_TRAP_CPU,
+ RTL_REG_CPU_LINKUP,
RTL_REG_TRUNK_PORTSEL,
RTL_REG_EN_TRUNK,
RTL_REG_RESET,
@@ -194,6 +195,7 @@ static const struct rtl_reg rtl_regs[] = {
[RTL_REG_RESET] = { 0, 0, 16, 1, 12, 0 },
[RTL_REG_TRAP_CPU] = { 3, 2, 22, 1, 6, 0 },
+ [RTL_REG_CPU_LINKUP] = { 0, 6, 22, 1, 15, 0 },
[RTL_REG_VLAN_TAG_ONLY] = { 0, 0, 16, 1, 8, 1 },
[RTL_REG_VLAN_FILTER] = { 0, 0, 16, 1, 9, 1 },
@@ -458,6 +460,8 @@ rtl_hw_apply(struct switch_dev *dev)
rtl_set(dev, RTL_REG_TRUNK_PORTSEL, trunk_psel);
rtl_phy_restore(dev, 5, &port5);
+ rtl_set(dev, RTL_REG_CPU_LINKUP, 1);
+
return 0;
}