aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/uhci-q.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/uhci-q.c')
-rw-r--r--drivers/usb/host/uhci-q.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/usb/host/uhci-q.c b/drivers/usb/host/uhci-q.c
index fbc3af392c26..bab567266559 100644
--- a/drivers/usb/host/uhci-q.c
+++ b/drivers/usb/host/uhci-q.c
@@ -1557,15 +1557,12 @@ static void uhci_scan_qh(struct uhci_hcd *uhci, struct uhci_qh *qh)
1557 break; 1557 break;
1558 1558
1559 spin_lock(&urb->lock); 1559 spin_lock(&urb->lock);
1560 if (urb->status == -EINPROGRESS) /* Not dequeued */ 1560 urb->status = status;
1561 urb->status = status;
1562 else
1563 status = ECONNRESET; /* Not -ECONNRESET */
1564 spin_unlock(&urb->lock); 1561 spin_unlock(&urb->lock);
1565 1562
1566 /* Dequeued but completed URBs can't be given back unless 1563 /* Dequeued but completed URBs can't be given back unless
1567 * the QH is stopped or has finished unlinking. */ 1564 * the QH is stopped or has finished unlinking. */
1568 if (status == ECONNRESET) { 1565 if (urb->unlinked) {
1569 if (QH_FINISHED_UNLINKING(qh)) 1566 if (QH_FINISHED_UNLINKING(qh))
1570 qh->is_stopped = 1; 1567 qh->is_stopped = 1;
1571 else if (!qh->is_stopped) 1568 else if (!qh->is_stopped)
@@ -1588,7 +1585,7 @@ static void uhci_scan_qh(struct uhci_hcd *uhci, struct uhci_qh *qh)
1588restart: 1585restart:
1589 list_for_each_entry(urbp, &qh->queue, node) { 1586 list_for_each_entry(urbp, &qh->queue, node) {
1590 urb = urbp->urb; 1587 urb = urbp->urb;
1591 if (urb->status != -EINPROGRESS) { 1588 if (urb->unlinked) {
1592 1589
1593 /* Fix up the TD links and save the toggles for 1590 /* Fix up the TD links and save the toggles for
1594 * non-Isochronous queues. For Isochronous queues, 1591 * non-Isochronous queues. For Isochronous queues,