]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/host/ehci-q.c
Merge branch 'upstream-davem' of master.kernel.org:/pub/scm/linux/kernel/git/linville...
[linux-2.6-omap-h63xx.git] / drivers / usb / host / ehci-q.c
index e469221e7ec392088fd1274e278175e29644f7a8..2284028f8aa5e2056d0d309effb03173c9b4ea3f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2001-2004 by David Brownell
- * 
+ *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
  * Free Software Foundation; either version 2 of the License, or (at your
@@ -31,7 +31,7 @@
  * ISO traffic uses "ISO TD" (itd, and sitd) records, and (along with
  * interrupts) needs careful scheduling.  Performance improvements can be
  * an ongoing challenge.  That's in "ehci-sched.c".
- * 
+ *
  * USB 1.1 devices are handled (a) by "companion" OHCI or UHCI root hubs,
  * or otherwise through transaction translators (TTs) in USB 2.0 hubs using
  * (b) special fields in qh entries or (c) split iso entries.  TTs will
 /* fill a qtd, returning how much of the buffer we were able to queue up */
 
 static int
-qtd_fill (struct ehci_qtd *qtd, dma_addr_t buf, size_t len,
-               int token, int maxpacket)
+qtd_fill(struct ehci_hcd *ehci, struct ehci_qtd *qtd, dma_addr_t buf,
+                 size_t len, int token, int maxpacket)
 {
        int     i, count;
        u64     addr = buf;
 
        /* one buffer entry per 4K ... first might be short or unaligned */
-       qtd->hw_buf [0] = cpu_to_le32 ((u32)addr);
-       qtd->hw_buf_hi [0] = cpu_to_le32 ((u32)(addr >> 32));
+       qtd->hw_buf[0] = cpu_to_hc32(ehci, (u32)addr);
+       qtd->hw_buf_hi[0] = cpu_to_hc32(ehci, (u32)(addr >> 32));
        count = 0x1000 - (buf & 0x0fff);        /* rest of that page */
        if (likely (len < count))               /* ... iff needed */
                count = len;
@@ -62,8 +62,9 @@ qtd_fill (struct ehci_qtd *qtd, dma_addr_t buf, size_t len,
                /* per-qtd limit: from 16K to 20K (best alignment) */
                for (i = 1; count < len && i < 5; i++) {
                        addr = buf;
-                       qtd->hw_buf [i] = cpu_to_le32 ((u32)addr);
-                       qtd->hw_buf_hi [i] = cpu_to_le32 ((u32)(addr >> 32));
+                       qtd->hw_buf[i] = cpu_to_hc32(ehci, (u32)addr);
+                       qtd->hw_buf_hi[i] = cpu_to_hc32(ehci,
+                                       (u32)(addr >> 32));
                        buf += 0x1000;
                        if ((count + 0x1000) < len)
                                count += 0x1000;
@@ -75,7 +76,7 @@ qtd_fill (struct ehci_qtd *qtd, dma_addr_t buf, size_t len,
                if (count != len)
                        count -= (count % maxpacket);
        }
-       qtd->hw_token = cpu_to_le32 ((count << 16) | token);
+       qtd->hw_token = cpu_to_hc32(ehci, (count << 16) | token);
        qtd->length = count;
 
        return count;
@@ -89,28 +90,28 @@ qh_update (struct ehci_hcd *ehci, struct ehci_qh *qh, struct ehci_qtd *qtd)
        /* writes to an active overlay are unsafe */
        BUG_ON(qh->qh_state != QH_STATE_IDLE);
 
-       qh->hw_qtd_next = QTD_NEXT (qtd->qtd_dma);
-       qh->hw_alt_next = EHCI_LIST_END;
+       qh->hw_qtd_next = QTD_NEXT(ehci, qtd->qtd_dma);
+       qh->hw_alt_next = EHCI_LIST_END(ehci);
 
        /* Except for control endpoints, we make hardware maintain data
         * toggle (like OHCI) ... here (re)initialize the toggle in the QH,
         * and set the pseudo-toggle in udev. Only usb_clear_halt() will
         * ever clear it.
         */
-       if (!(qh->hw_info1 & cpu_to_le32(1 << 14))) {
+       if (!(qh->hw_info1 & cpu_to_hc32(ehci, 1 << 14))) {
                unsigned        is_out, epnum;
 
-               is_out = !(qtd->hw_token & cpu_to_le32(1 << 8));
-               epnum = (le32_to_cpup(&qh->hw_info1) >> 8) & 0x0f;
+               is_out = !(qtd->hw_token & cpu_to_hc32(ehci, 1 << 8));
+               epnum = (hc32_to_cpup(ehci, &qh->hw_info1) >> 8) & 0x0f;
                if (unlikely (!usb_gettoggle (qh->dev, epnum, is_out))) {
-                       qh->hw_token &= ~__constant_cpu_to_le32 (QTD_TOGGLE);
+                       qh->hw_token &= ~cpu_to_hc32(ehci, QTD_TOGGLE);
                        usb_settoggle (qh->dev, epnum, is_out, 1);
                }
        }
 
        /* HC must see latest qtd and qh data before we clear ACTIVE+HALT */
        wmb ();
-       qh->hw_token &= __constant_cpu_to_le32 (QTD_TOGGLE | QTD_STS_PING);
+       qh->hw_token &= cpu_to_hc32(ehci, QTD_TOGGLE | QTD_STS_PING);
 }
 
 /* if it weren't for a common silicon quirk (writing the dummy into the qh
@@ -128,7 +129,7 @@ qh_refresh (struct ehci_hcd *ehci, struct ehci_qh *qh)
                qtd = list_entry (qh->qtd_list.next,
                                struct ehci_qtd, qtd_list);
                /* first qtd may already be partially processed */
-               if (cpu_to_le32 (qtd->qtd_dma) == qh->hw_current)
+               if (cpu_to_hc32(ehci, qtd->qtd_dma) == qh->hw_current)
                        qtd = NULL;
        }
 
@@ -199,7 +200,7 @@ static void qtd_copy_status (
                                && ((token & QTD_STS_MMF) != 0
                                        || QTD_CERR(token) == 0)
                                && (!ehci_is_TDI(ehci)
-                                       || urb->dev->tt->hub !=
+                                       || urb->dev->tt->hub !=
                                           ehci_to_hcd(ehci)->self.root_hub)) {
 #ifdef DEBUG
                        struct usb_device *tt = urb->dev->tt->hub;
@@ -214,7 +215,7 @@ static void qtd_copy_status (
 }
 
 static void
-ehci_urb_done (struct ehci_hcd *ehci, struct urb *urb, struct pt_regs *regs)
+ehci_urb_done (struct ehci_hcd *ehci, struct urb *urb)
 __releases(ehci->lock)
 __acquires(ehci->lock)
 {
@@ -222,7 +223,7 @@ __acquires(ehci->lock)
                struct ehci_qh  *qh = (struct ehci_qh *) urb->hcpriv;
 
                /* S-mask in a QH means it's an interrupt urb */
-               if ((qh->hw_info2 & __constant_cpu_to_le32 (QH_SMASK)) != 0) {
+               if ((qh->hw_info2 & cpu_to_hc32(ehci, QH_SMASK)) != 0) {
 
                        /* ... update hc-wide periodic stats (for usbfs) */
                        ehci_to_hcd(ehci)->self.bandwidth_int_reqs--;
@@ -262,7 +263,7 @@ __acquires(ehci->lock)
 
        /* complete() can reenter this HCD */
        spin_unlock (&ehci->lock);
-       usb_hcd_giveback_urb (ehci_to_hcd(ehci), urb, regs);
+       usb_hcd_giveback_urb (ehci_to_hcd(ehci), urb);
        spin_lock (&ehci->lock);
 }
 
@@ -277,9 +278,8 @@ static int qh_schedule (struct ehci_hcd *ehci, struct ehci_qh *qh);
  * Chases up to qh->hw_current.  Returns number of completions called,
  * indicating how much "real" work we did.
  */
-#define HALT_BIT __constant_cpu_to_le32(QTD_STS_HALT)
 static unsigned
-qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh, struct pt_regs *regs)
+qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh)
 {
        struct ehci_qtd         *last = NULL, *end = qh->dummy;
        struct list_head        *entry, *tmp;
@@ -287,6 +287,7 @@ qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh, struct pt_regs *regs)
        unsigned                count = 0;
        int                     do_status = 0;
        u8                      state;
+       u32                     halt = HALT_BIT(ehci);
 
        if (unlikely (list_empty (&qh->qtd_list)))
                return count;
@@ -311,13 +312,17 @@ qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh, struct pt_regs *regs)
                struct urb      *urb;
                u32             token = 0;
 
+               /* ignore QHs that are currently inactive */
+               if (qh->hw_info1 & __constant_cpu_to_le32(QH_INACTIVATE))
+                       break;
+
                qtd = list_entry (entry, struct ehci_qtd, qtd_list);
                urb = qtd->urb;
 
                /* clean up any state from previous QTD ...*/
                if (last) {
                        if (likely (last->urb != urb)) {
-                               ehci_urb_done (ehci, last->urb, regs);
+                               ehci_urb_done (ehci, last->urb);
                                count++;
                        }
                        ehci_qtd_free (ehci, last);
@@ -330,7 +335,7 @@ qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh, struct pt_regs *regs)
 
                /* hardware copies qtd out of qh overlay */
                rmb ();
-               token = le32_to_cpu (qtd->hw_token);
+               token = hc32_to_cpu(ehci, qtd->hw_token);
 
                /* always clean up qtds the hc de-activated */
                if ((token & QTD_STS_ACTIVE) == 0) {
@@ -342,7 +347,8 @@ qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh, struct pt_regs *regs)
                         * that silicon quirk can kick in with this dummy too.
                         */
                        } else if (IS_SHORT_READ (token)
-                                       && !(qtd->hw_alt_next & EHCI_LIST_END)) {
+                                       && !(qtd->hw_alt_next
+                                               & EHCI_LIST_END(ehci))) {
                                stopped = 1;
                                goto halt;
                        }
@@ -364,7 +370,7 @@ qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh, struct pt_regs *regs)
                         */
                        if (likely (urb->status == -EINPROGRESS))
                                continue;
-                       
+
                        /* issue status after short control reads */
                        if (unlikely (do_status != 0)
                                        && QTD_PID (token) == 0 /* OUT */) {
@@ -374,21 +380,21 @@ qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh, struct pt_regs *regs)
 
                        /* token in overlay may be most current */
                        if (state == QH_STATE_IDLE
-                                       && cpu_to_le32 (qtd->qtd_dma)
+                                       && cpu_to_hc32(ehci, qtd->qtd_dma)
                                                == qh->hw_current)
-                               token = le32_to_cpu (qh->hw_token);
+                               token = hc32_to_cpu(ehci, qh->hw_token);
 
                        /* force halt for unlinked or blocked qh, so we'll
                         * patch the qh later and so that completions can't
                         * activate it while we "know" it's stopped.
                         */
-                       if ((HALT_BIT & qh->hw_token) == 0) {
+                       if ((halt & qh->hw_token) == 0) {
 halt:
-                               qh->hw_token |= HALT_BIT;
+                               qh->hw_token |= halt;
                                wmb ();
                        }
                }
+
                /* remove it from the queue */
                spin_lock (&urb->lock);
                qtd_copy_status (ehci, urb, qtd->length, token);
@@ -407,7 +413,7 @@ halt:
 
        /* last urb's completion might still need calling */
        if (likely (last != NULL)) {
-               ehci_urb_done (ehci, last->urb, regs);
+               ehci_urb_done (ehci, last->urb);
                count++;
                ehci_qtd_free (ehci, last);
        }
@@ -419,7 +425,7 @@ halt:
         * it after fault cleanup, or recovering from silicon wrongly
         * overlaying the dummy qtd (which reduces DMA chatter).
         */
-       if (stopped != 0 || qh->hw_qtd_next == EHCI_LIST_END) {
+       if (stopped != 0 || qh->hw_qtd_next == EHCI_LIST_END(ehci)) {
                switch (state) {
                case QH_STATE_IDLE:
                        qh_refresh(ehci, qh);
@@ -428,7 +434,7 @@ halt:
                        /* should be rare for periodic transfers,
                         * except maybe high bandwidth ...
                         */
-                       if ((__constant_cpu_to_le32 (QH_SMASK)
+                       if ((cpu_to_hc32(ehci, QH_SMASK)
                                        & qh->hw_info2) != 0) {
                                intr_deschedule (ehci, qh);
                                (void) qh_schedule (ehci, qh);
@@ -502,8 +508,9 @@ qh_urb_transaction (
        is_input = usb_pipein (urb->pipe);
        if (usb_pipecontrol (urb->pipe)) {
                /* SETUP pid */
-               qtd_fill (qtd, urb->setup_dma, sizeof (struct usb_ctrlrequest),
-                       token | (2 /* "setup" */ << 8), 8);
+               qtd_fill(ehci, qtd, urb->setup_dma,
+                               sizeof (struct usb_ctrlrequest),
+                               token | (2 /* "setup" */ << 8), 8);
 
                /* ... and always at least one more pid */
                token ^= QTD_TOGGLE;
@@ -512,13 +519,13 @@ qh_urb_transaction (
                if (unlikely (!qtd))
                        goto cleanup;
                qtd->urb = urb;
-               qtd_prev->hw_next = QTD_NEXT (qtd->qtd_dma);
+               qtd_prev->hw_next = QTD_NEXT(ehci, qtd->qtd_dma);
                list_add_tail (&qtd->qtd_list, head);
 
                /* for zero length DATA stages, STATUS is always IN */
                if (len == 0)
                        token |= (1 /* "in" */ << 8);
-       } 
+       }
 
        /*
         * data transfer stage:  buffer setup
@@ -539,7 +546,7 @@ qh_urb_transaction (
        for (;;) {
                int this_qtd_len;
 
-               this_qtd_len = qtd_fill (qtd, buf, len, token, maxpacket);
+               this_qtd_len = qtd_fill(ehci, qtd, buf, len, token, maxpacket);
                len -= this_qtd_len;
                buf += this_qtd_len;
                if (is_input)
@@ -557,7 +564,7 @@ qh_urb_transaction (
                if (unlikely (!qtd))
                        goto cleanup;
                qtd->urb = urb;
-               qtd_prev->hw_next = QTD_NEXT (qtd->qtd_dma);
+               qtd_prev->hw_next = QTD_NEXT(ehci, qtd->qtd_dma);
                list_add_tail (&qtd->qtd_list, head);
        }
 
@@ -566,7 +573,7 @@ qh_urb_transaction (
         */
        if (likely ((urb->transfer_flags & URB_SHORT_NOT_OK) == 0
                                || usb_pipecontrol (urb->pipe)))
-               qtd->hw_alt_next = EHCI_LIST_END;
+               qtd->hw_alt_next = EHCI_LIST_END(ehci);
 
        /*
         * control requests may need a terminating data "status" ack;
@@ -590,17 +597,17 @@ qh_urb_transaction (
                        if (unlikely (!qtd))
                                goto cleanup;
                        qtd->urb = urb;
-                       qtd_prev->hw_next = QTD_NEXT (qtd->qtd_dma);
+                       qtd_prev->hw_next = QTD_NEXT(ehci, qtd->qtd_dma);
                        list_add_tail (&qtd->qtd_list, head);
 
                        /* never any data in such packets */
-                       qtd_fill (qtd, 0, 0, token, 0);
+                       qtd_fill(ehci, qtd, 0, 0, token, 0);
                }
        }
 
        /* by default, enable interrupt on urb completion */
        if (likely (!(urb->transfer_flags & URB_NO_INTERRUPT)))
-               qtd->hw_token |= __constant_cpu_to_le32 (QTD_IOC);
+               qtd->hw_token |= cpu_to_hc32(ehci, QTD_IOC);
        return head;
 
 cleanup:
@@ -759,7 +766,7 @@ qh_make (
                }
                break;
        default:
-               dbg ("bogus dev %p speed %d", urb->dev, urb->dev->speed);
+               dbg ("bogus dev %p speed %d", urb->dev, urb->dev->speed);
 done:
                qh_put (qh);
                return NULL;
@@ -769,8 +776,8 @@ done:
 
        /* init as live, toggle clear, advance to dummy */
        qh->qh_state = QH_STATE_IDLE;
-       qh->hw_info1 = cpu_to_le32 (info1);
-       qh->hw_info2 = cpu_to_le32 (info2);
+       qh->hw_info1 = cpu_to_hc32(ehci, info1);
+       qh->hw_info2 = cpu_to_hc32(ehci, info2);
        usb_settoggle (urb->dev, usb_pipeendpoint (urb->pipe), !is_input, 1);
        qh_refresh (ehci, qh);
        return qh;
@@ -782,20 +789,21 @@ done:
 
 static void qh_link_async (struct ehci_hcd *ehci, struct ehci_qh *qh)
 {
-       __le32          dma = QH_NEXT (qh->qh_dma);
+       __hc32          dma = QH_NEXT(ehci, qh->qh_dma);
        struct ehci_qh  *head;
 
        /* (re)start the async schedule? */
        head = ehci->async;
        timer_action_done (ehci, TIMER_ASYNC_OFF);
        if (!head->qh_next.qh) {
-               u32     cmd = readl (&ehci->regs->command);
+               u32     cmd = ehci_readl(ehci, &ehci->regs->command);
 
                if (!(cmd & CMD_ASE)) {
                        /* in case a clear of CMD_ASE didn't take yet */
-                       (void) handshake (&ehci->regs->status, STS_ASS, 0, 150);
+                       (void)handshake(ehci, &ehci->regs->status,
+                                       STS_ASS, 0, 150);
                        cmd |= CMD_ASE | CMD_RUN;
-                       writel (cmd, &ehci->regs->command);
+                       ehci_writel(ehci, cmd, &ehci->regs->command);
                        ehci_to_hcd(ehci)->state = HC_STATE_RUNNING;
                        /* posted write need not be known to HC yet ... */
                }
@@ -819,8 +827,6 @@ static void qh_link_async (struct ehci_hcd *ehci, struct ehci_qh *qh)
 
 /*-------------------------------------------------------------------------*/
 
-#define        QH_ADDR_MASK    __constant_cpu_to_le32(0x7f)
-
 /*
  * For control/bulk/interrupt, return QH with these TDs appended.
  * Allocates and initializes the QH if necessary.
@@ -836,6 +842,7 @@ static struct ehci_qh *qh_append_tds (
 )
 {
        struct ehci_qh          *qh = NULL;
+       u32                     qh_addr_mask = cpu_to_hc32(ehci, 0x7f);
 
        qh = (struct ehci_qh *) *ptr;
        if (unlikely (qh == NULL)) {
@@ -857,7 +864,7 @@ static struct ehci_qh *qh_append_tds (
 
                         /* usb_reset_device() briefly reverts to address 0 */
                         if (usb_pipedevice (urb->pipe) == 0)
-                                qh->hw_info1 &= ~QH_ADDR_MASK;
+                                qh->hw_info1 &= ~qh_addr_mask;
                }
 
                /* just one way to queue requests: swap with the dummy qtd.
@@ -866,7 +873,7 @@ static struct ehci_qh *qh_append_tds (
                if (likely (qtd != NULL)) {
                        struct ehci_qtd         *dummy;
                        dma_addr_t              dma;
-                       __le32                  token;
+                       __hc32                  token;
 
                        /* to avoid racing the HC, use the dummy td instead of
                         * the first td of our list (becomes new dummy).  both
@@ -874,7 +881,7 @@ static struct ehci_qh *qh_append_tds (
                         * HC is allowed to fetch the old dummy (4.10.2).
                         */
                        token = qtd->hw_token;
-                       qtd->hw_token = HALT_BIT;
+                       qtd->hw_token = HALT_BIT(ehci);
                        wmb ();
                        dummy = qh->dummy;
 
@@ -886,14 +893,14 @@ static struct ehci_qh *qh_append_tds (
                        list_add (&dummy->qtd_list, qtd_list);
                        __list_splice (qtd_list, qh->qtd_list.prev);
 
-                       ehci_qtd_init (qtd, qtd->qtd_dma);
+                       ehci_qtd_init(ehci, qtd, qtd->qtd_dma);
                        qh->dummy = qtd;
 
                        /* hc must see the new dummy at list end */
                        dma = qtd->qtd_dma;
                        qtd = list_entry (qh->qtd_list.prev,
                                        struct ehci_qtd, qtd_list);
-                       qtd->hw_next = QTD_NEXT (dma);
+                       qtd->hw_next = QTD_NEXT(ehci, dma);
 
                        /* let the hc process these next qtds */
                        wmb ();
@@ -962,17 +969,17 @@ submit_async (
 
 /* the async qh for the qtds being reclaimed are now unlinked from the HC */
 
-static void end_unlink_async (struct ehci_hcd *ehci, struct pt_regs *regs)
+static void end_unlink_async (struct ehci_hcd *ehci)
 {
        struct ehci_qh          *qh = ehci->reclaim;
        struct ehci_qh          *next;
 
        timer_action_done (ehci, TIMER_IAA_WATCHDOG);
 
-       // qh->hw_next = cpu_to_le32 (qh->qh_dma);
+       // qh->hw_next = cpu_to_hc32(qh->qh_dma);
        qh->qh_state = QH_STATE_IDLE;
        qh->qh_next.qh = NULL;
-       qh_put (qh);                    // refcount from reclaim 
+       qh_put (qh);                    // refcount from reclaim
 
        /* other unlink(s) may be pending (in QH_STATE_UNLINK_WAIT) */
        next = qh->reclaim;
@@ -980,7 +987,7 @@ static void end_unlink_async (struct ehci_hcd *ehci, struct pt_regs *regs)
        ehci->reclaim_ready = 0;
        qh->reclaim = NULL;
 
-       qh_completions (ehci, qh, regs);
+       qh_completions (ehci, qh);
 
        if (!list_empty (&qh->qtd_list)
                        && HC_IS_RUNNING (ehci_to_hcd(ehci)->state))
@@ -1007,7 +1014,7 @@ static void end_unlink_async (struct ehci_hcd *ehci, struct pt_regs *regs)
 
 static void start_unlink_async (struct ehci_hcd *ehci, struct ehci_qh *qh)
 {
-       int             cmd = readl (&ehci->regs->command);
+       int             cmd = ehci_readl(ehci, &ehci->regs->command);
        struct ehci_qh  *prev;
 
 #ifdef DEBUG
@@ -1025,13 +1032,14 @@ static void start_unlink_async (struct ehci_hcd *ehci, struct ehci_qh *qh)
                if (ehci_to_hcd(ehci)->state != HC_STATE_HALT
                                && !ehci->reclaim) {
                        /* ... and CMD_IAAD clear */
-                       writel (cmd & ~CMD_ASE, &ehci->regs->command);
+                       ehci_writel(ehci, cmd & ~CMD_ASE,
+                                   &ehci->regs->command);
                        wmb ();
                        // handshake later, if we need to
                        timer_action_done (ehci, TIMER_ASYNC_OFF);
                }
                return;
-       } 
+       }
 
        qh->qh_state = QH_STATE_UNLINK;
        ehci->reclaim = qh = qh_get (qh);
@@ -1046,23 +1054,22 @@ static void start_unlink_async (struct ehci_hcd *ehci, struct ehci_qh *qh)
 
        if (unlikely (ehci_to_hcd(ehci)->state == HC_STATE_HALT)) {
                /* if (unlikely (qh->reclaim != 0))
-                *      this will recurse, probably not much
+                *      this will recurse, probably not much
                 */
-               end_unlink_async (ehci, NULL);
+               end_unlink_async (ehci);
                return;
        }
 
        ehci->reclaim_ready = 0;
        cmd |= CMD_IAAD;
-       writel (cmd, &ehci->regs->command);
-       (void) readl (&ehci->regs->command);
+       ehci_writel(ehci, cmd, &ehci->regs->command);
+       (void)ehci_readl(ehci, &ehci->regs->command);
        timer_action (ehci, TIMER_IAA_WATCHDOG);
 }
 
 /*-------------------------------------------------------------------------*/
 
-static void
-scan_async (struct ehci_hcd *ehci, struct pt_regs *regs)
+static void scan_async (struct ehci_hcd *ehci)
 {
        struct ehci_qh          *qh;
        enum ehci_timer_action  action = TIMER_IO_WATCHDOG;
@@ -1086,7 +1093,7 @@ rescan:
                                 */
                                qh = qh_get (qh);
                                qh->stamp = ehci->stamp;
-                               temp = qh_completions (ehci, qh, regs);
+                               temp = qh_completions (ehci, qh);
                                qh_put (qh);
                                if (temp != 0) {
                                        goto rescan;