diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2012-04-29 18:29:31 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2012-04-29 18:29:31 +0000 |
commit | 2341f7444dd5bb73c201abfb7ccc27c4afbc0aaf (patch) | |
tree | cb5fdd0c5bab931e5c32765829c0818c9214f4cf /target/linux/generic/files/drivers/net/phy/rtl8367.c | |
parent | bd9308390ccc22454bac9952df6ba7519788e97b (diff) | |
download | upstream-2341f7444dd5bb73c201abfb7ccc27c4afbc0aaf.tar.gz upstream-2341f7444dd5bb73c201abfb7ccc27c4afbc0aaf.tar.bz2 upstream-2341f7444dd5bb73c201abfb7ccc27c4afbc0aaf.zip |
linux: rtl836x: add a generic reset_switch function
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31536 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic/files/drivers/net/phy/rtl8367.c')
-rw-r--r-- | target/linux/generic/files/drivers/net/phy/rtl8367.c | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/rtl8367.c b/target/linux/generic/files/drivers/net/phy/rtl8367.c index 9959ee3dae..d60af022a7 100644 --- a/target/linux/generic/files/drivers/net/phy/rtl8367.c +++ b/target/linux/generic/files/drivers/net/phy/rtl8367.c @@ -1475,31 +1475,6 @@ static int rtl8367_sw_reset_port_mibs(struct switch_dev *dev, RTL8367_MIB_CTRL_PORT_RESET_MASK(port % 8)); } -static int rtl8367_sw_reset_switch(struct switch_dev *dev) -{ - struct rtl8366_smi *smi = sw_to_rtl8366_smi(dev); - int err; - - err = rtl8367_reset_chip(smi); - if (err) - return err; - - - err = rtl8367_setup(smi); - if (err) - return err; - - err = rtl8366_reset_vlan(smi); - if (err) - return err; - - err = rtl8366_enable_vlan(smi, 1); - if (err) - return err; - - return rtl8366_enable_all_ports(smi, 1); -} - static struct switch_attr rtl8367_globals[] = { { .type = SWITCH_TYPE_INT, @@ -1578,7 +1553,7 @@ static const struct switch_dev_ops rtl8366m_ops = { .set_vlan_ports = rtl8366_sw_set_vlan_ports, .get_port_pvid = rtl8366_sw_get_port_pvid, .set_port_pvid = rtl8366_sw_set_port_pvid, - .reset_switch = rtl8367_sw_reset_switch, + .reset_switch = rtl8366_sw_reset_switch, .get_port_link = rtl8367_sw_get_port_link, }; |