Source-Changes-HG archive

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

[src/trunk]: src/sys Merge nick-nhusb



details:   https://anonhg.NetBSD.org/src/rev/27f3c4038aa9
branches:  trunk
changeset: 814969:27f3c4038aa9
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sat Apr 23 10:15:27 2016 +0000

description:
Merge nick-nhusb

- API / infrastructure changes to support memory management changes.
- Memory management improvements and bug fixes.
- HCDs should now be MP safe
- conversion to KERNHIST based debug
- FS/LS isoc support on ehci(4).
- conversion to kmem(9)
- Some USB 3 support - mostly from Takahiro HAYASHI (t-hash).
- interrupt transfers now get proper DMA operations
- general bug fixes
    - kern/48308
    - uhub status notification improvements
    - umass(4) probe fix (applied to HEAD already)
    - ohci(4) short transfer fix

diffstat:

 sys/arch/amd64/conf/GENERIC               |     8 +-
 sys/arch/amiga/dev/slhci_zbus.c           |     6 +-
 sys/arch/arm/allwinner/awin_otg.c         |     6 +-
 sys/arch/arm/allwinner/awin_usb.c         |    22 +-
 sys/arch/arm/amlogic/amlogic_dwctwo.c     |     6 +-
 sys/arch/arm/at91/at91ohci.c              |    23 +-
 sys/arch/arm/broadcom/bcm2835_dwctwo.c    |     6 +-
 sys/arch/arm/broadcom/bcm53xx_usb.c       |    16 +-
 sys/arch/arm/ep93xx/epohci.c              |    23 +-
 sys/arch/arm/gemini/obio_ehci.c           |    17 +-
 sys/arch/arm/imx/imxusb.c                 |    19 +-
 sys/arch/arm/nvidia/tegra_ehci.c          |    14 +-
 sys/arch/arm/omap/obio_ohci.c             |    17 +-
 sys/arch/arm/omap/omap3_ehci.c            |    44 +-
 sys/arch/arm/omap/omapl1x_ohci.c          |    16 +-
 sys/arch/arm/omap/tiotg.c                 |    41 +-
 sys/arch/arm/rockchip/rockchip_dwctwo.c   |     6 +-
 sys/arch/arm/s3c2xx0/ohci_s3c24x0.c       |    20 +-
 sys/arch/arm/samsung/exynos_ehci.c        |    17 +-
 sys/arch/arm/samsung/exynos_ohci.c        |    15 +-
 sys/arch/arm/xscale/pxa2x0_ohci.c         |    17 +-
 sys/arch/arm/zynq/zynq_usb.c              |    19 +-
 sys/arch/evbmips/loongson/gdium_machdep.c |     2 +-
 sys/arch/hpcarm/dev/nbp_slhci.c           |     6 +-
 sys/arch/hpcmips/dev/plumohci.c           |    43 +-
 sys/arch/i386/conf/GENERIC                |     8 +-
 sys/arch/i386/pci/gcscehci.c              |    21 +-
 sys/arch/mips/adm5120/dev/ahci.c          |   935 ++----
 sys/arch/mips/adm5120/dev/ahcireg.h       |    36 +-
 sys/arch/mips/adm5120/dev/ahcivar.h       |    18 +-
 sys/arch/mips/alchemy/dev/ohci_aubus.c    |    30 +-
 sys/arch/mips/atheros/dev/ehci_arbus.c    |    17 +-
 sys/arch/mips/atheros/dev/ohci_arbus.c    |    17 +-
 sys/arch/mips/conf/files.adm5120          |     4 +-
 sys/arch/mips/ingenic/ingenic_dwctwo.c    |    10 +-
 sys/arch/mips/ingenic/ingenic_ehci.c      |    18 +-
 sys/arch/mips/ingenic/ingenic_ohci.c      |    16 +-
 sys/arch/mips/ralink/ralink_ehci.c        |    17 +-
 sys/arch/mips/ralink/ralink_eth.c         |     4 +-
 sys/arch/mips/ralink/ralink_ohci.c        |    17 +-
 sys/arch/mips/rmi/rmixl_ehci.c            |    19 +-
 sys/arch/mips/rmi/rmixl_intr.c            |     4 +-
 sys/arch/mips/rmi/rmixl_ohci.c            |    17 +-
 sys/arch/playstation2/dev/ohci_sbus.c     |    29 +-
 sys/arch/powerpc/booke/dev/pq3ehci.c      |    12 +-
 sys/arch/powerpc/ibm4xx/dev/dwctwo_plb.c  |     6 +-
 sys/arch/x68k/dev/slhci_intio.c           |     6 +-
 sys/dev/audio.c                           |    10 +-
 sys/dev/cardbus/ehci_cardbus.c            |    23 +-
 sys/dev/cardbus/ohci_cardbus.c            |    23 +-
 sys/dev/cardbus/uhci_cardbus.c            |    31 +-
 sys/dev/ic/sl811hs.c                      |   635 +--
 sys/dev/ic/sl811hsvar.h                   |     4 +-
 sys/dev/isa/slhci_isa.c                   |     6 +-
 sys/dev/marvell/ehci_mv.c                 |    19 +-
 sys/dev/pci/ehci_pci.c                    |    23 +-
 sys/dev/pci/ohci_pci.c                    |    15 +-
 sys/dev/pci/uhci_pci.c                    |    31 +-
 sys/dev/pci/xhci_pci.c                    |   130 +-
 sys/dev/pcmcia/slhci_pcmcia.c             |     6 +-
 sys/dev/usb/TODO.usbmp                    |    38 +-
 sys/dev/usb/aubtfwl.c                     |    61 +-
 sys/dev/usb/auvitek.c                     |    40 +-
 sys/dev/usb/auvitek_audio.c               |    64 +-
 sys/dev/usb/auvitek_dtv.c                 |    64 +-
 sys/dev/usb/auvitek_video.c               |    41 +-
 sys/dev/usb/auvitekvar.h                  |    16 +-
 sys/dev/usb/ehci.c                        |  4157 ++++++++++++++++------------
 sys/dev/usb/ehcireg.h                     |   245 +-
 sys/dev/usb/ehcivar.h                     |   116 +-
 sys/dev/usb/emdtv.c                       |    12 +-
 sys/dev/usb/emdtv_dtv.c                   |    71 +-
 sys/dev/usb/emdtv_ir.c                    |     8 +-
 sys/dev/usb/emdtvvar.h                    |    12 +-
 sys/dev/usb/ezload.c                      |    24 +-
 sys/dev/usb/ezload.h                      |    14 +-
 sys/dev/usb/files.usb                     |     4 +-
 sys/dev/usb/hid.c                         |    64 +-
 sys/dev/usb/hid.h                         |    18 +-
 sys/dev/usb/if_athn_usb.c                 |   186 +-
 sys/dev/usb/if_athn_usb.h                 |    20 +-
 sys/dev/usb/if_atu.c                      |   265 +-
 sys/dev/usb/if_atureg.h                   |    80 +-
 sys/dev/usb/if_aue.c                      |   242 +-
 sys/dev/usb/if_auereg.h                   |    34 +-
 sys/dev/usb/if_axe.c                      |   172 +-
 sys/dev/usb/if_axen.c                     |   192 +-
 sys/dev/usb/if_axenreg.h                  |    22 +-
 sys/dev/usb/if_axereg.h                   |    10 +-
 sys/dev/usb/if_cdce.c                     |   162 +-
 sys/dev/usb/if_cdcereg.h                  |    18 +-
 sys/dev/usb/if_cue.c                      |   234 +-
 sys/dev/usb/if_cuereg.h                   |    22 +-
 sys/dev/usb/if_kue.c                      |   216 +-
 sys/dev/usb/if_kuereg.h                   |    10 +-
 sys/dev/usb/if_otus.c                     |   121 +-
 sys/dev/usb/if_otusvar.h                  |    31 +-
 sys/dev/usb/if_rum.c                      |   141 +-
 sys/dev/usb/if_rumreg.h                   |     6 +-
 sys/dev/usb/if_rumvar.h                   |    16 +-
 sys/dev/usb/if_run.c                      |   263 +-
 sys/dev/usb/if_runvar.h                   |    26 +-
 sys/dev/usb/if_smsc.c                     |   183 +-
 sys/dev/usb/if_smscvar.h                  |    10 +-
 sys/dev/usb/if_udav.c                     |   257 +-
 sys/dev/usb/if_udavreg.h                  |    16 +-
 sys/dev/usb/if_upgt.c                     |    98 +-
 sys/dev/usb/if_upgtvar.h                  |    12 +-
 sys/dev/usb/if_upl.c                      |   208 +-
 sys/dev/usb/if_ural.c                     |   170 +-
 sys/dev/usb/if_uralreg.h                  |     6 +-
 sys/dev/usb/if_uralvar.h                  |    16 +-
 sys/dev/usb/if_url.c                      |   229 +-
 sys/dev/usb/if_urlreg.h                   |    16 +-
 sys/dev/usb/if_urndis.c                   |   174 +-
 sys/dev/usb/if_urndisreg.h                |    14 +-
 sys/dev/usb/if_urtw.c                     |   348 +-
 sys/dev/usb/if_urtwn.c                    |   347 +-
 sys/dev/usb/if_urtwnreg.h                 |     4 +-
 sys/dev/usb/if_urtwnvar.h                 |    20 +-
 sys/dev/usb/if_urtwreg.h                  |    22 +-
 sys/dev/usb/if_zyd.c                      |   155 +-
 sys/dev/usb/if_zydreg.h                   |    21 +-
 sys/dev/usb/irmce.c                       |   131 +-
 sys/dev/usb/moscom.c                      |   114 +-
 sys/dev/usb/motg.c                        |  1303 +++-----
 sys/dev/usb/motgvar.h                     |    22 +-
 sys/dev/usb/ohci.c                        |  3100 +++++++++++----------
 sys/dev/usb/ohcireg.h                     |    16 +-
 sys/dev/usb/ohcivar.h                     |    57 +-
 sys/dev/usb/pseye.c                       |    72 +-
 sys/dev/usb/slurm.c                       |    29 +-
 sys/dev/usb/stuirda.c                     |    94 +-
 sys/dev/usb/u3g.c                         |   235 +-
 sys/dev/usb/uark.c                        |    66 +-
 sys/dev/usb/uatp.c                        |   127 +-
 sys/dev/usb/uaudio.c                      |   202 +-
 sys/dev/usb/uberry.c                      |    15 +-
 sys/dev/usb/ubsa.c                        |    74 +-
 sys/dev/usb/ubsa_common.c                 |    28 +-
 sys/dev/usb/ubsavar.h                     |    16 +-
 sys/dev/usb/ubt.c                         |   238 +-
 sys/dev/usb/uchcom.c                      |    68 +-
 sys/dev/usb/ucom.c                        |   682 ++-
 sys/dev/usb/ucomvar.h                     |    59 +-
 sys/dev/usb/ucycom.c                      |    90 +-
 sys/dev/usb/udl.c                         |    42 +-
 sys/dev/usb/udl.h                         |    10 +-
 sys/dev/usb/udsbr.c                       |    60 +-
 sys/dev/usb/udsir.c                       |   125 +-
 sys/dev/usb/uep.c                         |    36 +-
 sys/dev/usb/uftdi.c                       |   150 +-
 sys/dev/usb/uftdireg.h                    |     2 +-
 sys/dev/usb/ugen.c                        |   598 ++--
 sys/dev/usb/ugensa.c                      |    91 +-
 sys/dev/usb/uhci.c                        |  3299 +++++++++++-----------
 sys/dev/usb/uhcireg.h                     |   109 +-
 sys/dev/usb/uhcivar.h                     |    77 +-
 sys/dev/usb/uhid.c                        |    40 +-
 sys/dev/usb/uhidev.c                      |   144 +-
 sys/dev/usb/uhidev.h                      |    20 +-
 sys/dev/usb/uhmodem.c                     |   173 +-
 sys/dev/usb/uhso.c                        |   215 +-
 sys/dev/usb/uhub.c                        |   555 ++-
 sys/dev/usb/uipad.c                       |    13 +-
 sys/dev/usb/uipaq.c                       |    90 +-
 sys/dev/usb/uirda.c                       |   257 +-
 sys/dev/usb/uirdavar.h                    |    41 +-
 sys/dev/usb/ukbd.c                        |    88 +-
 sys/dev/usb/ukbdmap.c                     |     4 +-
 sys/dev/usb/ukyopon.c                     |    54 +-
 sys/dev/usb/ukyopon.h                     |     2 +-
 sys/dev/usb/ulpt.c                        |   171 +-
 sys/dev/usb/umass.c                       |   354 +-
 sys/dev/usb/umass_isdata.c                |    90 +-
 sys/dev/usb/umass_isdata.h                |     4 +-
 sys/dev/usb/umass_quirks.c                |    38 +-
 sys/dev/usb/umass_quirks.h                |    12 +-
 sys/dev/usb/umass_scsipi.c                |    40 +-
 sys/dev/usb/umass_scsipi.h                |     6 +-
 sys/dev/usb/umassvar.h                    |    63 +-
 sys/dev/usb/umcs.c                        |    92 +-
 sys/dev/usb/umct.c                        |   129 +-
 sys/dev/usb/umidi.c                       |   216 +-
 sys/dev/usb/umidi_quirks.c                |     7 +-
 sys/dev/usb/umidi_quirks.h                |     6 +-
 sys/dev/usb/umodem.c                      |    58 +-
 sys/dev/usb/umodem_common.c               |    86 +-
 sys/dev/usb/umodemvar.h                   |    18 +-
 sys/dev/usb/ums.c                         |    41 +-
 sys/dev/usb/uplcom.c                      |   164 +-
 sys/dev/usb/urio.c                        |   113 +-
 sys/dev/usb/urio.h                        |     2 +-
 sys/dev/usb/usb.c                         |   309 +-
 sys/dev/usb/usb.h                         |   130 +-
 sys/dev/usb/usb_mem.c                     |   319 +-
 sys/dev/usb/usb_mem.h                     |    50 +-
 sys/dev/usb/usb_quirks.c                  |    22 +-
 sys/dev/usb/usb_quirks.h                  |     4 +-
 sys/dev/usb/usb_subr.c                    |  1073 ++++---
 sys/dev/usb/usbdevices.config             |     6 +-
 sys/dev/usb/usbdevs                       |     2 +-
 sys/dev/usb/usbdevs.h                     |     4 +-
 sys/dev/usb/usbdevs_data.h                |     4 +-
 sys/dev/usb/usbdi.c                       |  1166 ++++----
 sys/dev/usb/usbdi.h                       |   227 +-
 sys/dev/usb/usbdi_util.c                  |   364 +-
 sys/dev/usb/usbdi_util.h                  |    94 +-
 sys/dev/usb/usbdivar.h                    |   370 +-
 sys/dev/usb/usbhid.h                      |     2 +-
 sys/dev/usb/usbhist.h                     |     8 +-
 sys/dev/usb/usbroothub.c                  |   491 +++
 sys/dev/usb/usbroothub.h                  |    43 +
 sys/dev/usb/usbroothub_subr.c             |    66 -
 sys/dev/usb/usbroothub_subr.h             |     4 -
 sys/dev/usb/uscanner.c                    |   145 +-
 sys/dev/usb/uslsa.c                       |    71 +-
 sys/dev/usb/usscanner.c                   |   199 +-
 sys/dev/usb/ustir.c                       |   178 +-
 sys/dev/usb/uthum.c                       |    29 +-
 sys/dev/usb/utoppy.c                      |   285 +-
 sys/dev/usb/uts.c                         |    13 +-
 sys/dev/usb/uvideo.c                      |   141 +-
 sys/dev/usb/uvisor.c                      |   108 +-
 sys/dev/usb/uvscom.c                      |   138 +-
 sys/dev/usb/uyap.c                        |    10 +-
 sys/dev/usb/uyap_firmware.h               |     4 +-
 sys/dev/usb/uyurex.c                      |    28 +-
 sys/dev/usb/x1input_rdesc.h               |    12 +-
 sys/dev/usb/xhci.c                        |  2469 ++++++++++------
 sys/dev/usb/xhcireg.h                     |   263 +-
 sys/dev/usb/xhcivar.h                     |    29 +-
 sys/dev/usb/xinput_rdesc.h                |    10 +-
 sys/external/bsd/dwc2/dist/dwc2_hcd.h     |     4 +-
 sys/external/bsd/dwc2/dwc2.c              |   820 +---
 sys/external/bsd/dwc2/dwc2var.h           |    25 +-
 sys/rump/dev/lib/libugenhc/Makefile       |     4 +-
 sys/rump/dev/lib/libugenhc/ugenhc.c       |   484 +--
 sys/rump/dev/lib/libugenhc/ugenhc_dma.c   |   119 -
 sys/rump/dev/lib/libusb/Makefile          |     4 +-
 240 files changed, 19355 insertions(+), 18368 deletions(-)

