Tx2-4g R32.3.1 Custom board, r8152 Problems. Is the reltek drivers the latest and greatest?

getting these messages on my serial console when using typec usb hub and ethernet. It seems to happen when I have high traffic rates.

Terry

[77459.169759] r8152 2-1.4:1.0 eth1: Tx status -71
[77459.371221] r8152 2-1.4:1.0 eth1: Tx status -71
[77459.376986] r8152 2-1.4:1.0 eth1: Tx status -71
[77459.579354] r8152 2-1.4:1.0 eth1: Tx status -71
[77526.476692] ------------[ cut here ]------------
[77526.481324] WARNING: CPU: 0 PID: 0 at net/sched/sch_generic.c:316 dev_watchdog+0x2c8/0x2d0
[77526.489732] —[ end trace 7619b9d046f4a0a2 ]—
[77526.494535] r8152 2-1.4:1.0 eth1: Tx timeout
[77526.505661] r8152 2-1.4:1.0 eth1: Tx status -2
[77526.510136] r8152 2-1.4:1.0 eth1: Tx status -71
[77526.515336] r8152 2-1.4:1.0 eth1: Tx status -2
[77526.520448] r8152 2-1.4:1.0 eth1: Tx status -2

Hi,

If you think the driver is out-of-date, maybe you can take the latest one from realtek and see if it can resolve your issue.

removed r8152 from the .config file, and built the newest r8152 driver

It still works but now gives crash and trace after errors, Nvidia kernel might be missing usb/quirks.c to control the tlp stuff, maybe the usb stuff is as out of date as the realtek driver.

Nvidia realtek 8152 ddrive was v2.09
new realtek 8152 is v2.13 as can be seen the the dmesg clip below.

dmesg gives this.

[  238.480568] usb 2-1.4: reset SuperSpeed USB device number 3 using tegra-xusb
[  238.581393] r8152 2-1.4:1.0 eth1: v2.13.0 (2020/04/20)
[  238.581402] r8152 2-1.4:1.0 eth1: This product is covered by one or more of the following patents:
                        US6,570,884, US6,115,776, and US6,327,625.
               
[  238.581527] usbcore: registered new interface driver r8152
[  238.744442] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[  242.006159] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[  242.006757] r8152 2-1.4:1.0 eth1: carrier on
[  290.548710] r8152 2-1.4:1.0 eth1: Tx status -71
[  290.580090] r8152 2-1.4:1.0 eth1: Tx status -71
[  290.600144] r8152 2-1.4:1.0 eth1: Tx status -71
[  290.605891] r8152 2-1.4:1.0 eth1: Tx status -71
[  290.611595] r8152 2-1.4:1.0 eth1: Tx status -71
[  290.640648] r8152 2-1.4:1.0 eth1: Tx status -71
[  290.670227] r8152 2-1.4:1.0 eth1: Tx status -71
[  290.701214] r8152 2-1.4:1.0 eth1: Tx status -71
[  290.727958] r8152 2-1.4:1.0 eth1: Tx status -71
[  319.065119] NETDEV WATCHDOG: eth1 (r8152): transmit queue 0 timed out
[  319.065180] ------------[ cut here ]------------
[  319.069811] WARNING: CPU: 0 PID: 0 at net/sched/sch_generic.c:316 dev_watchdog+0x2c8/0x2d0
[  319.078063] Modules linked in: r8152(O) fuse zram overlay bnep binfmt_misc 88x2cu(O) cfg80211 rtk_btusb(O) spidev stalkerButton(O) nvgpu bluedroid_pm lt81x_mipi(O) ip_tables x_tables

