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.
 
Back
Top