diffs (truncated from 74443 to 300 lines):

diff -r 1fa6dc515f74 -r 27f3c4038aa9 sys/arch/amd64/conf/GENERIC
--- a/sys/arch/amd64/conf/GENERIC       Sat Apr 23 08:54:20 2016 +0000
+++ b/sys/arch/amd64/conf/GENERIC       Sat Apr 23 10:15:27 2016 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.430 2016/04/13 15:26:28 riastradh Exp $
+# $NetBSD: GENERIC,v 1.431 2016/04/23 10:15:27 skrll Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options        INCLUDE_CONFIG_FILE     # embed config file in kernel binary
 
-#ident                 "GENERIC-$Revision: 1.430 $"
+#ident                 "GENERIC-$Revision: 1.431 $"
 
 maxusers       64              # estimated number of users
 
@@ -849,7 +849,7 @@
 # USB Controller and Devices
 
 # PCI USB controllers
-# xhci*        at pci? dev ? function ?        # eXtensible Host Controller
+xhci*  at pci? dev ? function ?        # eXtensible Host Controller
                                        # xhci is at best experimental
 ehci*  at pci? dev ? function ?        # Enhanced Host Controller
 ohci*  at pci? dev ? function ?        # Open Host Controller
@@ -867,7 +867,7 @@
 slhci* at pcmcia? function ?           # ScanLogic SL811HS
 
 # USB bus support
