[OpenWrt-Devel] [PATCH] ramips: ethernet: turn off flow control
Bjørn Mork
bjorn at mork.no
Thu Jan 23 03:25:40 EST 2020
Rosen Penev <rosenp at gmail.com> writes:
> Several users have been reporting crashing issues with the ethernet
> driver.
>
> One source says that this is a silicon bug in mt7621:
> https://github.com/openwrt/mt76/issues/211#issuecomment-569687506
>
> A user that has been testing this has seen greater than 2-3 days uptime
> of the ethernet interface with this change:
> https://forum.openwrt.org/t/mtk-soc-eth-watchdog-timeout-after-r11573/50000/12
>
> Signed-off-by: Rosen Penev <rosenp at gmail.com>
> ---
> .../files-4.14/drivers/net/ethernet/mediatek/gsw_mt7621.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/gsw_mt7621.c b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/gsw_mt7621.c
> index 89be239007..bd0e555e35 100644
> --- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/gsw_mt7621.c
> +++ b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/gsw_mt7621.c
> @@ -98,8 +98,8 @@ static void mt7621_hw_init(struct mt7620_gsw *gsw, struct device_node *np)
> mt7530_mdio_w32(gsw, 0x7000, 0x3);
> usleep_range(10, 20);
>
> - if ((rt_sysc_r32(SYSC_REG_CHIP_REV_ID) & 0xFFFF) == 0x0101) {
> - /* (GE1, Force 1000M/FD, FC ON, MAX_RX_LENGTH 1536) */
> + if ((rt_sysc_r32(SYSC_REG_CHIP_REV_ID) & 0xFFFF) >= 0x0101) {
> + /* (GE1, Force 1000M/FD, FC OFF, MAX_RX_LENGTH 1536) */
> mtk_switch_w32(gsw, 0x2305e30b, GSW_REG_MAC_P0_MCR);
> mt7530_mdio_w32(gsw, 0x3600, 0x5e30b);
> } else {
If that's really helping then I believe it would be useful to add some
sort of chip_rev_id printk here. Would be good to know who hits this
and why...
Bjørn
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list