Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7-nhusb]: src/sys Sync with HEAD/nhusb
details: https://anonhg.NetBSD.org/src/rev/8167523dba28
branches: netbsd-7-nhusb
changeset: 801038:8167523dba28
user: skrll <skrll%NetBSD.org@localhost>
date: Thu Jan 26 21:54:24 2017 +0000
description:
Sync with HEAD/nhusb
diffstat:
sys/dev/ic/sl811hs.c | 51 +-
sys/dev/pci/xhci_pci.c | 10 +-
sys/dev/usb/TODO | 2 -
sys/dev/usb/TODO.usbmp | 36 +-
sys/dev/usb/auvitek_i2c.c | 8 +-
sys/dev/usb/ehci.c | 11 +-
sys/dev/usb/emdtv.c | 8 +-
sys/dev/usb/ezload.c | 8 +-
sys/dev/usb/files.usb | 3 +-
sys/dev/usb/hid.c | 17 +-
sys/dev/usb/if_athn_usb.c | 487 ++++++++++++++-------
sys/dev/usb/if_athn_usb.h | 15 +-
sys/dev/usb/if_atu.c | 8 +-
sys/dev/usb/if_aue.c | 349 +++++++--------
sys/dev/usb/if_auereg.h | 8 +-
sys/dev/usb/if_axe.c | 925 ++++++++++++++++++++++++++++++-----------
sys/dev/usb/if_axen.c | 192 +++++---
sys/dev/usb/if_axenreg.h | 7 +-
sys/dev/usb/if_axereg.h | 264 ++++++++++-
sys/dev/usb/if_cdce.c | 225 +++++-----
sys/dev/usb/if_cdcereg.h | 10 +-
sys/dev/usb/if_cue.c | 298 +++++++------
sys/dev/usb/if_cuereg.h | 8 +-
sys/dev/usb/if_kue.c | 7 +-
sys/dev/usb/if_otus.c | 54 +-
sys/dev/usb/if_otusvar.h | 4 +-
sys/dev/usb/if_rum.c | 8 +-
sys/dev/usb/if_run.c | 8 +-
sys/dev/usb/if_smsc.c | 358 +++++++++------
sys/dev/usb/if_smscvar.h | 9 +-
sys/dev/usb/if_udav.c | 139 ++++--
sys/dev/usb/if_udavreg.h | 7 +-
sys/dev/usb/if_upgt.c | 23 +-
sys/dev/usb/if_upgtvar.h | 3 +-
sys/dev/usb/if_upl.c | 5 +-
sys/dev/usb/if_ural.c | 8 +-
sys/dev/usb/if_url.c | 5 +-
sys/dev/usb/if_urndis.c | 172 ++++--
sys/dev/usb/if_urndisreg.h | 12 +-
sys/dev/usb/if_urtw.c | 10 +-
sys/dev/usb/if_urtwn.c | 746 +++++++++++++++++++++++++++------
sys/dev/usb/if_urtwn_data.h | 223 ++++++++++-
sys/dev/usb/if_urtwnreg.h | 128 +++++-
sys/dev/usb/if_urtwnvar.h | 20 +-
sys/dev/usb/if_zyd.c | 8 +-
sys/dev/usb/irmce.c | 7 +-
sys/dev/usb/motg.c | 11 +-
sys/dev/usb/stuirda.c | 8 +-
sys/dev/usb/uark.c | 9 +-
sys/dev/usb/uatp.c | 8 +-
sys/dev/usb/uberry.c | 10 +-
sys/dev/usb/ubsa.c | 10 +-
sys/dev/usb/ubt.c | 8 +-
sys/dev/usb/uchcom.c | 8 +-
sys/dev/usb/ucom.c | 170 ++++--
sys/dev/usb/ucomvar.h | 10 +-
sys/dev/usb/ucycom.c | 8 +-
sys/dev/usb/udl.c | 166 ++++++-
sys/dev/usb/udl.h | 9 +-
sys/dev/usb/udsbr.c | 10 +-
sys/dev/usb/uftdi.c | 8 +-
sys/dev/usb/ugen.c | 15 +-
sys/dev/usb/ugensa.c | 11 +-
sys/dev/usb/uhid.c | 16 +-
sys/dev/usb/uhidev.c | 6 +-
sys/dev/usb/uhmodem.c | 8 +-
sys/dev/usb/uhso.c | 12 +-
sys/dev/usb/uhub.c | 10 +-
sys/dev/usb/uipad.c | 10 +-
sys/dev/usb/uipaq.c | 8 +-
sys/dev/usb/uirda.c | 8 +-
sys/dev/usb/uirdavar.h | 4 +-
sys/dev/usb/ukbd.c | 6 +-
sys/dev/usb/ukyopon.c | 8 +-
sys/dev/usb/ulpt.c | 8 +-
sys/dev/usb/umass.c | 9 +-
sys/dev/usb/umass_isdata.c | 8 +-
sys/dev/usb/umct.c | 72 ++-
sys/dev/usb/umidi.c | 17 +-
sys/dev/usb/umidi_quirks.c | 8 +-
sys/dev/usb/umodem_common.c | 8 +-
sys/dev/usb/uplcom.c | 6 +-
sys/dev/usb/urio.c | 10 +-
sys/dev/usb/usb.c | 24 +-
sys/dev/usb/usb.h | 29 +-
sys/dev/usb/usb_quirks.c | 19 +-
sys/dev/usb/usb_subr.c | 50 +-
sys/dev/usb/usbdevices.config | 12 +-
sys/dev/usb/usbdi.c | 11 +-
sys/dev/usb/usbdi_util.c | 25 +-
sys/dev/usb/usbdi_util.h | 9 +-
sys/dev/usb/usbdivar.h | 14 +-
sys/dev/usb/usbroothub.c | 113 ++++-
sys/dev/usb/usbroothub.h | 16 +-
sys/dev/usb/uscanner.c | 10 +-
sys/dev/usb/uslsa.c | 11 +-
sys/dev/usb/usscanner.c | 10 +-
sys/dev/usb/ustir.c | 8 +-
sys/dev/usb/uthum.c | 8 +-
sys/dev/usb/utoppy.c | 8 +-
sys/dev/usb/uvisor.c | 8 +-
sys/dev/usb/uvscom.c | 8 +-
sys/dev/usb/uyurex.c | 8 +-
sys/dev/usb/xhci.c | 326 ++++++++++---
sys/dev/usb/xhcireg.h | 47 +-
sys/dev/usb/xhcivar.h | 29 +-
sys/external/bsd/dwc2/dwc2.c | 8 +-
107 files changed, 4523 insertions(+), 1923 deletions(-)
diffs (truncated from 13018 to 300 lines):
diff -r 5848cf2ec6cd -r 8167523dba28 sys/dev/ic/sl811hs.c
--- a/sys/dev/ic/sl811hs.c Mon Jan 23 08:02:54 2017 +0000
+++ b/sys/dev/ic/sl811hs.c Thu Jan 26 21:54:24 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sl811hs.c,v 1.47.10.1 2016/09/06 20:33:08 skrll Exp $ */
+/* $NetBSD: sl811hs.c,v 1.47.10.2 2017/01/26 21:54:24 skrll Exp $ */
/*
* Not (c) 2007 Matthew Orgass
@@ -68,7 +68,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sl811hs.c,v 1.47.10.1 2016/09/06 20:33:08 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sl811hs.c,v 1.47.10.2 2017/01/26 21:54:24 skrll Exp $");
#ifdef _KERNEL_OPT
#include "opt_slhci.h"
@@ -185,12 +185,6 @@
#endif
static const struct timeval reserved_warn_rate = SLHCI_OVERTIME_WARNING_RATE;
-/* Rate for overflow warnings */
-#ifndef SLHCI_OVERFLOW_WARNING_RATE
-#define SLHCI_OVERFLOW_WARNING_RATE { 60, 0 } /* 60 seconds */
-#endif
-static const struct timeval overflow_warn_rate = SLHCI_OVERFLOW_WARNING_RATE;
-
/*
* For EOF, the spec says 42 bit times, plus (I think) a possible hub skew of
* 20 bit times. By default leave 66 bit times to start the transfer beyond
@@ -1599,7 +1593,7 @@
/* Register read/write routines and barriers. */
#ifdef SLHCI_BUS_SPACE_BARRIERS
#define BSB(a, b, c, d, e) bus_space_barrier(a, b, c, d, BUS_SPACE_BARRIER_ # e)
-#define BSB_SYNC(a, b, c, d) bus_space_barrier(a, b, c, d, BUS_SPACE_BARRIER_SYNC)
+#define BSB_SYNC(a, b, c, d) bus_space_barrier(a, b, c, d, BUS_SPACE_BARRIER_READ|BUS_SPACE_BARRIER_WRITE)
#else /* now !SLHCI_BUS_SPACE_BARRIERS */
#define BSB(a, b, c, d, e) __USE(d)
#define BSB_SYNC(a, b, c, d)
@@ -2047,24 +2041,21 @@
#endif
if (!(status & SL11_EPSTAT_ERRBITS)) {
- unsigned int cont;
- cont = slhci_read(sc, slhci_tregs[ab][CONT]);
- if (cont != 0)
- DLOG(D_XFER, "cont %d len %d", cont,
- spipe->tregs[LEN], 0,0);
- if (__predict_false(cont > spipe->tregs[LEN])) {
- DDOLOG("cont > len! cont %d len %d xfer->ux_length %d "
- "spipe %p", cont, spipe->tregs[LEN], xfer->ux_length,
- spipe);
- printf("%s: cont > len! cont %d len %d xfer->ux_length "
- "%d", SC_NAME(sc), cont, spipe->tregs[LEN],
- xfer->ux_length);
- slhci_halt(sc, spipe, xfer);
- return;
+ unsigned int cont = slhci_read(sc, slhci_tregs[ab][CONT]);
+ unsigned int len = spipe->tregs[LEN];
+ DLOG(D_XFER, "cont %d len %d", cont, len, 0, 0);
+ if ((status & SL11_EPSTAT_OVERFLOW) || cont > len) {
+ DDOLOG("overflow - cont %d len %d xfer->ux_length %d "
+ "xfer->actlen %d", cont, len, xfer->ux_length,
+ xfer->ux_actlen);
+ printf("%s: overflow cont %d len %d xfer->ux_length"
+ " %d xfer->ux_actlen %d\n", SC_NAME(sc), cont,
+ len, xfer->ux_length, xfer->ux_actlen);
+ actlen = len;
} else {
- spipe->nerrs = 0;
- actlen = spipe->tregs[LEN] - cont;
+ actlen = len - cont;
}
+ spipe->nerrs = 0;
}
/* Actual copyin done after starting next transfer. */
@@ -2120,16 +2111,6 @@
0);
DDOLOGSTATUS(status);
- if (status & SL11_EPSTAT_OVERFLOW &&
- ratecheck(&sc->sc_overflow_warn_rate,
- &overflow_warn_rate)) {
- printf("%s: Overflow condition: "
- "data corruption possible\n",
- SC_NAME(sc));
- DDOLOG("Overflow condition: "
- "data corruption possible",
- 0, 0, 0, 0);
- }
head = Q_CALLBACKS;
} else {
head = Q_NEXT_CB;
diff -r 5848cf2ec6cd -r 8167523dba28 sys/dev/pci/xhci_pci.c
--- a/sys/dev/pci/xhci_pci.c Mon Jan 23 08:02:54 2017 +0000
+++ b/sys/dev/pci/xhci_pci.c Thu Jan 26 21:54:24 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: xhci_pci.c,v 1.3.14.1 2016/09/06 20:33:08 skrll Exp $ */
+/* $NetBSD: xhci_pci.c,v 1.3.14.2 2017/01/26 21:54:24 skrll Exp $ */
/* OpenBSD: xhci_pci.c,v 1.4 2014/07/12 17:38:51 yuo Exp */
/*
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xhci_pci.c,v 1.3.14.1 2016/09/06 20:33:08 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci_pci.c,v 1.3.14.2 2017/01/26 21:54:24 skrll Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -128,7 +128,6 @@
char intrbuf[PCI_INTRSTR_LEN];
sc->sc_dev = self;
- sc->sc_bus.ub_hcpriv = sc;
pci_aprint_devinfo(pa, "USB Controller");
@@ -227,8 +226,11 @@
xhci_shutdown))
aprint_error_dev(self, "couldn't establish power handler\n");
- /* Attach usb device. */
+ /* Attach usb buses. */
sc->sc_child = config_found(self, &sc->sc_bus, usbctlprint);
+
+ sc->sc_child2 = config_found(self, &sc->sc_bus2, usbctlprint);
+
return;
fail:
diff -r 5848cf2ec6cd -r 8167523dba28 sys/dev/usb/TODO
--- a/sys/dev/usb/TODO Mon Jan 23 08:02:54 2017 +0000
+++ b/sys/dev/usb/TODO Thu Jan 26 21:54:24 2017 +0000
@@ -59,8 +59,6 @@
use usb_ and usbd_ consistently
rearrange the contents and names of some files (Nick)
-Add threads to the Ethernet drivers.
-
Change what's done at watchdog timeout inb if_{a,c,k}ue.c; what we have
now doesn't work because it's done in an interrupt context.
diff -r 5848cf2ec6cd -r 8167523dba28 sys/dev/usb/TODO.usbmp
--- a/sys/dev/usb/TODO.usbmp Mon Jan 23 08:02:54 2017 +0000
+++ b/sys/dev/usb/TODO.usbmp Thu Jan 26 21:54:24 2017 +0000
@@ -1,4 +1,4 @@
-$NetBSD: TODO.usbmp,v 1.8.2.1.4.1 2016/09/06 20:33:08 skrll Exp $
+$NetBSD: TODO.usbmp,v 1.8.2.1.4.2 2017/01/26 21:54:24 skrll Exp $
the majority of the USB MP device interface is documented in usbdivar.h.
@@ -18,7 +18,7 @@
- uhub.c
- usscanner.c
-usb_detach_{waitold,wakeup} to usb_detach_{wait,broadcast} conversion:
+usb_detach_{waitold,wakeup} to cv_{wait,broadcast} conversion:
- drivers:
if_aue.c
if_axe.c
@@ -26,15 +26,12 @@
if_smsc.c
if_udav.c
if_url.c
- stuirda.c
ubt.c
- ucom.c
ucycom.c
udsir.c
uhso.c
uirda.c
ulpt.c
- umass.c - done, partially done -- need to check umass_scsipi.c change
urio.c
uscanner.c
usscanner.c
@@ -88,26 +85,31 @@
- ubt.c
- ucycom.c
- udsir.c
+ - uhso.c
+ - ukbd.c
+ - ulpt.c
+ - urio.c
+ - uscanner.c
+ - usscanner.c
+ - ustir.c
+ - utoppy.c
+ - uvideo.c
wakeup/tsleep drivers:
- - if_otus.c
- if_run.c
- - if_upgt.c
- if_urtwn.c
- if_zyd.c
- - ucom.c
- ucycom.c
- udsir.c
- uirda.c
+ - umass_isdata.c
- ulpt.c
- - umass_isdata.c
- ustir.c
- uthum.c
- uvscom.c
- uyurex.c
missing D_MPSAFE drivers:
- - ucom
- ucycom
- ugen - partially ready
- uhso
@@ -148,8 +150,8 @@
- uep
- udl
- ulpt attaches ok
- - uhso working (must take kernel lock for scsipi)
- - umass working (must take kernel lock for scsipi)
+ - uhso working
+ - umass working
- uaudio working
- umidi working
- uirda
@@ -177,7 +179,7 @@
- uberry
- uipad
- urio
- - uscanner ? (must take kernel lock for scsipi)
+ - uscanner ?
- usscanner
- utoppy
- uyap
@@ -185,9 +187,9 @@
- ugen mostly done
- pseye working
- uvideo
- - auvitek ? (must take kernel lock for scsipi)
- - emdtv ? (must take kernel lock for scsipi)
- - ubt working (must take kernel lock for scsipi)
+ - auvitek ?
+ - emdtv ?
+ - ubt working
- aubtfwl
- u3ginit
ucom attachments:
@@ -195,7 +197,7 @@
- uark
- ubsa
- uchcom
- - uftdi
+ - uftdi working
- uipaq
- umct
- uplcom attaches ok
diff -r 5848cf2ec6cd -r 8167523dba28 sys/dev/usb/auvitek_i2c.c
--- a/sys/dev/usb/auvitek_i2c.c Mon Jan 23 08:02:54 2017 +0000
+++ b/sys/dev/usb/auvitek_i2c.c Thu Jan 26 21:54:24 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: auvitek_i2c.c,v 1.3 2011/10/02 16:30:58 jmcneill Exp $ */
+/* $NetBSD: auvitek_i2c.c,v 1.3.38.1 2017/01/26 21:54:24 skrll Exp $ */
/*-
* Copyright (c) 2010 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -31,7 +31,11 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: auvitek_i2c.c,v 1.3 2011/10/02 16:30:58 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: auvitek_i2c.c,v 1.3.38.1 2017/01/26 21:54:24 skrll Exp $");
+
+#ifdef _KERNEL_OPT
+#include "opt_usb.h"
+#endif
#include <sys/param.h>
#include <sys/systm.h>
diff -r 5848cf2ec6cd -r 8167523dba28 sys/dev/usb/ehci.c
--- a/sys/dev/usb/ehci.c Mon Jan 23 08:02:54 2017 +0000
+++ b/sys/dev/usb/ehci.c Thu Jan 26 21:54:24 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ehci.c,v 1.228.6.1 2016/09/06 20:33:08 skrll Exp $ */
+/* $NetBSD: ehci.c,v 1.228.6.2 2017/01/26 21:54:24 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.228.6.1 2016/09/06 20:33:08 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.228.6.2 2017/01/26 21:54:24 skrll Exp $");
#include "ohci.h"
#include "uhci.h"
@@ -2168,8 +2168,11 @@
Home |
Main Index |
Thread Index |
Old Index