-# usb* at xhci?
+usb*   at xhci?
 usb*   at ehci?
 usb*   at ohci?
 usb*   at uhci?
diff -r 1fa6dc515f74 -r 27f3c4038aa9 sys/arch/amiga/dev/slhci_zbus.c
--- a/sys/arch/amiga/dev/slhci_zbus.c   Sat Apr 23 08:54:20 2016 +0000
+++ b/sys/arch/amiga/dev/slhci_zbus.c   Sat Apr 23 10:15:27 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: slhci_zbus.c,v 1.1 2013/04/27 22:27:33 rkujawa Exp $ */
+/*     $NetBSD: slhci_zbus.c,v 1.2 2016/04/23 10:15:27 skrll Exp $ */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: slhci_zbus.c,v 1.1 2013/04/27 22:27:33 rkujawa Exp $");
+__KERNEL_RCSID(0, "$NetBSD: slhci_zbus.c,v 1.2 2016/04/23 10:15:27 skrll Exp $");
 
 /*
  * Thylacine driver.
@@ -100,7 +100,7 @@
        zsc = device_private(self);
        sc = &zsc->sc_sc;
        sc->sc_dev = self;
-       sc->sc_bus.hci_private = sc;
+       sc->sc_bus.ub_hcpriv = sc;
 
        zsc->sc_bst.base = (bus_addr_t)zap->va;
        zsc->sc_bst.absm = &amiga_bus_stride_1;
diff -r 1fa6dc515f74 -r 27f3c4038aa9 sys/arch/arm/allwinner/awin_otg.c
--- a/sys/arch/arm/allwinner/awin_otg.c Sat Apr 23 08:54:20 2016 +0000
+++ b/sys/arch/arm/allwinner/awin_otg.c Sat Apr 23 10:15:27 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: awin_otg.c,v 1.6 2015/08/19 06:23:35 skrll Exp $ */
+/* $NetBSD: awin_otg.c,v 1.7 2016/04/23 10:15:27 skrll Exp $ */
 
 /*-
  * Copyright (c) 2014 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: awin_otg.c,v 1.6 2015/08/19 06:23:35 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: awin_otg.c,v 1.7 2016/04/23 10:15:27 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -125,7 +125,7 @@
        }
 
        sc->sc_motg.sc_dev = self;
-       sc->sc_motg.sc_bus.dmatag = aio->aio_dmat;
+       sc->sc_motg.sc_bus.ub_dmatag = aio->aio_dmat;
        sc->sc_motg.sc_iot = aio->aio_core_bst;
        bus_space_subregion(sc->sc_motg.sc_iot, aio->aio_core_bsh,
            loc->loc_offset, loc->loc_size, &sc->sc_motg.sc_ioh);
diff -r 1fa6dc515f74 -r 27f3c4038aa9 sys/arch/arm/allwinner/awin_usb.c
--- a/sys/arch/arm/allwinner/awin_usb.c Sat Apr 23 08:54:20 2016 +0000
+++ b/sys/arch/arm/allwinner/awin_usb.c Sat Apr 23 10:15:27 2016 +0000
@@ -34,7 +34,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(1, "$NetBSD: awin_usb.c,v 1.20 2015/03/15 13:15:26 jmcneill Exp $");
+__KERNEL_RCSID(1, "$NetBSD: awin_usb.c,v 1.21 2016/04/23 10:15:27 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -134,8 +134,8 @@
        sc->iot = usbaa->usbaa_bst;
        sc->ioh = usbaa->usbaa_bsh;
        sc->sc_size = usbaa->usbaa_size;
-       sc->sc_bus.dmatag = usbaa->usbaa_dmat;
-       sc->sc_bus.hci_private = sc;
+       sc->sc_bus.ub_dmatag = usbaa->usbaa_dmat;
+       sc->sc_bus.ub_hcpriv = sc;
 
        //sc->sc_id_vendor = PCI_VENDOR_ALLWINNER;
        strlcpy(sc->sc_vendor, "Allwinner", sizeof(sc->sc_vendor));
@@ -144,7 +144,7 @@
        aprint_normal(": OHCI USB controller\n");
 
        int error = ohci_init(sc);
-       if (error != USBD_NORMAL_COMPLETION) {
+       if (error) {
                aprint_error_dev(self, "init failed, error=%d\n", error);
                return;
        }
@@ -165,7 +165,7 @@
        }
 
        usbsc->usbsc_ohci_ih = intr_establish(irq, IPL_VM,
-           IST_LEVEL, ohci_intr, sc);
+           IST_LEVEL | IST_MPSAFE, ohci_intr, sc);
        if (usbsc->usbsc_ohci_ih == NULL) {
                aprint_error_dev(self, "failed to establish interrupt %d\n",
                     irq);
@@ -220,9 +220,9 @@
        sc->iot = usbaa->usbaa_bst;
        sc->ioh = usbaa->usbaa_bsh;
        sc->sc_size = usbaa->usbaa_size;
-       sc->sc_bus.dmatag = usbaa->usbaa_dmat;
-       sc->sc_bus.hci_private = sc;
-       sc->sc_bus.usbrev = USBREV_2_0;
+       sc->sc_bus.ub_dmatag = usbaa->usbaa_dmat;
+       sc->sc_bus.ub_hcpriv = sc;
+       sc->sc_bus.ub_revision = USBREV_2_0;
        sc->sc_ncomp = 0;
        if (usbsc->usbsc_ohci_dev != NULL) {
                sc->sc_comps[sc->sc_ncomp++] = usbsc->usbsc_ohci_dev;
@@ -235,7 +235,7 @@
        aprint_normal(": EHCI USB controller\n");
 
        int error = ehci_init(sc);
-       if (error != USBD_NORMAL_COMPLETION) {
+       if (error) {
                aprint_error_dev(self, "init failed, error=%d\n", error);
                return;
        }
@@ -255,7 +255,7 @@
        }
 
        usbsc->usbsc_ehci_ih = intr_establish(irq, IPL_VM,
-           IST_LEVEL, ehci_intr, sc);
+           IST_LEVEL | IST_MPSAFE, ehci_intr, sc);
        if (usbsc->usbsc_ehci_ih == NULL) {
                aprint_error_dev(self, "failed to establish interrupt %d\n",
                     irq);
@@ -408,7 +408,7 @@
 
        KASSERT(loc->loc_port != AWINIOCF_PORT_DEFAULT);
        KASSERT(!strcmp(cf->cf_name, loc->loc_name));
-       KASSERT(cf->cf_loc[AWINIOCF_PORT] == AWINIOCF_PORT_DEFAULT 
+       KASSERT(cf->cf_loc[AWINIOCF_PORT] == AWINIOCF_PORT_DEFAULT
            || cf->cf_loc[AWINIOCF_PORT] == loc->loc_port);
        KASSERT((awinusb_ports & __BIT(loc->loc_port)) == 0);
 
diff -r 1fa6dc515f74 -r 27f3c4038aa9 sys/arch/arm/amlogic/amlogic_dwctwo.c
--- a/sys/arch/arm/amlogic/amlogic_dwctwo.c     Sat Apr 23 08:54:20 2016 +0000
+++ b/sys/arch/arm/amlogic/amlogic_dwctwo.c     Sat Apr 23 10:15:27 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: amlogic_dwctwo.c,v 1.5 2015/08/30 13:02:42 skrll Exp $ */
+/*     $NetBSD: amlogic_dwctwo.c,v 1.6 2016/04/23 10:15:27 skrll Exp $ */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amlogic_dwctwo.c,v 1.5 2015/08/30 13:02:42 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amlogic_dwctwo.c,v 1.6 2016/04/23 10:15:27 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -114,7 +114,7 @@
        sc->sc_dwc2.sc_iot = aio->aio_core_bst;
        bus_space_subregion(aio->aio_core_bst, aio->aio_bsh,
             loc->loc_offset, loc->loc_size, &sc->sc_dwc2.sc_ioh);
