aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2011-01-08 20:24:29 +0000
committerGabor Juhos <juhosg@openwrt.org>2011-01-08 20:24:29 +0000
commit792a1fb2c05a03fd77178d0e3a7e6147e33330fc (patch)
treeecbb705a96af203d2febca7bb4bab89099a6b219 /target/linux/generic
parentc16715f8d2d31f52bbaf888efd3fdb424b7a69bd (diff)
downloadupstream-792a1fb2c05a03fd77178d0e3a7e6147e33330fc.tar.gz
upstream-792a1fb2c05a03fd77178d0e3a7e6147e33330fc.tar.bz2
upstream-792a1fb2c05a03fd77178d0e3a7e6147e33330fc.zip
generic: rtl8366: enable vlans before enabling the ports
SVN-Revision: 24939
Diffstat (limited to 'target/linux/generic')
-rw-r--r--target/linux/generic/files/drivers/net/phy/rtl8366_smi.c3
-rw-r--r--target/linux/generic/files/drivers/net/phy/rtl8366_smi.h1
-rw-r--r--target/linux/generic/files/drivers/net/phy/rtl8366rb.c4
-rw-r--r--target/linux/generic/files/drivers/net/phy/rtl8366s.c4
4 files changed, 11 insertions, 1 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/rtl8366_smi.c b/target/linux/generic/files/drivers/net/phy/rtl8366_smi.c
index f9a332d875..e34c84c97e 100644
--- a/target/linux/generic/files/drivers/net/phy/rtl8366_smi.c
+++ b/target/linux/generic/files/drivers/net/phy/rtl8366_smi.c
@@ -448,7 +448,7 @@ static int rtl8366_set_pvid(struct rtl8366_smi *smi, unsigned port,
return -ENOSPC;
}
-static int rtl8366_enable_vlan(struct rtl8366_smi *smi, int enable)
+int rtl8366_enable_vlan(struct rtl8366_smi *smi, int enable)
{
int err;
@@ -465,6 +465,7 @@ static int rtl8366_enable_vlan(struct rtl8366_smi *smi, int enable)
return err;
}
+EXPORT_SYMBOL_GPL(rtl8366_enable_vlan);
static int rtl8366_enable_vlan4k(struct rtl8366_smi *smi, int enable)
{
diff --git a/target/linux/generic/files/drivers/net/phy/rtl8366_smi.h b/target/linux/generic/files/drivers/net/phy/rtl8366_smi.h
index 2504dd3278..2e84a8d913 100644
--- a/target/linux/generic/files/drivers/net/phy/rtl8366_smi.h
+++ b/target/linux/generic/files/drivers/net/phy/rtl8366_smi.h
@@ -104,6 +104,7 @@ int rtl8366_smi_read_reg(struct rtl8366_smi *smi, u32 addr, u32 *data);
int rtl8366_smi_rmwr(struct rtl8366_smi *smi, u32 addr, u32 mask, u32 data);
int rtl8366_reset_vlan(struct rtl8366_smi *smi);
+int rtl8366_enable_vlan(struct rtl8366_smi *smi, int enable);
int rtl8366_enable_all_ports(struct rtl8366_smi *smi, int enable);
#ifdef CONFIG_RTL8366S_PHY_DEBUG_FS
diff --git a/target/linux/generic/files/drivers/net/phy/rtl8366rb.c b/target/linux/generic/files/drivers/net/phy/rtl8366rb.c
index 847d666dd2..90c37ad1f2 100644
--- a/target/linux/generic/files/drivers/net/phy/rtl8366rb.c
+++ b/target/linux/generic/files/drivers/net/phy/rtl8366rb.c
@@ -963,6 +963,10 @@ static int rtl8366rb_sw_reset_switch(struct switch_dev *dev)
if (err)
return err;
+ err = rtl8366_enable_vlan(smi, 1);
+ if (err)
+ return err;
+
return rtl8366_enable_all_ports(smi, 1);
}
diff --git a/target/linux/generic/files/drivers/net/phy/rtl8366s.c b/target/linux/generic/files/drivers/net/phy/rtl8366s.c
index 74e0a3029c..3b7fcce329 100644
--- a/target/linux/generic/files/drivers/net/phy/rtl8366s.c
+++ b/target/linux/generic/files/drivers/net/phy/rtl8366s.c
@@ -809,6 +809,10 @@ static int rtl8366s_sw_reset_switch(struct switch_dev *dev)
if (err)
return err;
+ err = rtl8366_enable_vlan(smi, 1);
+ if (err)
+ return err;
+
return rtl8366_enable_all_ports(smi, 1);
}