[  319.078110] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G           O    4.9.140-tegra #130
[  319.078113] Hardware name: lightning (DT)
[  319.078116] task: ffffff8009e413c0 task.stack: ffffff8009e30000
[  319.078121] PC is at dev_watchdog+0x2c8/0x2d0
[  319.078125] LR is at dev_watchdog+0x2c8/0x2d0
[  319.078129] pc : [<ffffff8008dcfd70>] lr : [<ffffff8008dcfd70>] pstate: 00400045
[  319.078131] sp : ffffffc0f7053db0
[  319.078134] x29: ffffffc0f7053db0 x28: 0000000000000002 
[  319.078141] x27: ffffff8009e350c8 x26: 00000000ffffffff 
[  319.078148] x25: 0000000000000000 x24: 0000000000000140 
[  319.078154] x23: ffffff8009e36000 x22: ffffffc0eded0460 
[  319.078160] x21: 0000000000000000 x20: ffffffc0eded0000 
[  319.078166] x19: ffffffc0e8057800 x18: 0000000000000000 
[  319.078171] x17: 0000000000000000 x16: 0000000000000000 
[  319.078177] x15: ffffffffffffffff x14: ffffff800a116260 
[  319.078182] x13: 0000000000000000 x12: 0000000000000006 
[  319.078188] x11: 0000000000000006 x10: 000000000000046b 
[  319.078194] x9 : 0000000000000001 x8 : ffffffc0f7026b53 
[  319.078199] x7 : 0000000000000000 x6 : ffffffc0f7054bf0 
[  319.078205] x5 : ffffffc0f7054bf0 x4 : 0000000000000000 
[  319.078210] x3 : ffffffc0f705a7f8 x2 : ffffffc0f7054bf0 
[  319.078215] x1 : ffffff8009e413c0 x0 : 0000000000000039 

[  319.078223] ---[ end trace ed85e35037fc4c9f ]---
[  319.082836] Call trace:
[  319.082842] [<ffffff8008dcfd70>] dev_watchdog+0x2c8/0x2d0
[  319.082849] [<ffffff80081383f8>] call_timer_fn+0x38/0x1e0
[  319.082853] [<ffffff8008138714>] expire_timers+0x144/0x188
[  319.082858] [<ffffff8008138814>] run_timer_softirq+0xbc/0x178
[  319.082863] [<ffffff8008081054>] __do_softirq+0x13c/0x3b0
[  319.082870] [<ffffff80080bb298>] irq_exit+0xd0/0x118
[  319.082875] [<ffffff8008122934>] __handle_domain_irq+0x6c/0xc0
[  319.082879] [<ffffff8008080d44>] gic_handle_irq+0x5c/0xb0
[  319.082883] [<ffffff8008082be8>] el1_irq+0xe8/0x18c
[  319.082891] [<ffffff8008b94450>] cpuidle_enter_state+0xb8/0x380
[  319.082895] [<ffffff8008b9478c>] cpuidle_enter+0x34/0x48
[  319.082899] [<ffffff8008112a1c>] call_cpuidle+0x44/0x70
[  319.082903] [<ffffff8008112d98>] cpu_startup_entry+0x1b0/0x200
[  319.082909] [<ffffff8008f4b314>] rest_init+0x84/0x90
[  319.082916] [<ffffff80095d0b64>] start_kernel+0x370/0x384
[  319.082920] [<ffffff80095d0204>] __primary_switched+0x80/0x94
[  319.082977] r8152 2-1.4:1.0 eth1: Tx timeout
[  319.098168] r8152 2-1.4:1.0 eth1: Tx status -2
[  319.102688] r8152 2-1.4:1.0 eth1: Tx status -71
[  319.107886] r8152 2-1.4:1.0 eth1: Tx status -2
[  319.113091] r8152 2-1.4:1.0 eth1: Tx status -2
[  319.213950] usb 2-1.4: reset SuperSpeed USB device number 3 using tegra-xusb
[  319.233551] usb 2-1.4: device firmware changed
[  319.233772] r8152 2-1.4:1.0 eth1: get_registers -19
[  319.238723] r8152 2-1.4:1.0 eth1: Get ether addr fail
[  319.244602] usb 2-1.4: USB disconnect, device number 3
[  319.244770] sysfs group 'rtl_adv' not found for kobject '2-1.4:1.0'
[  319.251166] ------------[ cut here ]------------
[  319.255792] WARNING: CPU: 0 PID: 2467 at fs/sysfs/group.c:237 sysfs_remove_group+0x98/0xa0
[  319.264041] Modules linked in: r8152(O) fuse zram overlay bnep binfmt_misc 88x2cu(O) cfg80211 rtk_btusb(O) spidev stalkerButton(O) nvgpu bluedroid_pm lt81x_mipi(O) ip_tables x_tables