-       sc->sc_dwc2.sc_bus.dmatag = aio->aio_dmat;
+       sc->sc_dwc2.sc_bus.ub_dmatag = aio->aio_dmat;
        sc->sc_dwc2.sc_params = &amlogic_dwctwo_params;
 
        aprint_naive("\n");
diff -r 1fa6dc515f74 -r 27f3c4038aa9 sys/arch/arm/at91/at91ohci.c
--- a/sys/arch/arm/at91/at91ohci.c      Sat Apr 23 08:54:20 2016 +0000
+++ b/sys/arch/arm/at91/at91ohci.c      Sat Apr 23 10:15:27 2016 +0000
@@ -1,11 +1,11 @@
-/*     $Id: at91ohci.c,v 1.5 2011/11/04 17:13:15 aymeric Exp $ */
-/*     $NetBSD: at91ohci.c,v 1.5 2011/11/04 17:13:15 aymeric Exp $     */
+/*     $Id: at91ohci.c,v 1.6 2016/04/23 10:15:27 skrll Exp $   */
+/*     $NetBSD: at91ohci.c,v 1.6 2016/04/23 10:15:27 skrll Exp $       */
 
 /*-
  * Copyright (c) 2007 Embedtronics Oy.
  * All rights reserved.
  *
- * Based on arch/arm/ep93xx/epohci.c, 
+ * Based on arch/arm/ep93xx/epohci.c,
  * Copyright (c) 2004 Jesse Off
  * All rights reserved.
  *
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: at91ohci.c,v 1.5 2011/11/04 17:13:15 aymeric Exp $");
+__KERNEL_RCSID(0, "$NetBSD: at91ohci.c,v 1.6 2016/04/23 10:15:27 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -83,7 +83,7 @@
 {
        /* AT91X builtin OHCI module */
        if (strcmp(match->cf_name, "ohci") == 0 && strcmp(match->cf_atname, "at91ohci") == 0)
