[OpenWrt-Devel] [PATCH] ramips: ethernet: turn off flow control

Rosen Penev rosenp at gmail.com
Wed Jan 29 18:14:30 EST 2020



Sent from my iPhone

> On Jan 29, 2020, at 8:22 AM, Petr Štetiar <ynezz at true.cz> wrote:
> 
> Rosen Penev <rosenp at gmail.com> [2020-01-25 15:04:03]:
> 
> Hi Bjørn and Rosen,
> 
>>> On Thu, Jan 23, 2020 at 12:25 AM Bjørn Mork <bjorn at mork.no> wrote:
>>>>> 
>>>>> -     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...
> 
> 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.
> 
> 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.
> 
> 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.
> 
> -- ynezz

_______________________________________________
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