[  319.264087] CPU: 0 PID: 2467 Comm: kworker/0:2 Tainted: G        W  O    4.9.140-tegra #130
[  319.264090] Hardware name: lightning (DT)
[  319.264103] Workqueue: usb_hub_wq hub_event
[  319.264109] task: ffffffc0ef560000 task.stack: ffffffc0e9898000
[  319.264114] PC is at sysfs_remove_group+0x98/0xa0
[  319.264118] LR is at sysfs_remove_group+0x98/0xa0
[  319.264122] pc : [<ffffff80082f4358>] lr : [<ffffff80082f4358>] pstate: 40400045
[  319.264124] sp : ffffffc0e989b9d0
[  319.264127] x29: ffffffc0e989b9d0 x28: 0000000000000000 
[  319.264134] x27: ffffffc0ed8b6830 x26: ffffff80094738e0 
[  319.264140] x25: ffffff800115e640 x24: ffffffc0e8b71098 
[  319.264146] x23: ffffffc0e8b71000 x22: ffffffc0e8252840 
[  319.264152] x21: ffffffc0e8252840 x20: ffffff800115bea0 
[  319.264158] x19: 0000000000000000 x18: 0000000000000010 
[  319.264164] x17: 0000000000000000 x16: 0000000000000000 
[  319.264170] x15: ffffffffffffffff x14: ffffff808a115a82 
[  319.264176] x13: ffffff800a115a90 x12: 0000000000000006 
[  319.264181] x11: 0000000005f5e0ff x10: 00000000000004a3 
[  319.264188] x9 : 00000000ffffffd0 x8 : ffffff80083d47b0 
[  319.264193] x7 : ffffff8009e84358 x6 : ffffffc0f7054bf0 
[  319.264199] x5 : ffffffc0f7054bf0 x4 : 0000000000000000 
[  319.264205] x3 : ffffffc0f705a7f8 x2 : ffffffc0f7054bf0 
[  319.264211] x1 : ffffffc0ef560000 x0 : 0000000000000037 

[  319.264219] ---[ end trace ed85e35037fc4ca0 ]---
[  319.268830] Call trace:
[  319.268836] [<ffffff80082f4358>] sysfs_remove_group+0x98/0xa0
[  319.268857] [<ffffff800113132c>] rtl8152_disconnect+0x2c/0x98 [r8152]
[  319.268863] [<ffffff8008a1444c>] usb_unbind_interface+0x74/0x2a0
[  319.268870] [<ffffff800877e784>] __device_release_driver+0x9c/0x118
[  319.268874] [<ffffff800877e82c>] device_release_driver+0x2c/0x40
[  319.268877] [<ffffff800877dd14>] bus_remove_device+0xec/0x190
[  319.268883] [<ffffff8008779be8>] device_del+0x110/0x248
[  319.268888] [<ffffff8008a11708>] usb_disable_device+0xb0/0x298
[  319.268893] [<ffffff8008a06b68>] usb_disconnect+0xc0/0x258
[  319.268897] [<ffffff8008a0869c>] hub_port_connect+0x6c/0x940
[  319.268901] [<ffffff8008a0972c>] hub_event+0x7bc/0xa50
[  319.268908] [<ffffff80080d4f3c>] process_one_work+0x1e4/0x4b0
[  319.268912] [<ffffff80080d5258>] worker_thread+0x50/0x4c8
[  319.268917] [<ffffff80080dbee4>] kthread+0xec/0xf0
[  319.268922] [<ffffff8008083850>] ret_from_fork+0x10/0x40
[  319.657713] usb 2-1.4: new SuperSpeed USB device number 4 using tegra-xusb
[  319.679061] usb 2-1.4: New USB device found, idVendor=0bda, idProduct=8153
[  319.679069] usb 2-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=6
[  319.679074] usb 2-1.4: Product: USB 10/100/1000 LAN
[  319.679078] usb 2-1.4: Manufacturer: Realtek
[  319.679082] usb 2-1.4: SerialNumber: 000001
[  319.934041] usb 2-1.4: reset SuperSpeed USB device number 4 using tegra-xusb
[  320.034674] r8152 2-1.4:1.0 eth1: v2.13.0 (2020/04/20)
[  320.034682] r8152 2-1.4:1.0 eth1: This product is covered by one or more of the following patents:
                        US6,570,884, US6,115,776, and US6,327,625.
               
[  320.060783] sysfs group 'rtl_adv' not found for kobject '2-1.4:1.0'
[  320.067168] ------------[ cut here ]------------
[  320.071797] WARNING: CPU: 4 PID: 11420 at fs/sysfs/group.c:237 sysfs_remove_group+0x98/0xa0
[  320.080136] Modules linked in: r8152(O) fuse zram overlay bnep binfmt_misc 88x2cu(O) cfg80211 rtk_btusb(O) spidev stalkerButton(O) nvgpu bluedroid_pm lt81x_mipi(O) ip_tables x_tables