-               return (2);
+               return 2;
        return(0);
 }
 
@@ -94,13 +94,13 @@
        struct at91bus_attach_args *sa = aux;
 
        sc->sc.sc_dev = self;
-       sc->sc.sc_bus.hci_private = sc;
-       sc->sc.sc_bus.dmatag = sa->sa_dmat;
+       sc->sc.sc_bus.ub_hcpriv = sc;
+       sc->sc.sc_bus.ub_dmatag = sa->sa_dmat;
        sc->sc.iot = sa->sa_iot;
        sc->sc_pid = sa->sa_pid;
 
        /* Map I/O space */
-       if (bus_space_map(sc->sc.iot, sa->sa_addr, sa->sa_size, 
+       if (bus_space_map(sc->sc.iot, sa->sa_addr, sa->sa_size,
                          0, &sc->sc.ioh)) {
                printf(": cannot map mem space\n");
                return;
@@ -121,7 +121,6 @@
 at91ohci_callback(device_t self)
 {
        struct at91ohci_softc *sc = device_private(self);
-       usbd_status r;
 
        /* Disable interrupts, so we don't get any spurious ones. */
        bus_space_write_4(sc->sc.iot, sc->sc.ioh, OHCI_INTERRUPT_DISABLE,
@@ -130,10 +129,10 @@
        strlcpy(sc->sc.sc_vendor, "Atmel", sizeof sc->sc.sc_vendor);
 
        sc->sc_ih = at91_intr_establish(sc->sc_pid, IPL_USB, INTR_HIGH_LEVEL, ohci_intr, sc);
-       r = ohci_init(&sc->sc);
+       int err = ohci_init(&sc->sc);
 
-       if (r != USBD_NORMAL_COMPLETION) {
-               printf("%s: init failed, error=%d\n", device_xname(self), r);
+       if (err) {
+               printf("%s: init failed, error=%d\n", device_xname(self), err);
 
                at91_intr_disestablish(sc->sc_ih);
                return;
diff -r 1fa6dc515f74 -r 27f3c4038aa9 sys/arch/arm/broadcom/bcm2835_dwctwo.c
--- a/sys/arch/arm/broadcom/bcm2835_dwctwo.c    Sat Apr 23 08:54:20 2016 +0000
+++ b/sys/arch/arm/broadcom/bcm2835_dwctwo.c    Sat Apr 23 10:15:27 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bcm2835_dwctwo.c,v 1.6 2015/08/30 13:02:42 skrll Exp $ */
+/*     $NetBSD: bcm2835_dwctwo.c,v 1.7 2016/04/23 10:15:27 skrll Exp $ */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcm2835_dwctwo.c,v 1.6 2015/08/30 13:02:42 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm2835_dwctwo.c,v 1.7 2016/04/23 10:15:27 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -118,7 +118,7 @@
        sc->sc_dwc2.sc_dev = self;
 
        sc->sc_dwc2.sc_iot = aaa->aaa_iot;
-       sc->sc_dwc2.sc_bus.dmatag = aaa->aaa_dmat;
+       sc->sc_dwc2.sc_bus.ub_dmatag = aaa->aaa_dmat;
        sc->sc_dwc2.sc_params = &bcmdwc2_params;
 
        error = bus_space_map(aaa->aaa_iot, aaa->aaa_addr, aaa->aaa_size, 0,



Home | Main Index | Thread Index | Old Index