Jump to content

AR-1172 - Load induced RX bug in the r8152 usb network driver on rockchip64 5.15, 5.16 and 5.17


schwar3kat

Recommended Posts

@Contributor/Maintainer

AR-1172 - fix complete 08 May 2022
There is was a bug in the 5.15, 5.16 and 5.17 kernel r8152 driver that affected RTL8153b Gigabit USB Ethernet (LAN0) on the Orange Pi R1plus LTS and other boards. 
The bug only presents on high load and I can trigger it reliably with bidirectional high load on Orange Pi R1plus LTS
The bug kills the RX interface and it requires power down to reset.


I assume that it also affects the Orange Pi R1plus, and there are reports of it affecting NanoPi R2S.   I would assume that other boards could be impacted.
My proposed fix is to revert the driver back to the version used in 5.10 kernel (and to disable TX offload by default).
This driver works reasonably well if TX offload is disabled (but with TX offload enabled, another bug is triggered on load).
The reason for this post is to alert other board maintainers and to inquire if  you are okay with this proposal.
The driver from kernel-5.10 (v2.15.0 (2021/04/15)) can be used with 5.15 and 5.16 with minor tweaks.


Edit:  While researching options for disabling TX ofload, I found a thread on the forums for Helios that talked about xhci trb quirk in rockchip64-current.
I followed it to this commit, https://github.com/armbian/build/commit/8eece74eb581367625e6ebcc12ee5c6f4f44617c
The quirk is currently funcional for dwc3 xhci usb on rockchip64 and activated for rk3399.
It appears that the quirk may not have been applied to rk3328 in the past, so I tried including it in rk3328.dtsi, and it worked very well with the mainline driver on 5.15, 5.16 and 5.17.  This means that it is not necessary to revert the driver to the one in 5.10.
I have modified AR-1172 and submitted a PR.
PR has been merged and fix will be in the new release.

Link to comment
Share on other sites

On 5/4/2022 at 1:24 AM, jethome said:

Is it fixed in 5.17?

 

Probably not.  Edit: See original post.  The bug in 5.15, 5.16 and 5.17 can be fixed by activating a xhci trb quirk in rockchip64-current.

In 5.17 it is almost identical with the version in 5.16 except for some ethtool_ringparam structures and some other trivial changes.
I tried back porting it to 5.16, but would have to remove the incompatible ethtool_ringparam structures to get it to work, which would leave essentially the same driver as is now in 5.16, so I dropped the idea.


Armbian rockchip64 edge is still on 5.16 (and I haven't tried to build with 5.17), but when it changes, we will probably have to deal with the same issue, unless the incompatible changes fix it which looks highly unlikely.

And 5.18RC is identical to 5.17.

Link to comment
Share on other sites

  • schwar3kat changed the title to AR-1172 - Load induced RX bug in the r8152 usb network driver on rockchip64 5.15, 5.16 and 5.17

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines