Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb Fix problems with ehci on controllers that suppo...



details:   https://anonhg.NetBSD.org/src/rev/c58ba3e244e6
branches:  trunk
changeset: 553206:c58ba3e244e6
user:      mycroft <mycroft%NetBSD.org@localhost>
date:      Sun Oct 12 18:04:28 2003 +0000

description:
Fix problems with ehci on controllers that support 64-bit addressing.  From
Cliff Wright, PR 23128.  Thanks!

diffstat:

 sys/dev/usb/ehci.c |  11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diffs (53 lines):

diff -r 18976ac18bd8 -r c58ba3e244e6 sys/dev/usb/ehci.c
--- a/sys/dev/usb/ehci.c        Sun Oct 12 17:57:13 2003 +0000
+++ b/sys/dev/usb/ehci.c        Sun Oct 12 18:04:28 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ehci.c,v 1.47 2003/05/10 12:04:22 augustss Exp $       */
+/*     $NetBSD: ehci.c,v 1.48 2003/10/12 18:04:28 mycroft Exp $        */
 
 /*
  * TODO
@@ -52,7 +52,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.47 2003/05/10 12:04:22 augustss Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.48 2003/10/12 18:04:28 mycroft Exp $");
 
 #include "ohci.h"
 #include "uhci.h"
@@ -719,6 +719,10 @@
                        break;
 
                status = nstatus;
+               /* halt is ok if descriptor is last, and complete */
+               if(sqtd->qtd.qtd_next == EHCI_NULL
+                       && EHCI_QTD_GET_BYTES(status) == 0)
+                       status &= ~EHCI_QTD_HALTED;
                if (EHCI_QTD_GET_PID(status) != EHCI_QTD_PID_SETUP)
                        actlen += sqtd->len - EHCI_QTD_GET_BYTES(status);
        }
@@ -2156,6 +2160,7 @@
                        if (i != 0) /* use offset only in first buffer */
                                a = EHCI_PAGE(a);
                        cur->qtd.qtd_buffer[i] = htole32(a);
+                       cur->qtd.qtd_buffer_hi[i] = 0;
 #ifdef DIAGNOSTIC
                        if (i >= EHCI_QTD_NBUFFERS) {
                                printf("ehci_alloc_sqtd_chain: i=%d\n", i);
@@ -2536,6 +2541,7 @@
            EHCI_QTD_SET_BYTES(sizeof *req)
            );
        setup->qtd.qtd_buffer[0] = htole32(DMAADDR(&epipe->u.ctl.reqdma, 0));
+       setup->qtd.qtd_buffer_hi[0] = 0;
        setup->nextqtd = next;
        setup->qtd.qtd_next = setup->qtd.qtd_altnext = htole32(next->physaddr);
        setup->xfer = xfer;
@@ -2548,6 +2554,7 @@
            EHCI_QTD_IOC
            );
        stat->qtd.qtd_buffer[0] = 0; /* XXX not needed? */
+       stat->qtd.qtd_buffer_hi[0] = 0; /* XXX not needed? */
        stat->nextqtd = NULL;
        stat->qtd.qtd_next = stat->qtd.qtd_altnext = EHCI_NULL;
        stat->xfer = xfer;



Home | Main Index | Thread Index | Old Index