Re: g_mass_storage emulation of flash drive - difficulties with passing vendor/product ID

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alan Robertson wrote:

> On Sat, Jul 8, 2017 at 4:52 PM, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
>> On Sat, 8 Jul 2017, Alan Robertson wrote:
>>
>>> On Sat, Jul 8, 2017 at 2:04 AM, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:

< snip >

>>> > Did you try enabling verbose debugging in g_mass_storage?  This
>>> > requires setting CONFIG_USB_GADGET_DEBUG and CONFIG_USB_GADGET_VERBOSE
>>> > in the kernel configuration and then rebuilding g_mass_storage.ko.
>>> > And at runtime you may need to enable dynamic debugging by doing
>>> >
>>> >         echo 'module g_mass_storage =p' >/sys/kernel/dynamic_debug/control
>>> >
>>> > before plugging the device into anything.  Then compare the contents of
>>> > the dmesg log for the different scenarios.  In particular, look for
>>> > differences between plugging it into System 2 (say) right after boot
>>> > vs. after plugging it into System 1.
>>>
>>> OK interesting - I'll need to do some searching to understand how to
>>> change that and rebuild g_mass_storage.ko but I like the idea of
>>> seeing more detail about what is happening as the systems are closed
>>> so I'm unable to do any troubleshooting at that end.
>>
>> Do you have any experience in building a kernel for the Raspberry Pi?
>> The procedure is explained on several web sites, but you have to know
>> what you're doing.
>
> No I don't - I'll have a read over things to see what I can suss out.

The 'Linux File-Stor Gadget' string is part of the SCSI inquiry data, and
is set by the fsg_common_set_inquiry_string() function in f_mass_storage.c.
This must be what the problematic host systems are reacting to, and not any
of the USB info that you have overridden. It looks like there is a way to
override this string using configfs, perhaps Alan will know how to do this.

Hope this helps,
Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux