|
@@ -942,7 +942,7 @@ ehci_endpoint_disable (struct usb_hcd *hcd, struct usb_host_endpoint *ep)
|
|
|
{
|
|
|
struct ehci_hcd *ehci = hcd_to_ehci (hcd);
|
|
|
unsigned long flags;
|
|
|
- struct ehci_qh *qh, *tmp;
|
|
|
+ struct ehci_qh *qh;
|
|
|
|
|
|
/* ASSERT: any requests/urbs are being unlinked */
|
|
|
/* ASSERT: nobody can be submitting urbs for this any more */
|
|
@@ -972,17 +972,13 @@ rescan:
|
|
|
qh->qh_state = QH_STATE_IDLE;
|
|
|
switch (qh->qh_state) {
|
|
|
case QH_STATE_LINKED:
|
|
|
- case QH_STATE_COMPLETING:
|
|
|
- for (tmp = ehci->async->qh_next.qh;
|
|
|
- tmp && tmp != qh;
|
|
|
- tmp = tmp->qh_next.qh)
|
|
|
- continue;
|
|
|
- /* periodic qh self-unlinks on empty, and a COMPLETING qh
|
|
|
- * may already be unlinked.
|
|
|
- */
|
|
|
- if (tmp)
|
|
|
+ WARN_ON(!list_empty(&qh->qtd_list));
|
|
|
+ if (usb_endpoint_type(&ep->desc) != USB_ENDPOINT_XFER_INT)
|
|
|
start_unlink_async(ehci, qh);
|
|
|
+ else
|
|
|
+ start_unlink_intr(ehci, qh);
|
|
|
/* FALL THROUGH */
|
|
|
+ case QH_STATE_COMPLETING: /* already in unlinking */
|
|
|
case QH_STATE_UNLINK: /* wait for hw to finish? */
|
|
|
case QH_STATE_UNLINK_WAIT:
|
|
|
idle_timeout:
|