Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb Turn on the MAXP bit in the controller to allow ...



details:   https://anonhg.NetBSD.org/src/rev/d4c3c87bebc0
branches:  trunk
changeset: 479878:d4c3c87bebc0
user:      augustss <augustss%NetBSD.org@localhost>
date:      Fri Dec 24 13:56:35 1999 +0000

description:
Turn on the MAXP bit in the controller to allow 64 byte packets at
the end of a frame.

diffstat:

 sys/dev/usb/uhci.c |  16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diffs (50 lines):

diff -r 3a0090c83fef -r d4c3c87bebc0 sys/dev/usb/uhci.c
--- a/sys/dev/usb/uhci.c        Fri Dec 24 09:14:57 1999 +0000
+++ b/sys/dev/usb/uhci.c        Fri Dec 24 13:56:35 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uhci.c,v 1.70 1999/12/06 21:07:00 augustss Exp $       */
+/*     $NetBSD: uhci.c,v 1.71 1999/12/24 13:56:35 augustss Exp $       */
 /*     $FreeBSD: src/sys/dev/usb/uhci.c,v 1.33 1999/11/17 22:33:41 n_hibma Exp $       */
 
 /*
@@ -42,10 +42,10 @@
  * USB Universal Host Controller driver.
  * Handles e.g. PIIX3 and PIIX4.
  *
- * Data sheets: ftp://download.intel.com/design/intarch/datashts/29055002.pdf
- *              ftp://download.intel.com/design/intarch/datashts/29056201.pdf
  * UHCI spec: http://www.intel.com/design/usb/uhci11d.pdf
  * USB spec: http://www.usb.org/developers/data/usb11.pdf
+ * PIIXn spec: ftp://download.intel.com/design/intarch/datashts/29055002.pdf
+ *             ftp://download.intel.com/design/intarch/datashts/29056201.pdf
  */
 
 #include <sys/param.h>
@@ -429,6 +429,8 @@
        UWRITE2(sc, UHCI_INTR, UHCI_INTR_TOCRCIE | UHCI_INTR_RIE | 
                UHCI_INTR_IOCE | UHCI_INTR_SPIE);       /* enable interrupts */
 
+       UHCICMD(sc, UHCI_CMD_MAXP); /* Assume 64 byte packets at frame end */
+
        return (uhci_run(sc, 1));               /* and here we go... */
 }
 
@@ -1206,11 +1208,17 @@
        int run;
 {
        int s, n, running;
+       u_int16_t cmd;
 
        run = run != 0;
        s = splusb();
        DPRINTF(("uhci_run: setting run=%d\n", run));
-       UHCICMD(sc, run ? UHCI_CMD_RS : 0);
+       cmd = UREAD2(sc, UHCI_CMD);
+       if (run)
+               cmd |= UHCI_CMD_RS;
+       else
+               cmd &= ~UHCI_CMD_RS;
+       UHCICMD(sc, cmd);
        for(n = 0; n < 10; n++) {
                running = !(UREAD2(sc, UHCI_STS) & UHCI_STS_HCH);
                /* return when we've entered the state we want */



Home | Main Index | Thread Index | Old Index