Module Name: src Committed By: skrll Date: Sat Mar 26 11:42:44 UTC 2016
Modified Files: src/sys/dev/usb [nick-nhusb]: ehci.c ehcireg.h ehcivar.h Log Message: Grab sc_istthreshhold (not used as yet) To generate a diff of this commit: cvs rdiff -u -r1.234.2.94 -r1.234.2.95 src/sys/dev/usb/ehci.c cvs rdiff -u -r1.34.14.12 -r1.34.14.13 src/sys/dev/usb/ehcireg.h cvs rdiff -u -r1.42.14.23 -r1.42.14.24 src/sys/dev/usb/ehcivar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/usb/ehci.c diff -u src/sys/dev/usb/ehci.c:1.234.2.94 src/sys/dev/usb/ehci.c:1.234.2.95 --- src/sys/dev/usb/ehci.c:1.234.2.94 Sat Mar 26 11:40:59 2016 +++ src/sys/dev/usb/ehci.c Sat Mar 26 11:42:44 2016 @@ -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 @@ ehci_init(ehci_softc_t *sc) 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; Index: src/sys/dev/usb/ehcireg.h diff -u src/sys/dev/usb/ehcireg.h:1.34.14.12 src/sys/dev/usb/ehcireg.h:1.34.14.13 --- src/sys/dev/usb/ehcireg.h:1.34.14.12 Sat Mar 26 11:39:56 2016 +++ src/sys/dev/usb/ehcireg.h Sat Mar 26 11:42:44 2016 @@ -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 */ Index: src/sys/dev/usb/ehcivar.h diff -u src/sys/dev/usb/ehcivar.h:1.42.14.23 src/sys/dev/usb/ehcivar.h:1.42.14.24 --- src/sys/dev/usb/ehcivar.h:1.42.14.23 Thu Mar 17 09:04:53 2016 +++ src/sys/dev/usb/ehcivar.h Sat Mar 26 11:42:44 2016 @@ -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 @@ typedef struct ehci_softc { 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;