diff options
author | Jonas Gorski <jogo@openwrt.org> | 2012-05-27 13:22:40 +0000 |
---|---|---|
committer | Jonas Gorski <jogo@openwrt.org> | 2012-05-27 13:22:40 +0000 |
commit | a7a82db16f1a910ee379a0435069fa8889360488 (patch) | |
tree | e467c8a98597f348c7a6bf3a40cfe6f4cc639384 /target/linux/brcm63xx/patches-3.3 | |
parent | e19ed52fd1ddda94f06f52866570dbb8d84c3212 (diff) | |
download | mtk-20170518-a7a82db16f1a910ee379a0435069fa8889360488.zip mtk-20170518-a7a82db16f1a910ee379a0435069fa8889360488.tar.gz mtk-20170518-a7a82db16f1a910ee379a0435069fa8889360488.tar.bz2 |
bcm63xx: fix port state after network down
bcm_enetsw_probe did not properly reset port states, resulting in
connected ports staying disabled after bringing up the interface the
second time.
SVN-Revision: 31881
Diffstat (limited to 'target/linux/brcm63xx/patches-3.3')
-rw-r--r-- | target/linux/brcm63xx/patches-3.3/431-bcm63xx_enet-reset-port-link-state-in-bcm_enetsw_ope.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/target/linux/brcm63xx/patches-3.3/431-bcm63xx_enet-reset-port-link-state-in-bcm_enetsw_ope.patch b/target/linux/brcm63xx/patches-3.3/431-bcm63xx_enet-reset-port-link-state-in-bcm_enetsw_ope.patch new file mode 100644 index 0000000..e1e048c --- /dev/null +++ b/target/linux/brcm63xx/patches-3.3/431-bcm63xx_enet-reset-port-link-state-in-bcm_enetsw_ope.patch @@ -0,0 +1,28 @@ +From 6d5c5bb13db3fd8e3dd0b82742b3957f41a4a3ac Mon Sep 17 00:00:00 2001 +From: Jonas Gorski <jonas.gorski@gmail.com> +Date: Thu, 24 May 2012 20:38:58 +0200 +Subject: [PATCH] bcm63xx_enet: reset port link state in bcm_enetsw_open + +bcm_enetsw_open disables all ports, but does not reset their link state. +This results in connected ports staying disabled after a ifdown/ifup +cycle, since bcm_enetsw_phy_poll only enables them if their current state +is different from the stored link state. + +Fix this by also resetting the port link state. + +Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com> +--- + drivers/net/ethernet/broadcom/bcm63xx_enet.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c ++++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c +@@ -2214,6 +2214,8 @@ static int bcm_enetsw_open(struct net_de + enetsw_writeb(priv, ENETSW_PTCTRL_RXDIS_MASK | + ENETSW_PTCTRL_TXDIS_MASK, + ENETSW_PTCTRL_REG(i)); ++ ++ priv->sw_port_link[i] = 0; + } + + /* reset mib */ |