diff options
author | Michael Lee <igvtee@gmail.com> | 2017-04-27 09:04:31 +0800 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2017-05-18 14:50:16 +0200 |
commit | eee09bfe01e8cc2db1501f82dde7b9b6bb424faf (patch) | |
tree | 3bfcf47dfb557addf060bae62cdbfca8fe70ce9f /target/linux/ramips/patches-4.4/0504-net-next-mediatek-add-switch-driver-for-mt7621.patch | |
parent | 224e5f5efa22b8a0132522367afd3b22f05d53e1 (diff) | |
download | upstream-eee09bfe01e8cc2db1501f82dde7b9b6bb424faf.tar.gz upstream-eee09bfe01e8cc2db1501f82dde7b9b6bb424faf.tar.bz2 upstream-eee09bfe01e8cc2db1501f82dde7b9b6bb424faf.zip |
ramips: support jumbo frame on mt7621 up to 2k
Signed-off-by: Michael Lee <igvtee@gmail.com>
Diffstat (limited to 'target/linux/ramips/patches-4.4/0504-net-next-mediatek-add-switch-driver-for-mt7621.patch')
-rw-r--r-- | target/linux/ramips/patches-4.4/0504-net-next-mediatek-add-switch-driver-for-mt7621.patch | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/target/linux/ramips/patches-4.4/0504-net-next-mediatek-add-switch-driver-for-mt7621.patch b/target/linux/ramips/patches-4.4/0504-net-next-mediatek-add-switch-driver-for-mt7621.patch index 71192c9a25..28c5139451 100644 --- a/target/linux/ramips/patches-4.4/0504-net-next-mediatek-add-switch-driver-for-mt7621.patch +++ b/target/linux/ramips/patches-4.4/0504-net-next-mediatek-add-switch-driver-for-mt7621.patch @@ -14,7 +14,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org> --- /dev/null +++ b/drivers/net/ethernet/mediatek/gsw_mt7621.c -@@ -0,0 +1,284 @@ +@@ -0,0 +1,287 @@ +/* This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License @@ -115,17 +115,20 @@ Signed-off-by: John Crispin <blogic@openwrt.org> + 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) */ -+ mtk_switch_w32(gsw, 0x2105e30b, 0x100); ++ /* (GE1, Force 1000M/FD, FC ON, MAX_RX_LENGTH 2k) */ ++ mtk_switch_w32(gsw, 0x2305e30b, GSW_REG_MAC_P0_MCR); + mt7530_mdio_w32(gsw, 0x3600, 0x5e30b); + } else { -+ /* (GE1, Force 1000M/FD, FC ON, MAX_RX_LENGTH 1536) */ -+ mtk_switch_w32(gsw, 0x2105e33b, 0x100); ++ /* (GE1, Force 1000M/FD, FC ON, MAX_RX_LENGTH 2k) */ ++ mtk_switch_w32(gsw, 0x2305e33b, GSW_REG_MAC_P0_MCR); + mt7530_mdio_w32(gsw, 0x3600, 0x5e33b); + } + + /* (GE2, Link down) */ -+ mtk_switch_w32(gsw, 0x8000, 0x200); ++ mtk_switch_w32(gsw, 0x8000, GSW_REG_MAC_P1_MCR); ++ ++ /* Set switch max RX frame length to 2k */ ++ mt7530_mdio_w32(gsw, GSW_REG_GMACCR, 0x3F0B); + + /* Enable Port 6, P5 as GMAC5, P5 disable */ + val = mt7530_mdio_r32(gsw, 0x7804); |