Source-Changes-HG archive

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

[src/nick-nhusb]: src/sys/dev/usb Grab sc_istthreshhold (not used as yet)



details:   https://anonhg.NetBSD.org/src/rev/8cb77dfedff4
branches:  nick-nhusb
changeset: 334457:8cb77dfedff4
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sat Mar 26 11:42:44 2016 +0000

description:
Grab sc_istthreshhold (not used as yet)

diffstat:

 sys/dev/usb/ehci.c    |  10 ++++++++--
 sys/dev/usb/ehcireg.h |   8 +++++---
 sys/dev/usb/ehcivar.h |   3 ++-
 3 files changed, 15 insertions(+), 6 deletions(-)

diffs (70 lines):

diff -r 55af84ae487c -r 8cb77dfedff4 sys/dev/usb/ehci.c
--- a/sys/dev/usb/ehci.c        Sat Mar 26 11:40:59 2016 +0000
+++ b/sys/dev/usb/ehci.c        Sat Mar 26 11:42:44 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ehci.c,v 1.234.2.94 2016/03/26 11:40:59 skrll Exp $ */
+/*     $NetBSD: ehci.c,v 1.234.2.95 2016/03/26 11:42:44 skrll Exp $ */
 
 /*
  * Copyright (c) 2004-2012 The NetBSD Foundation, Inc.
@@ -53,7 +53,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.234.2.94 2016/03/26 11:40:59 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.234.2.95 2016/03/26 11:42:44 skrll Exp $");
 
 #include "ohci.h"
 #include "uhci.h"
@@ -466,6 +466,12 @@
                EOWRITE4(sc, EHCI_CTRLDSSEGMENT, 0);
        }
 
+       if (cparams & EHCI_HCC_IST_FULLFRAME) {
+               sc->sc_istthreshold = 0;
+       } else {
+               sc->sc_istthreshold = EHCI_HCC_GET_IST_THRESHOLD(cparams);
+       }
+
        sc->sc_bus.ub_revision = USBREV_2_0;
        sc->sc_bus.ub_usedma = true;
        sc->sc_bus.ub_dmaflags = USBMALLOC_MULTISEG;
diff -r 55af84ae487c -r 8cb77dfedff4 sys/dev/usb/ehcireg.h
--- a/sys/dev/usb/ehcireg.h     Sat Mar 26 11:40:59 2016 +0000
+++ b/sys/dev/usb/ehcireg.h     Sat Mar 26 11:42:44 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ehcireg.h,v 1.34.14.12 2016/03/26 11:39:56 skrll Exp $ */
+/*     $NetBSD: ehcireg.h,v 1.34.14.13 2016/03/26 11:42:44 skrll Exp $ */
 
 /*
  * Copyright (c) 2001, 2004 The NetBSD Foundation, Inc.
@@ -86,8 +86,10 @@
 #define  EHCI_HCS_N_PORTS(x)   ((x) & 0xf) /* # of ports */
 
 #define EHCI_HCCPARAMS         0x08    /* RO Capability parameters */
-#define  EHCI_HCC_EECP(x)      (((x) >> 8) & 0xff) /* extended ports caps */
-#define  EHCI_HCC_IST(x)       (((x) >> 4) & 0xf) /* isoc sched threshold */
+#define  EHCI_HCC_EECP(x)              (((x) >> 8) & 0xff) /* extended ports caps */
+#define  EHCI_HCC_IST_FULLFRAME                __BIT(7)
+#define  EHCI_HCC_IST_THRESHOLD_MASK   __BITS(6,4)     /* isoc sched threshold */
+#define  EHCI_HCC_GET_IST_THRESHOLD(x) __SHIFTOUT((x), EHCI_HCC_IST_THRESHOLD_MASK)
 #define  EHCI_HCC_ASPC(x)      ((x) & 0x4) /* async sched park cap */
 #define  EHCI_HCC_PFLF(x)      ((x) & 0x2) /* prog frame list flag */
 #define  EHCI_HCC_64BIT(x)     ((x) & 0x1) /* 64 bit address cap */
diff -r 55af84ae487c -r 8cb77dfedff4 sys/dev/usb/ehcivar.h
--- a/sys/dev/usb/ehcivar.h     Sat Mar 26 11:40:59 2016 +0000
+++ b/sys/dev/usb/ehcivar.h     Sat Mar 26 11:42:44 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ehcivar.h,v 1.42.14.23 2016/03/17 09:04:53 skrll Exp $ */
+/*     $NetBSD: ehcivar.h,v 1.42.14.24 2016/03/26 11:42:44 skrll Exp $ */
 
 /*
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -210,6 +210,7 @@
 
        int sc_noport;
        uint8_t sc_hasppc;              /* has Port Power Control */
+       uint8_t sc_istthreshold;        /* ISOC Scheduling Threshold (uframes) */
        struct usbd_xfer *sc_intrxfer;
        char sc_isreset[EHCI_MAX_PORTS];
        char sc_softwake;



Home | Main Index | Thread Index | Old Index