USB storage detachment / reattachment

Josef Söntgen josef.soentgen at ...1...
Fri Feb 10 18:23:02 CET 2017

Hello Boris,

* Boris Mulder <boris.mulder at ...434...> [2017-02-10 14:12:18 +0100]:
> Now, I'm spawning this usb block driver dynamically, which then tries to
> connect to the usb driver. In my scenario, the usb driver is found, but
> at some point the usb_block just hangs at the first time it reaches the
> line:
> iface.bulk_transfer(p, ep, block, &c);
> (usb_block/ line 308, called from line 432 as I verified with
> print statements in the code)
> the bulk_transfer method (with block=true) blocks indefinitely.

It looks like the INQUIRY command does not complete; I already observed
this behaviour with a Delock USB SATA adapter. When using a HDD, we
might need to issue a START STOP UNIT command to get the device into
working state before executing any other command but I did not look
into that so far.

> <config uhci="yes" ehci="yes" xhci="yes">
>     <hid/>
>     <raw>
>     <report devices="yes"/>
>     <policy label="media -> usb_blk -> usb-1-3" vendor_id="0x058f" product_id="0x6387" bus="0x0001" dev="0x0003"/>
>     </raw>
> </config>

That being said, judging by the vendor and product id, you are using a
Transcend USB stick. We had problems with such sticks in past, even
when using the usb_drv's in-build storage driver. So could you please
try using another vendor, just to make sure, that it is indeed the
combination of stick and driver that does not work.

It is mostly likely that we might not wait long enough in the usb_block
driver for the device to get itself into a working state or that we
do not do all of the configuration necessary, i.e., appyling quirks
and stuff, to get it there.


Josef Söntgen
Genode Labs ·

More information about the users mailing list