summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2013-10-11 17:28:44 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-12 01:37:46 +0200
commit27c4a31d6739095d613c6e72fb44867bc28c699f (patch)
tree12a386eae8d699599da2c755d19c3a3fd2d080e3 /drivers/usb/host
parentUSB: EHCI: No SSPLIT allowed in uframe 7 (diff)
downloadlinux-27c4a31d6739095d613c6e72fb44867bc28c699f.tar.xz
linux-27c4a31d6739095d613c6e72fb44867bc28c699f.zip
USB: EHCI: change toggle only upon successful reset
ehci-hcd uses a value of 0 in an endpoint's toggle flag to indicate that the endpoint has been reset (and therefore the Data Toggle bit needs to be cleared in the endpoint's QH overlay region). The toggle flag should be set to 0 only when ehci_endpoint_reset() succeeds. This patch moves the usb_settoggle() call into the appropriate branch of the "if" statement. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/ehci-hcd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 3e3ca839e6ce..652018f93632 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -1022,7 +1022,6 @@ ehci_endpoint_reset(struct usb_hcd *hcd, struct usb_host_endpoint *ep)
* the toggle bit in the QH.
*/
if (qh) {
- usb_settoggle(qh->dev, epnum, is_out, 0);
if (!list_empty(&qh->qtd_list)) {
WARN_ONCE(1, "clear_halt for a busy endpoint\n");
} else {
@@ -1030,6 +1029,7 @@ ehci_endpoint_reset(struct usb_hcd *hcd, struct usb_host_endpoint *ep)
* while the QH is active. Unlink it now;
* re-linking will call qh_refresh().
*/
+ usb_settoggle(qh->dev, epnum, is_out, 0);
qh->exception = 1;
if (eptype == USB_ENDPOINT_XFER_BULK)
start_unlink_async(ehci, qh);