USB: gadget: f_mass_storage: Defer handling interface changes until it is safe.
authorMike Lockwood <lockwood@android.com>
Thu, 15 Apr 2010 19:04:07 +0000 (15:04 -0400)
committerColin Cross <ccross@android.com>
Thu, 30 Sep 2010 00:49:33 +0000 (17:49 -0700)
commite2dd99e8e2dae1cdfcc0aaa59eb66ced015cfea0
tree8204970860831723959ca9d067245385f7c03cb6
parent0274cdc3003d30adb48251558b677dba73e43da6
USB: gadget: f_mass_storage: Defer handling interface changes until it is safe.

Pulling in some code from file_storage.c, we now handle interface changes
in do_set_config(), which is now not called until any pending requests have
been successfully completed or cancelled.

This fixes a race condition that resulted in usb_ep_free_request() being called
while the request is still busy.

Signed-off-by: Mike Lockwood <lockwood@android.com>
drivers/usb/gadget/f_mass_storage_tmp.c