#StackBounty: #usb #serial #kernel Device drivers only working on boot

Bounty: 50

I am trying to connect some peripheral devices (test equipment) to a Raspberry Pi 4B+ running Raspbian and I am running into issues with device drivers for serial (using a pl2303 driver) and usb devices (using kernel module driver for usbtmc).

If I boot the Pi with both devices plugged in, there are no issues with the device nodes, and they both mount properly under /dev/usbtmc0 and /dev/ttyUSB0 respectively. However, if I unplug them and plug them back in, they no longer appear under these nodes. It seems like the device drivers are not loading and they are just recognized as USB devices.

Upon booting:

pi@raspberrypi:~ $ lsusb -t # shows driver information
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 1: Dev 3, If 0, Class=Vendor Specific Class, Driver=pl2303, 12M
        |__ Port 3: Dev 5, If 0, Class=Application Specific Interface, Driver=usbtmc, 480M

You can see that the drivers are being used to interface with the devices.

After unplug/plug:

pi@raspberrypi:~ $ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M

The drivers now disappear. Confirmation that they still exist as USB devices:

$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 008: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Bus 001 Device 009: ID 1ab1:0e11 Rigol Technologies
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

My lshw output shows that they are now unclaimed devices:

*-usb:0 UNCLAIMED
                      description: Generic USB device
                      product: DP800 Serials
                      vendor: Rigol Technologies.
                      physical id: 1
                      bus info: usb@1:1.1
                      version: 0.02
                      serial: DP8B185050162
                      capabilities: usb-2.00
                      configuration: speed=480Mbit/s
                 *-usb:1 UNCLAIMED
                      description: Generic USB device
                      product: USB-Serial Controller D
                      vendor: Prolific Technology Inc.
                      physical id: 4
                      bus info: usb@1:1.4
                      version: 4.00
                      capabilities: usb-1.10
                      configuration: speed=12Mbit/s

This is my current kernel version:

$ cat /proc/version
Linux version 5.4.51-v7l+ (dom@buildbot) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611)) #1333 SMP Mon Aug 10 16:51:40 BST 2020

I’ve tried looking into manually adding the devices by VID and PID to the pl2303 driver, but that did not work. udev seems to not be able to do anything as well, as without the drivers it only sees them as usb devices and not the higher level usbtmc and usb-serial respectively. From my understanding, having these modules installed should allow it to load automatically upon plug-in, but that has not been the case for me. Any help would be greatly appreciated!


Get this bounty!!!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.