USB MP3 player mounting in Linux; crashing in FreeBSD

I've just become the "proud" owner of a Ruizu brand MP3 player.

It mounts as a storage device on Linux (Linux Mint 22.2) just fine, and I can copy files over to it:

Code:
[  791.762244] usb 5-1: new high-speed USB device number 3 using xhci_hcd
[  791.893847] usb 5-1: New USB device found, idVendor=10d6, idProduct=1101, bcdDevice= 1.00
[  791.893857] usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  791.893859] usb 5-1: Product: HS USB FlashDisk
[  791.893861] usb 5-1: Manufacturer: ACTIONS
[  791.893864] usb 5-1: SerialNumber: CA4512482ADF0FEEEE
[  791.973293] usb-storage 5-1:1.0: USB Mass Storage device detected
[  791.973521] scsi host0: usb-storage 5-1:1.0
[  791.973651] usbcore: registered new interface driver usb-storage
[  793.003258] scsi 0:0:0:0: Direct-Access     ACTIONS  USB DISK FOB 2.0 0    PQ: 0 ANSI: 0 CCS
[  793.003855] sd 0:0:0:0: Attached scsi generic sg0 type 0
[  793.004993] sd 0:0:0:0: [sda] 65388544 1024-byte logical blocks: (67.0 GB/62.4 GiB)
[  793.005128] sd 0:0:0:0: [sda] Write Protect is off
[  793.005131] sd 0:0:0:0: [sda] Mode Sense: 00 c0 00 00
[  793.005248] sd 0:0:0:0: [sda] Write cache: disabled, read cache: disabled, doesn't support DPO or FUA
[  793.007876]  sda:
[  793.008014] sd 0:0:0:0: [sda] Attached SCSI removable disk

