diff options
| author | mycroft <mycroft@NetBSD.org> | 2003-10-12 18:04:28 +0000 |
|---|---|---|
| committer | mycroft <mycroft@NetBSD.org> | 2003-10-12 18:04:28 +0000 |
| commit | ba41e2e19bf03826ff14700ab308d58e7bf8fc1f (patch) | |
| tree | a90970488d718728f9c97639f58217d0dd27be77 /sys/dev/usb | |
| parent | ac8278da8c188473661de1a095add94d1a269c92 (diff) | |
Fix problems with ehci on controllers that support 64-bit addressing. From
Cliff Wright, PR 23128. Thanks!
Diffstat (limited to 'sys/dev/usb')
| -rw-r--r-- | sys/dev/usb/ehci.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/dev/usb/ehci.c b/sys/dev/usb/ehci.c index de313f09267..df520e73047 100644 --- a/sys/dev/usb/ehci.c +++ b/sys/dev/usb/ehci.c @@ -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 @@ ehci_idone(struct ehci_xfer *ex) 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 @@ ehci_alloc_sqtd_chain(struct ehci_pipe *epipe, ehci_softc_t *sc, 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_device_request(usbd_xfer_handle xfer) 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_device_request(usbd_xfer_handle xfer) 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; |