[  320.080183] CPU: 4 PID: 11420 Comm: systemd-udevd Tainted: G        W  O    4.9.140-tegra #130
[  320.080186] Hardware name: lightning (DT)
[  320.080190] task: ffffffc0e80bb800 task.stack: ffffffc096374000
[  320.080196] PC is at sysfs_remove_group+0x98/0xa0
[  320.080200] LR is at sysfs_remove_group+0x98/0xa0
[  320.080204] pc : [<ffffff80082f4358>] lr : [<ffffff80082f4358>] pstate: 40400045
[  320.080207] sp : ffffffc096377a30
[  320.080209] x29: ffffffc096377a30 x28: ffffffc0e80bb800 
[  320.080217] x27: ffffff8008f62000 x26: ffffff80094738e0 
[  320.080223] x25: ffffff800115e640 x24: ffffffc0de7b5098 
[  320.080230] x23: ffffffc0de7b5000 x22: ffffffc0e0aee840 
[  320.080236] x21: ffffffc0e0aee840 x20: ffffff800115bea0 
[  320.080242] x19: 0000000000000000 x18: 0000000000000010 
[  320.080248] x17: 0000000000000000 x16: 0000000000000000 
[  320.080254] x15: ffffffffffffffff x14: ffffff808a115a82 
[  320.080260] x13: ffffff800a115a90 x12: 0000000000000006 
[  320.080265] x11: 0000000005f5e0ff x10: 00000000000004da 
[  320.080272] x9 : 00000000ffffffd0 x8 : ffffff80083d47b0 
[  320.080278] x7 : ffffff8009e84358 x6 : ffffffc0f70b8bf0 
[  320.080284] x5 : ffffffc0f70b8bf0 x4 : 0000000000000000 
[  320.080290] x3 : ffffffc0f70be7f8 x2 : ffffffc0f70b8bf0 
[  320.080296] x1 : ffffffc0e80bb800 x0 : 0000000000000037 

[  320.080304] ---[ end trace ed85e35037fc4ca1 ]---
[  320.084917] Call trace:
[  320.084924] [<ffffff80082f4358>] sysfs_remove_group+0x98/0xa0
[  320.084945] [<ffffff800113132c>] rtl8152_disconnect+0x2c/0x98 [r8152]
[  320.084953] [<ffffff8008a1444c>] usb_unbind_interface+0x74/0x2a0
[  320.084960] [<ffffff800877e784>] __device_release_driver+0x9c/0x118
[  320.084964] [<ffffff800877e82c>] device_release_driver+0x2c/0x40
[  320.084968] [<ffffff800877dd14>] bus_remove_device+0xec/0x190
[  320.084973] [<ffffff8008779be8>] device_del+0x110/0x248
[  320.084978] [<ffffff8008a11708>] usb_disable_device+0xb0/0x298
[  320.084983] [<ffffff8008a121dc>] usb_set_configuration+0x84/0x868
[  320.084990] [<ffffff8008a18888>] bConfigurationValue_store+0x70/0xa8
[  320.084995] [<ffffff8008778aec>] dev_attr_store+0x44/0x60
[  320.085000] [<ffffff80082f28f0>] sysfs_kf_write+0x58/0x80
[  320.085004] [<ffffff80082f1b8c>] kernfs_fop_write+0xfc/0x1e0
[  320.085011] [<ffffff800825c240>] __vfs_write+0x48/0x118
[  320.085015] [<ffffff800825d234>] vfs_write+0xac/0x1b0
[  320.085020] [<ffffff800825e86c>] SyS_write+0x54/0xb0
[  320.085025] [<ffffff800808391c>] __sys_trace_return+0x0/0x4
[  320.246020] usb 2-1.4: reset SuperSpeed USB device number 4 using tegra-xusb
[  320.346743] r8152 2-1.4:1.0 eth1: v2.13.0 (2020/04/20)
[  320.346751] r8152 2-1.4:1.0 eth1: This product is covered by one or more of the following patents:
                        US6,570,884, US6,115,776, and US6,327,625.
               
[  320.550431] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[  321.066908] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[  323.126155] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[  323.126800] r8152 2-1.4:1.0 eth1: carrier on

Terry

any clue when more info will be provided?

Terry

Hi,

You said “getting these messages on my serial console when using typec usb hub and ethernet”.

Why do you mention type C usb here?
Is this ethernet card connected on the hub? If so, could you move it to other ports without hub and try it?

My hardware configuration will be a custom board, type c usb, ethernet connected to type c usb hub,

