diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2011-01-08 20:24:26 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2011-01-08 20:24:26 +0000 |
commit | 38528d474dbc2478c5a170b4682f997239278d95 (patch) | |
tree | 8ffcc07804e9101d425fc1a6778dfa091c57700c /target/linux/generic/files/drivers/net/phy/rtl8366_smi.c | |
parent | b16b9edaed84e7454d676d405f7863936dad71be (diff) | |
download | upstream-38528d474dbc2478c5a170b4682f997239278d95.tar.gz upstream-38528d474dbc2478c5a170b4682f997239278d95.tar.bz2 upstream-38528d474dbc2478c5a170b4682f997239278d95.zip |
generic: rtl8366: enable ports only after VLAN configuration is done
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24938 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic/files/drivers/net/phy/rtl8366_smi.c')
-rw-r--r-- | target/linux/generic/files/drivers/net/phy/rtl8366_smi.c | 19 |
1 files changed, 19 insertions, 0 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 7995f34a43..f9a332d875 100644 --- a/target/linux/generic/files/drivers/net/phy/rtl8366_smi.c +++ b/target/linux/generic/files/drivers/net/phy/rtl8366_smi.c @@ -486,6 +486,21 @@ static int rtl8366_enable_vlan4k(struct rtl8366_smi *smi, int enable) return 0; } +int rtl8366_enable_all_ports(struct rtl8366_smi *smi, int enable) +{ + int port; + int err; + + for (port = 0; port < smi->num_ports; port++) { + err = smi->ops->enable_port(smi, port, enable); + if (err) + return err; + } + + return 0; +} +EXPORT_SYMBOL_GPL(rtl8366_enable_all_ports); + int rtl8366_reset_vlan(struct rtl8366_smi *smi) { struct rtl8366_vlan_mc vlanmc; @@ -1189,6 +1204,10 @@ int rtl8366_smi_init(struct rtl8366_smi *smi) goto err_disable_hw; } + err = rtl8366_enable_all_ports(smi, 1); + if (err) + goto err_disable_hw; + err = rtl8366_smi_mii_init(smi); if (err) goto err_free_sck; |