>>> Even though it makes me wonder whether f_mass_storage isn't missing
>>> something in its original code.
>>
>> I wondered about that too. The difference is that f_mass_storage uses
>> the composite framework. How does composite handle disconnects and
>> port resets? The framework might need
> > > Unfortunately the driver already contains an FSG_STATE_RESET symbol.
> > > The patch renames it to FSG_STATE_CLASS_RESET, because it refers to a
> > > class-specific reset event rather than a general USB port reset, and
> > > uses FSG_STATE_RESET for port resets. The g_mass_storage driver
On Tue, 21 Aug 2012, Michal Nazarewicz wrote:
> Alan Stern writes:
> > This patch (as1598) adds support for the new "reset" callback to the
> > g_file_storage driver. Resets are handled slightly differently from
> > disconnects, in that the driver doesn't sync the backing storage file
> > during
Alan Stern writes:
> This patch (as1598) adds support for the new "reset" callback to the
> g_file_storage driver. Resets are handled slightly differently from
> disconnects, in that the driver doesn't sync the backing storage file
> during a reset but does during a disconnect.
>
> The problem is
>
> drivers/usb/gadget/f_mass_storage.c |5 +++--
> drivers/usb/gadget/file_storage.c | 20
> drivers/usb/gadget/storage_common.c |3 ++-
> 3 files changed, 21 insertions(+), 7 deletions(-)
>
> Index: usb-3.5/drivers/usb/gadget/storage_common.c
>