However I think the device itself is in some way behaving rudely. If I just plug it in to a FreeBSD 14.3 system (I've tried two), the device itself sits there resetting every minute or so, with the following logs:

Code:
usb_msc_auto_quirk: UQ_MSC_NO_SYNC_CACHE set for USB mass storage device ACTIONS HS USB FlashDisk (0x10d6:0x1101)
usb_msc_auto_quirk: UQ_MSC_NO_PREVENT_ALLOW set for USB mass storage device ACTIONS HS USB FlashDisk (0x10d6:0x1101)
usb_msc_auto_quirk: UQ_MSC_NO_TEST_UNIT_READY set for USB mass storage device ACTIONS HS USB FlashDisk (0x10d6:0x1101)
usb_msc_auto_quirk: UQ_MSC_NO_START_STOP set for USB mass storage device ACTIONS HS USB FlashDisk (0x10d6:0x1101)
usbd_req_re_enumerate: addr=1, set address failed! (USB_ERR_TIMEOUT, ignored)
usbd_setup_device_desc: getting device descriptor at addr 1 failed, USB_ERR_SHORT_XFER
usbd_req_re_enumerate: addr=1, set address failed! (USB_ERR_IOERROR, ignored)
usbd_setup_device_desc: getting device descriptor at addr 1 failed, USB_ERR_IOERROR
usb_alloc_device: Failure selecting configuration index 0:USB_ERR_IOERROR, port 1, addr 1 (ignored)
ugen2.2: <ACTIONS HS USB FlashDisk> at usbus2
ugen2.2: <ACTIONS HS USB FlashDisk> at usbus2 (disconnected)

I'm tempted to just return the thing for a refund, but was wondering if anyone else has experienced this, and/or is more experienced than me at debugging USB issues? It looks like it's not returning descriptors etc. when queried. But why, then, should this work fine on Linux? :confused:
 
Well, it certainly looks like it supports the storage device USB profile, so in theory it should be compatible with bsd. You didn't just try the USB connect in bsd once, see the errors, and give up, did you? I mean, do the usb errors occur consistently on being plugged in? and what about trying linux again AFTER it fails with bsd?

the usb timeout errors are concerning. For it to register the storage device profile the bus has to be stable, and timeouts indicate that it aint. Another silly question? same USB cable being used all the time?
 
Yeah! I bought it for that reason - it _looked_ like it worked, from the specs.

The errors happen 100% consistently. I have tested on two machines - one of which is also the Linux machine I tested on where it worked (my dual-boot Framework laptop). I've also tried connecting it directly to a USB-A port, or via a USB-A -> USB-C cable, and to Linux and FreeBSD multiple times.

What I suspect is happening is that the Linux kernel is being more forgiving of some or other failure on the part of the device, where it looks like it's being disconnected from the FreeBSD kernel, causing the device to crash / restart.
 
Just to be clear, on the dual-boot Linux/FreeBSD machine it worked on Linux but not on FreeBSD?
Yes, that's correct - same hardware, different OS. It worked fine on Linux Mint 22.2 and mounted as a storage device, but the MP3 player started crashing / rebooting every few seconds under FreeBSD.
 
Oh, there's another twist, which I've only just now noticed. On my desktop, plugging the MP3 player in causes the (integrated motherboard) USB hub to be reset (perhaps that's what's causing the MP3 player to restart!). If I leave it plugged in, every few seconds, I get new webcam + audio device notifications on my desktop, as the hub keeps resetting.

Code:
usb_msc_auto_quirk: UQ_MSC_NO_SYNC_CACHE set for USB mass storage device ACTIONS HS USB FlashDisk (0x10d6:0x1101)
usb_msc_auto_quirk: UQ_MSC_NO_PREVENT_ALLOW set for USB mass storage device ACTIONS HS USB FlashDisk (0x10d6:0x1101)
usb_msc_auto_quirk: UQ_MSC_NO_TEST_UNIT_READY set for USB mass storage device ACTIONS HS USB FlashDisk (0x10d6:0x1101)
usb_msc_auto_quirk: UQ_MSC_NO_START_STOP set for USB mass storage device ACTIONS HS USB FlashDisk (0x10d6:0x1101)
xhci0: Resetting controller
usbd_req_re_enumerate: addr=10, set address failed! (USB_ERR_TIMEOUT, ignored)
usbd_setup_device_desc: getting device descriptor at addr 10 failed, USB_ERR_IOERROR
usbd_req_re_enumerate: addr=10, set address failed! (USB_ERR_TIMEOUT, ignored)
usbd_setup_device_desc: getting device descriptor at addr 10 failed, USB_ERR_IOERROR
usb_alloc_device: Failure selecting configuration index 0:USB_ERR_IOERROR, port 9, addr 10 (ignored)
ugen0.8: <ACTIONS HS USB FlashDisk> at usbus0
uhub3: at usbus0, port 1, addr 1 (disconnected)
ugen0.2: <vendor 0x046d HD Pro Webcam C920> at usbus0 (disconnected)
uaudio0: at uhub3, port 8, addr 1 (disconnected)
pcm8: detached
uaudio0: detached
ugen0.8: <ACTIONS HS USB FlashDisk> at usbus0 (disconnected)
ugen0.3: <vendor 0x8087 product 0x0032> at usbus0 (disconnected)
ubt0: at uhub3, port 13, addr 2 (disconnected)
ubt0: detached
ugen0.4: <vendor 0x0a12 product 0x4010> at usbus0 (disconnected)
uhub5: at uhub3, port 15, addr 8 (disconnected)
ugen0.5: <Qualcomm UGREEN-CM672> at usbus0 (disconnected)
usbhid6: at uhub5, port 1, addr 9 (disconnected)
hcons2: detached
hidbus6: detached
usbhid6: detached
usbhid7: at uhub5, port 1, addr 9 (disconnected)
hidbus7: detached
usbhid7: detached
uhub5: detached
ugen0.6: <MSI MYSTIC LIGHT> at usbus0 (disconnected)
usbhid8: at uhub3, port 17, addr 5 (disconnected)
hidbus8: detached
usbhid8: detached
ugen0.7: <MediaTek Inc. WirelessDevice> at usbus0 (disconnected)
ubt1: at uhub3, port 18, addr 6 (disconnected)
ubt1: detached
uhub3: detached
uhub3 on usbus0
uhub3: <AMD XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus0
uhub3: 18 ports with 18 removable, self powered
 
Didn't find it in the Linux quirks table, but #269085 above contained the required quirks. Fixed by adding the following to /boot/loader.conf:

Code:
# quirks for RUIZU MP3 player o_O
hw.usb.quirk.0="0x10d6 0x1101 0 0xffff UQ_MSC_NO_GETMAXLUN"
hw.usb.quirk.1="0x10d6 0x1101 0 0xffff UQ_MSC_NO_SYNC_CACHE"

Think I'll use this as motivation to learn how to contribute to the project. I gather it's usually via GitHub PR these days.
 
Back
Top