diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-07-04 13:05:59 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-07-04 13:05:59 +0200 |
commit | 214cc39d175c89cafa5acfe4df22502e8d86c506 (patch) | |
tree | 1eeaf502b41d1c3e8b6d65c8a3762337dade360f /drivers/usb/gadget/function | |
parent | Revert "dt-bindings: add binding for USBSS-DRD controller." (diff) | |
download | linux-214cc39d175c89cafa5acfe4df22502e8d86c506.tar.xz linux-214cc39d175c89cafa5acfe4df22502e8d86c506.zip |
Revert "usb: gadget: storage: Remove warning message"
This reverts commit e70b3f5da00119e057b7faa557753fee7f786f17.
EJ writes:
Thinh found this patch might cause a failure in USB CV TD 9.13
Set Configuration Test. We are trying to fix it. Could you
please defer the merging of this patch until we fix it?
So am now dropping it.
Reported-by: EJ Hsu <ejh@nvidia.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/gadget/function')
-rw-r--r-- | drivers/usb/gadget/function/f_mass_storage.c | 21 | ||||
-rw-r--r-- | drivers/usb/gadget/function/storage_common.h | 1 |
2 files changed, 6 insertions, 16 deletions
diff --git a/drivers/usb/gadget/function/f_mass_storage.c b/drivers/usb/gadget/function/f_mass_storage.c index b1fba3132427..29cc5693e05c 100644 --- a/drivers/usb/gadget/function/f_mass_storage.c +++ b/drivers/usb/gadget/function/f_mass_storage.c @@ -2293,7 +2293,8 @@ static int fsg_set_alt(struct usb_function *f, unsigned intf, unsigned alt) static void fsg_disable(struct usb_function *f) { struct fsg_dev *fsg = fsg_from_func(f); - raise_exception(fsg->common, FSG_STATE_DISCONNECT); + fsg->common->new_fsg = NULL; + raise_exception(fsg->common, FSG_STATE_CONFIG_CHANGE); } @@ -2306,7 +2307,6 @@ static void handle_exception(struct fsg_common *common) enum fsg_state old_state; struct fsg_lun *curlun; unsigned int exception_req_tag; - struct fsg_dev *fsg; /* * Clear the existing signals. Anything but SIGUSR1 is converted @@ -2413,19 +2413,9 @@ static void handle_exception(struct fsg_common *common) break; case FSG_STATE_CONFIG_CHANGE: - fsg = common->new_fsg; - /* - * Add a check here to double confirm if a disconnect event - * occurs and common->new_fsg has been cleared. - */ - if (fsg) { - do_set_interface(common, fsg); + do_set_interface(common, common->new_fsg); + if (common->new_fsg) usb_composite_setup_continue(common->cdev); - } - break; - - case FSG_STATE_DISCONNECT: - do_set_interface(common, NULL); break; case FSG_STATE_EXIT: @@ -2999,7 +2989,8 @@ static void fsg_unbind(struct usb_configuration *c, struct usb_function *f) DBG(fsg, "unbind\n"); if (fsg->common->fsg == fsg) { - raise_exception(fsg->common, FSG_STATE_DISCONNECT); + fsg->common->new_fsg = NULL; + raise_exception(fsg->common, FSG_STATE_CONFIG_CHANGE); /* FIXME: make interruptible or killable somehow? */ wait_event(common->fsg_wait, common->fsg != fsg); } diff --git a/drivers/usb/gadget/function/storage_common.h b/drivers/usb/gadget/function/storage_common.h index 12687f7e3de9..e5e3a2553aaa 100644 --- a/drivers/usb/gadget/function/storage_common.h +++ b/drivers/usb/gadget/function/storage_common.h @@ -161,7 +161,6 @@ enum fsg_state { FSG_STATE_ABORT_BULK_OUT, FSG_STATE_PROTOCOL_RESET, FSG_STATE_CONFIG_CHANGE, - FSG_STATE_DISCONNECT, FSG_STATE_EXIT, FSG_STATE_TERMINATED }; |