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>
Tue, 14 Jun 2011 16:09:07 +0000 (09:09 -0700)
commit27d1890c42600e15ac71642b9cf863f9a0d068ba
tree55d35b5fa6072359d53d9dcdb8006259464a98dd
parent0130a0e683e4266bda24c27c246dc1adaa6fad9a
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