The problem I am reporting is that the r8152 is misbehaving in the type c usb environment. I used your released r8152 and then remove it from the .config/kernel, and added a new r8152 driver from realtek.

the new driver works but gets the “71” error and then crashes, the original driver got “71” but did not crash. Is nvidia’s kernel release really have proper type c usb support?

It appears the kernel for r32.3.1 is OLD, and a bunch of type c usb support has been shoe horned into it. Adding newer r8152 from realtek will just uncover the missing type c usb support in the kernel.

Please provide the nvidia schedule to enhance/correct type c usb support shortfalls. Missing quirks.c
and etc.

Thanks,
Terry

Hi,
Since we don’t have the custom board, Would need your help to connect the device to Type-A port on default developer kit and check if the issue is still present.

Hi,

We have some suggestions for you.

  1. Please check this r8152 device on NV devkit RHP. If it can work fine, then maybe you should contact hub vendor and realtek. Our host controller only receives and deals with the data from hub. If there is any protocol error from hub, then it should be dealt on hub.

  2. We don’t put type C design in adaptation guide and product design guide for TX2. Thus, it means you came up with it by yourself. How about you paste your board schematic and software configuration here for us to review?

  3. I don’t get your point in last line “missing quirks.c”, because I see this in my kernel code.

kernel/kernel-4.9/drivers/usb/core$ ls quirks.c
quirks.c

i compared quirks.c to a newer quirks.c and found a ton more devices defined, my device 0bda:8153 is not in the nvidia quirks.c but it is in the later 4.x quirks.c

Seems like 4.9.140 might be too old in the type c usb area.

Any plans to update or move the kernel forward?

Terry

Fortunately that is probably one of the easiest back ports. In your 4.9.140 kernel’s “drivers/usb/core/quirks.c”, try editing to match this (not a patch, but line numbers included):

212         /* ASUS Base Station(T100) */
213         { USB_DEVICE(0x0b05, 0x17e0), .driver_info =
214                         USB_QUIRK_IGNORE_REMOTE_WAKEUP },
215 
216         /* Generic RTL8153 based ethernet adapters */
217         { USB_DEVICE(0x0bda, 0x8153), .driver_info = USB_QUIRK_NO_LPM },
218 
219         /* Silicon Labs CDC Serial Port */
220         { USB_DEVICE(0x10C4, 0x0003), .driver_info = USB_QUIRK_RESET_RESUME },

This is the part which is new, the other part of the above is for context:

216         /* Generic RTL8153 based ethernet adapters */
217         { USB_DEVICE(0x0bda, 0x8153), .driver_info = USB_QUIRK_NO_LPM },

The beauty is that the quirk is a generic class, and so (in theory) all it should require is marking that ID with the quirk (the quirk code has existed for some time, and only the marking of the ID is new, at least so far as I know).

linuxdev,

Thanks for a second option, added the line to quirks.c and the latest and greatest r8152(v2.13.0) is happy. I was considering just replacing quirks.c with a newer quirks but I am sticking to your suggestion.

Thank You Again,
Terry

It is quite possible the entire file differs only in adding IDs, and you could replace the whole file. On the other hand, something might go wrong and you’d waste your time, so I go for the simpler solution.

If adding USB_QUIRK_NO_LPM can resolve your problem then it has nothing to do with the usb driver. It means it is an issue from RTK side with U1 and U2. Then consulting with Realtek will save you more time than keep asking a new kernel here.

IMO, please be more practical to your own project. Upgrading kernel is not a small request here. Even if we say “Ok, we will upgrade the kernel but the plan is probably 1 year later because we have many integration and QC/QA”. Then it will definitely pending your project development.

With more information provide, then we can provide correct suggestions to help you resolving issue.

Thanks

USB_QUIRK_NO_LPM is part of the later kernel for the USB device that is how I and linuxdev found the change, so if nvidia was using a newer version of the kernel the realtek driver would of just worked. Seems that someone put USB device control into the kernel instead of the company supplied drivers.

I believe the USB support in the kernel was not done incorrectly, but it is what we have, so I ask for a newer kernel to pull in the newer USB device support code. New kernel has more type c usb support than the current nvidia kernel that is released for r32.3.1

Terry

Hi,

Want to say something more related to technical stuff here… the patch you added in quirk.c has nothing to do with type C support…

There is no specific driver for type A/B/C usb. They are just different hardware design but the usb driver is basically the same one…

Just adding a r8153 device into the list has nothing to do with typeC support. It is just telling the usb driver that r8153 has some exception that does not totally follow the usb protocol.