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)
committerMike Lockwood <lockwood@android.com>
Thu, 15 Apr 2010 19:33:35 +0000 (15:33 -0400)
commit0fc7f96b5be344f7a5499e29b30f245fb857f4a2
tree5f4a24892bf7a8b55754ded0c2689342344d9eb3
parente27f17b5318851395a66cbaf1524ea89ff8f0cb9
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.c