Skip to content

Commit

Permalink
USB: EHCI: fix regression related to qh_refresh()
Browse files Browse the repository at this point in the history
This patch adds some code that inadvertently got left out of commit
c1fdb68 (USB: EHCI: changes related
to qh_refresh()).  The calls to qh_refresh() and qh_link_periodic()
were taken out of qh_schedule(); therefore it is necessary to call
these routines manually after calling qh_schedule().

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-and-tested-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed May 30, 2013
1 parent e2e2f0e commit 077f5f1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/usb/host/ehci-sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -646,16 +646,21 @@ static void end_unlink_intr(struct ehci_hcd *ehci, struct ehci_qh *qh)
/* reschedule QH iff another request is queued */
if (!list_empty(&qh->qtd_list) && ehci->rh_state == EHCI_RH_RUNNING) {
rc = qh_schedule(ehci, qh);
if (rc == 0) {
qh_refresh(ehci, qh);
qh_link_periodic(ehci, qh);
}

/* An error here likely indicates handshake failure
* or no space left in the schedule. Neither fault
* should happen often ...
*
* FIXME kill the now-dysfunctional queued urbs
*/
if (rc != 0)
else {
ehci_err(ehci, "can't reschedule qh %p, err %d\n",
qh, rc);
}
}

/* maybe turn off periodic schedule */
Expand Down

0 comments on commit 077f5f1

Please sign in to comment.