[OpenWrt-Devel] [PATCH] ramips: ethernet: turn off flow control
Bjørn Mork
bjorn at mork.no
Thu Jan 30 04:54:17 EST 2020
Rosen Penev <rosenp at gmail.com> writes:
> On Wed, Jan 29, 2020 at 3:14 PM Rosen Penev <rosenp at gmail.com> wrote:
>> > On Jan 29, 2020, at 8:22 AM, Petr Štetiar <ynezz at true.cz> wrote:
>> >
>> > I just quickly skimmed through the code and it seems like we've that
>> > information already in dmesg:
>> >
>> > SoC Type: MediaTek MT7688 ver:1 eco:2 = 0x0102
>> > SoC Type: MediaTek MT7628AN ver:1 eco:2 = 0x0102
>> > SoC Type: MediaTek MT7621 ver:1 eco:3 = 0x0103
>> > SoC Type: MediaTek MT7620A ver:2 eco:3 = 0x0203
>> > SoC Type: MediaTek MT7620N ver:2 eco:6 = 0x0206
>> >
>> >> That's just cosmetic.
>> >
>> > current: == 0x0101
>> > new: >= 0x0101
>> I meant the comment to print the SoC ID.
Yes, and it is already there as Petr pointed out. I should have looked
closer at what this magic register actually was ;-)
>> >
>> > Doesn't look like a cosmetic change nor correct, see above list. What about
>> > following?
>> >
>> > if (ralink_soc == MT762X_SOC_MT7621AT) {
>> > /* (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 {
>> > ...
>> > }
>> Maybe. All I know is that the patch as I posted it works well according to people on the forums.
> On a second look this is totally bogus.
>
> On kernel.org, the ralink_soc variable is only used in arch/mips ,
> mainly under the ralink subdirectory. I don't think it should be used
> for the switch driver.
There might have been a silicon bug in the switch IP of one specific SoC
revision?
FWIW, I am using the mainline DSA driver with MT7621 and have never seen
this issue there. Don't know if that means it is fixed.
>> > I just don't know which MediaTek SoC is 0x0101 (ver:1 eco:1), but I assume,
>> > that this condition is just bogus from the beginning.
Are you sure the revision says anything about which SoC this is? The
SoC name is read from sysc register 0 and 4:
root at OpenWrt:/# io -r -4 0x1e000000
1e000000: 3637544d
root at OpenWrt:/# io -r -4 0x1e000004
1e000004: 20203132
I.e ascii strings "MT76" and "21 ". I assume the revision number is only
valid in that context?
root at OpenWrt:/# io -r -4 0x1e00000c
1e00000c: 00010103
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