2
votes

I'm working on a hardware device that exposes itself as a Mass Storage device over USB.

When I plug in a typical USB key it gets attached in device manager as a Mass Storage device with the corresponding disk's removal policy set to Quick Removal.

When I plug in my device the removal policy however is set to "Better Performance". Note that in both cases no driver was installed (This is Windows' Mass Storage driver). Screenshot.

I've tried comparing all the properties on the device properties page to no avail. What am I doing wrong?

3

3 Answers

1
votes

Sorry for answering my own question but upon furthur investigation these are the result:

Linux USB storage gadget driver does not support MODE_SELECT: http://lxr.free-electrons.com/source/drivers/usb/gadget/file_storage.c?v=2.6.35

(Lines 1881 to 1889)

This causes Windows to behave as described above. Returning without an error without doing anything appears to correct this problem but I'm unsure if it is the correct behavior.

0
votes

I would expect that the problem is that the standard Mass Storage driver is checking for a FAT-formatted partition-- finding one on the USB key it sets the policy to Quick Removal; and it doesn't find one on your device.

0
votes

This document will get you where you need to be. Additionally, this SO link is also relevant.