Unable to mount a storage from ebook reader attached via USB

Hello!

Recently migrated from now unsupported FreeBSD 12 to the recent FreeBSD 14 and faced an issue with USB.
I'm not able to mount a storage located on the ebook reader connected via USB anymore.

Fragment from kernel messages:
Code:
usb_msc_auto_quirk: UQ_MSC_NO_TEST_UNIT_READY set for USB mass storage device Sibrary Ebook Device (0x05e3:0x0726)
usb_msc_auto_quirk: UQ_MSC_NO_SYNC_CACHE set for USB mass storage device Sibrary Ebook Device (0x05e3:0x0726)
ugen0.4: <Sibrary Ebook Device> at usbus0
umass0 on uhub0
umass0: <Sibrary Ebook Device, class 0/0, rev 2.00/2.22, addr 7> on usbus0
umass0:  SCSI over Bulk-Only; quirks = 0x4001
umass0:6:0: Attached to scbus6
(probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 00 00 00 24 00 
(probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
(probe0:umass-sim0:0:0:0): Retrying command, 3 more tries remain
(probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 00 00 00 24 00 
(probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
(probe0:umass-sim0:0:0:0): Retrying command, 2 more tries remain
da0 at umass-sim0 bus 0 scbus6 target 0 lun 0
da0: <rockchip rk28 sdk demo 0000> Removable Direct Access SCSI-2 device
da0: 40.000MB/s transfers
da0: Attempt to query device size failed: NOT READY, Medium not present
da0: quirks=0x2<NO_6_BYTE>
da1 at umass-sim0 bus 0 scbus6 target 0 lun 1
da1: <rockchip rk28 sdk demo 0000> Removable Direct Access SCSI-2 device
da1: 40.000MB/s transfers
da1: 3260MB (6676480 512 byte sectors)
da1: quirks=0x2<NO_6_BYTE>
(da1:umass-sim0:0:0:1): READ(10). CDB: 28 20 00 00 00 80 00 00 10 00 
(da1:umass-sim0:0:0:1): CAM status: SCSI Status Error
(da1:umass-sim0:0:0:1): SCSI status: Check Condition
(da1:umass-sim0:0:0:1): SCSI sense: NOT READY asc:3a,0 (Medium not present)
(da1:umass-sim0:0:0:1): Error 6, Unretryable error
There are disk devices, but not mountable, looks like those contain no file systems.
ls -l /dev/da*
Code:
crw-r-----  1 root operator - 0x1db Oct 21 11:36 /dev/da0
crw-r-----  1 root operator - 0x1dc Oct 21 11:36 /dev/da1

camcontrol devlist | grep \(da
Code:
<rockchip rk28 sdk demo 0000>      at scbus6 target 0 lun 0 (da0,pass1)
<rockchip rk28 sdk demo 0000>      at scbus6 target 0 lun 1 (da1,pass2)

mount -t msdos /dev/da1 /mnt/tmp
Code:
mount_msdosfs: /dev/da1: Device not configured

fdisk -s /dev/da1
Code:
fdisk: can't get disk parameters on /dev/da1
fdisk: cannot open disk /dev/da1: No such file or directory
The cable is OK and it is inserted into USB 2 port.
Is it possible to fix this issue?

I'll attach output of usbconfig -v
 

Attachments

Try a different usb port.
Yes, I've tried maybe all available USB ports (2 and 3.0), with different cables.
As I written already I'm able to access the storage on the ebook under FreeBSD 12 on the same PC, but not under FreeBSD 14.
FreeBSD 14 is attaching and detaching device after a moment.
 
Try to compare the relevant parts of dmesg or /var/log/messages between a FreeBSD 12 and FreeBSD 14 boot. See if there are differences in how the device is reported when plugged in. If you can't spot any, try the same with a verbose boot.
 
Try to compare the relevant parts of dmesg or /var/log/messages between a FreeBSD 12 and FreeBSD 14 boot. See if there are differences in how the device is reported when plugged in. If you can't spot any, try the same with a verbose boot.
/var/log/messages on FreeBSD 14 contains this:
Code:
usb_msc_auto_quirk: UQ_MSC_NO_TEST_UNIT_READY set for USB mass storage device Sibrary Ebook Device (0x05e3:0x0726)
usb_msc_auto_quirk: UQ_MSC_NO_SYNC_CACHE set for USB mass storage device Sibrary Ebook Device (0x05e3:0x0726)
ugen0.4: <Sibrary Ebook Device> at usbus0
umass0 on uhub1
umass0: <Sibrary Ebook Device, class 0/0, rev 2.00/2.22, addr 8> on usbus0
umass0:  SCSI over Bulk-Only; quirks = 0x4001
umass0:6:0: Attached to scbus6
(probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 00 00 00 24 00
(probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
(probe0:umass-sim0:0:0:0): Retrying command, 3 more tries remain
(probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 00 00 00 24 00
(probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
(probe0:umass-sim0:0:0:0): Retrying command, 2 more tries remain
da0 at umass-sim0 bus 0 scbus6 target 0 lun 0
da0: <rockchip rk28 sdk demo 0000> Removable Direct Access SCSI-2 device
da0: 40.000MB/s transfers
da0: Attempt to query device size failed: NOT READY, Medium not present
da0: quirks=0x2<NO_6_BYTE>
da1 at umass-sim0 bus 0 scbus6 target 0 lun 1
da1: <rockchip rk28 sdk demo 0000> Removable Direct Access SCSI-2 device
da1: 40.000MB/s transfers
da1: 3252MB (6660096 512 byte sectors)
da1: quirks=0x2<NO_6_BYTE>

/var/log/messages on FreeBSD 12 has no errors or entries and usb_msc_auto_quirk lines:
Code:
ugen0.4: <Sibrary Ebook Device> at usbus0
umass0 on uhub1
umass0: <Sibrary Ebook Device, class 0/0, rev 2.00/2.22, addr 3> on usbus0
umass0:  SCSI over Bulk-Only; quirks = 0x4000
umass0:6:0: Attached to scbus6
da0 at umass-sim0 bus 0 scbus6 target 0 lun 0
da0: <rockchip rk28 sdk demo 0000> Removable Direct Access SCSI-2 device
da0: 40.000MB/s transfers
da0: Attempt to query device size failed: NOT READY, Medium not present
da0: quirks=0x2<NO_6_BYTE>
da1 at umass-sim0 bus 0 scbus6 target 0 lun 1
da1: <rockchip rk28 sdk demo 0000> Removable Direct Access SCSI-2 device
da1: 40.000MB/s transfers
da1: Attempt to query device size failed: NOT READY, Medium not present
da1: quirks=0x2<NO_6_BYTE>

I tried to boot recent FreeBSD 13 installation disk and received the same result as on FreeBSD 14 - ebook asks about storage attaching, allowing to connect and it disconnects in a moment, only charging a battery:
Code:
usb_msc_auto_quirk: UQ_MSC_NO_TEST_UNIT_READY set for USB mass storage device Sibrary Ebook Device (0x05e3:0x0726)
usb_msc_auto_quirk: UQ_MSC_NO_SYNC_CACHE set for USB mass storage device Sibrary Ebook Device (0x05e3:0x0726)
ugen0.5: <Sibrary Ebook Device> at usbus0
umass1 on uhub0
umass1: <Sibrary Ebook Device, class 0/0, rev 2.00/2.22, addr 5> on usbus0
umass1:  SCSI over Bulk-Only; quirks = 0x4001
umass1:7:1: Attached to scbus7
(probe0:umass-sim1:1:0:0): INQUIRY. CDB: 12 00 00 00 24 00
(probe0:umass-sim1:1:0:0): CAM status: CCB request completed with an error
(probe0:umass-sim1:1:0:0): Retrying command, 3 more tries remain
(probe0:umass-sim1:1:0:0): INQUIRY. CDB: 12 00 00 00 24 00
(probe0:umass-sim1:1:0:0): CAM status: CCB request completed with an error
(probe0:umass-sim1:1:0:0): Retrying command, 2 more tries remain
da1 at umass-sim1 bus 1 scbus7 target 0 lun 0
da1: <rockchip rk28 sdk demo 0000> Removable Direct Access SCSI-2 device
da1: 40.000MB/s transfers
da1: Attempt to query device size failed: NOT READY, Medium not present
da1: quirks=0x2<NO_6_BYTE>
da2 at umass-sim1 bus 1 scbus7 target 0 lun 1
da2: <rockchip rk28 sdk demo 0000> Removable Direct Access SCSI-2 device
da2: 40.000MB/s transfers
da2: 3252MB (6660096 512 byte sectors)
da2: quirks=0x2<NO_6_BYTE>
 
Tried to boot older FreeBSD releases.
13.0-RELEASE behaves like 12.4 and allows me to mount the storage on ebook.
It reports that medium is not present, but I'm able to mount and read/write.
13.1-RELEASE and later detect storage successfully but device detaches after a moment.
 
So, I know this is a little old. I'm sorry for the tardy reply. I just got interested in these issues.

What I think is happening is this. In 13 hps introduced an autoprobe for mass storage devices. We do all kinds of things to the device to see if it works, and if it does great, and if not we set various quirks to streamline operation. The quirk tables had gotten out of hand.

In most cases, this is actually quite awesome. In some, like yours, though, we mess up the job and leave the device in a very unhappy state. No good can come from this, as you've discovered. So let's step back and see if we can force the 'old' quirks and see if that suffices.

So let's start simple: does `usbconfig -d ugen0.5 reset` fix everything? Try a couple of times. Let me know how many it takes :).

Next, we need to see if the quirks are causing problems. I kinda doubt it because we've only added 'test unit ready' to the list of quirks, and that's one of the more benal quirks to get wrong

I think that you can do something like `usbconfig -d ugen0.5 add_quirk UQ_MSC_NO_SYNC_CACHE` followed by the same reset above. Does that fix things?

If reset doesn't work, you could try power_off and then power_on too.

Please report back what you find.
 
So, I know this is a little old. I'm sorry for the tardy reply. I just got interested in these issues.

What I think is happening is this. In 13 hps introduced an autoprobe for mass storage devices. We do all kinds of things to the device to see if it works, and if it does great, and if not we set various quirks to streamline operation. The quirk tables had gotten out of hand.

In most cases, this is actually quite awesome. In some, like yours, though, we mess up the job and leave the device in a very unhappy state. No good can come from this, as you've discovered. So let's step back and see if we can force the 'old' quirks and see if that suffices.

So let's start simple: does `usbconfig -d ugen0.5 reset` fix everything? Try a couple of times. Let me know how many it takes :).

Next, we need to see if the quirks are causing problems. I kinda doubt it because we've only added 'test unit ready' to the list of quirks, and that's one of the more benal quirks to get wrong

I think that you can do something like `usbconfig -d ugen0.5 add_quirk UQ_MSC_NO_SYNC_CACHE` followed by the same reset above. Does that fix things?

If reset doesn't work, you could try power_off and then power_on too.

Please report back what you find.

Replying to an old thread because search has guided me to this thread which appears to be most applicable to my situation.

I am trying to mount the user accessible storage partition on my Onyx Boox i86MLPlus (eReader) on my freeBSD laptop. It mounts just fine on my mac.

Upon plugging in the USB cable, there appears a confirmation prompt on the ereader to enable USB storage and the same is enabled only after confirming that prompt. Based on the following dmesg, I suspect this delay between USB connection and enabling of USB storage mode on the eReader may be too much and freeBSD may be trying to query various storage device properties (and set quirks? as hinted by imp@) immediately upon detecting a USB device.

Code:
umass0: detached
umass0 on uhub0
umass0: <ONYX I86MLPlus, class 0/0, rev 2.00/99.99, addr 7> on usbus0
umass0:  SCSI over Bulk-Only; quirks = 0x4005
umass0:1:0: Attached to scbus1
da0 at umass-sim0 bus 0 scbus1 target 0 lun 0
da0: <Linux File-CD Gadget 0000> Removable Direct Access SCSI-2 device
da0: 40.000MB/s transfers
da0: Attempt to query device size failed: NOT READY, Medium not present
da0: quirks=0x2<NO_6_BYTE>
da1 at umass-sim0 bus 0 scbus1 target 0 lun 1
da1: <Linux File-CD Gadget 0000> Removable Direct Access SCSI-2 device
da1: 40.000MB/s transfers
da1: Attempt to query device size failed: NOT READY, Medium not present
da1: quirks=0x2<NO_6_BYTE>

Output of
Code:
gpart show
does not list any partitions from my eReader either.

Obviously, attempts to mount /dev/da0 or /dev/da1 fail with different error messages.

Code:
root@t490-bsd:/mnt # mount /dev/da0 /mnt/msg
mount: /dev/da0: No such file or directory
root@t490-bsd:/mnt # mount /dev/da1 /mnt/msg
mount: /dev/da1: Device not configured
I understand I must specify a partition, not a device, to mount, but there are no partitions from my eReader listed in /dev.

Learning about /etc/autofs/special_media from somewhere else on the internet to figure out the device paths for my ereaders storage partitions resulted in a dead end as well.

Code:
root@t490-bsd:/mnt # /etc/autofs/special_media
I86MLPLUS
I am not sure how this information can be useful to my situation?

Running the usbconfig command suggested by imp@ just brings up that confirmation prompt again on the ereader screen, accepting which results in the same description as above.

Code:
usbconfig -d ugen0.6 reset

Thank you for your time reading this long post. I hope someone can point me in the correct direction.
 
What filesystem does it mount as on your Mac?
It mounts as a FAT32 partition on my mac, with volume label of I86MLPLUS (which was read by /etc/autofs/special_media correctly).

PS: Apologies for the delayed response. Thank you for reading my post!
 
Hmm, perhaps it needs some special quirk. Can you dump the config with usbconfig(8) and paste it somewhere?

usbconfig dump_all_desc and dump_quirk_names is pasted here.

dump_device_quirks output is fairly large and the file is attached with this post.

Please advise if anything else is required. Thank you!

Code:
root@t490-bsd:~ # usbconfig -d ugen0.6 dump_all_desc
ugen0.6: <Android Open Accessory device (accessory + ADB) Google Inc.> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (2mA)

  bLength = 0x0012 
  bDescriptorType = 0x0001 
  bcdUSB = 0x0200 
  bDeviceClass = 0x0000  <Probed by interface class>
  bDeviceSubClass = 0x0000 
  bDeviceProtocol = 0x0000 
  bMaxPacketSize0 = 0x0040 
  idVendor = 0x18d1 
  idProduct = 0x2d01 
  bcdDevice = 0x9999 
  iManufacturer = 0x0002  <ONYX>
  iProduct = 0x0003  <I86MLPlus>
  iSerialNumber = 0x0004  <0123456789ABCDEF>
  bNumConfigurations = 0x0001 

 Configuration index 0

    bLength = 0x0009 
    bDescriptorType = 0x0002 
    wTotalLength = 0x0020 
    bNumInterfaces = 0x0001 
    bConfigurationValue = 0x0001 
    iConfiguration = 0x0000  <no string>
    bmAttributes = 0x0080 
    bMaxPower = 0x0001 

    Interface 0
      bLength = 0x0009 
      bDescriptorType = 0x0004 
      bInterfaceNumber = 0x0000 
      bAlternateSetting = 0x0000 
      bNumEndpoints = 0x0002 
      bInterfaceClass = 0x0008  <Mass storage>
      bInterfaceSubClass = 0x0006 
      bInterfaceProtocol = 0x0050 
      iInterface = 0x0001  <Mass Storage>

     Endpoint 0
        bLength = 0x0007 
        bDescriptorType = 0x0005 
        bEndpointAddress = 0x0081  <IN>
        bmAttributes = 0x0002  <BULK>
        wMaxPacketSize = 0x0200 
        bInterval = 0x0000 
        bRefresh = 0x0000 
        bSynchAddress = 0x0000 

     Endpoint 1
        bLength = 0x0007 
        bDescriptorType = 0x0005 
        bEndpointAddress = 0x0001  <OUT>
        bmAttributes = 0x0002  <BULK>
        wMaxPacketSize = 0x0200 
        bInterval = 0x0001 
        bRefresh = 0x0000 
        bSynchAddress = 0x0000

Code:
root@t490-bsd:~ # usbconfig -d ugen0.6 dump_quirk_names

Dumping list of supported quirks:

UQ_MATCH_VENDOR_ONLY
UQ_AUDIO_SWAP_LR
UQ_AU_INP_ASYNC
UQ_AU_NO_FRAC
UQ_AU_NO_XU
UQ_BAD_ADC
UQ_BAD_AUDIO
UQ_BROKEN_BIDIR
UQ_BUS_POWERED
UQ_HID_IGNORE
UQ_KBD_IGNORE
UQ_KBD_BOOTPROTO
UQ_UMS_IGNORE
UQ_MS_BAD_CLASS
UQ_MS_LEADING_BYTE
UQ_MS_REVZ
UQ_MS_VENDOR_BTN
UQ_NO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