Source-Changes-HG archive

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

[src/nick-nhusb]: src/sys Update ubm_allocx with the isoc frame count paramet...



details:   https://anonhg.NetBSD.org/src/rev/ce11fd66cf38
branches:  nick-nhusb
changeset: 804410:ce11fd66cf38
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sun Oct 11 09:17:50 2015 +0000

description:
Update ubm_allocx with the isoc frame count parameter and use it in
dwctwo(4)

diffstat:

 sys/arch/mips/adm5120/dev/ahci.c    |   9 +++++----
 sys/dev/ic/sl811hs.c                |   8 ++++----
 sys/dev/usb/ehci.c                  |   8 ++++----
 sys/dev/usb/motg.c                  |   9 +++++----
 sys/dev/usb/ohci.c                  |   9 +++++----
 sys/dev/usb/uhci.c                  |   9 +++++----
 sys/dev/usb/usbdi.c                 |  14 +++++++-------
 sys/dev/usb/usbdivar.h              |   4 ++--
 sys/dev/usb/xhci.c                  |   8 ++++----
 sys/external/bsd/dwc2/dwc2.c        |  18 +++++++++---------
 sys/external/bsd/dwc2/dwc2var.h     |   3 +--
 sys/rump/dev/lib/libugenhc/ugenhc.c |   6 +++---
 12 files changed, 54 insertions(+), 51 deletions(-)

diffs (truncated from 462 to 300 lines):

diff -r d1dd0e433630 -r ce11fd66cf38 sys/arch/mips/adm5120/dev/ahci.c
--- a/sys/arch/mips/adm5120/dev/ahci.c  Sun Oct 11 08:35:04 2015 +0000
+++ b/sys/arch/mips/adm5120/dev/ahci.c  Sun Oct 11 09:17:50 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ahci.c,v 1.12.6.12 2015/03/19 17:26:42 skrll Exp $     */
+/*     $NetBSD: ahci.c,v 1.12.6.13 2015/10/11 09:17:50 skrll Exp $     */
 
 /*-
  * Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko.
@@ -64,7 +64,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ahci.c,v 1.12.6.12 2015/03/19 17:26:42 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahci.c,v 1.12.6.13 2015/10/11 09:17:50 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -95,7 +95,8 @@
 static void            ahci_poll(struct usbd_bus *);
 static void            ahci_poll_hub(void *);
 static void            ahci_poll_device(void *arg);
-static struct usbd_xfer *ahci_allocx(struct usbd_bus *);
+static struct usbd_xfer *
+                       ahci_allocx(struct usbd_bus *, unsigned int);
 static void            ahci_freex(struct usbd_bus *, struct usbd_xfer *);
 
 static void            ahci_get_lock(struct usbd_bus *, kmutex_t **);
@@ -450,7 +451,7 @@
 }
 
 struct usbd_xfer *
-ahci_allocx(struct usbd_bus *bus)
+ahci_allocx(struct usbd_bus *bus, unsigned int nframes)
 {
        struct ahci_softc *sc = (struct ahci_softc *)bus;
        struct usbd_xfer *xfer;
diff -r d1dd0e433630 -r ce11fd66cf38 sys/dev/ic/sl811hs.c
--- a/sys/dev/ic/sl811hs.c      Sun Oct 11 08:35:04 2015 +0000
+++ b/sys/dev/ic/sl811hs.c      Sun Oct 11 09:17:50 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sl811hs.c,v 1.47.6.12 2015/10/11 08:35:04 skrll Exp $  */
+/*     $NetBSD: sl811hs.c,v 1.47.6.13 2015/10/11 09:17:51 skrll Exp $  */
 
 /*
  * Not (c) 2007 Matthew Orgass
@@ -68,7 +68,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sl811hs.c,v 1.47.6.12 2015/10/11 08:35:04 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sl811hs.c,v 1.47.6.13 2015/10/11 09:17:51 skrll Exp $");
 
 #include "opt_slhci.h"
 
@@ -420,7 +420,7 @@
 typedef usbd_status (*LockCallFunc)(struct slhci_softc *, struct slhci_pipe
     *, struct usbd_xfer *);
 
-struct usbd_xfer * slhci_allocx(struct usbd_bus *);
+struct usbd_xfer * slhci_allocx(struct usbd_bus *, unsigned int);
 void slhci_freex(struct usbd_bus *, struct usbd_xfer *);
 static void slhci_get_lock(struct usbd_bus *, kmutex_t **);
 
@@ -758,7 +758,7 @@
 /* Start out of lock functions. */
 
 struct usbd_xfer *
-slhci_allocx(struct usbd_bus *bus)
+slhci_allocx(struct usbd_bus *bus, unsigned int nframes)
 {
        struct usbd_xfer *xfer;
 
diff -r d1dd0e433630 -r ce11fd66cf38 sys/dev/usb/ehci.c
--- a/sys/dev/usb/ehci.c        Sun Oct 11 08:35:04 2015 +0000
+++ b/sys/dev/usb/ehci.c        Sun Oct 11 09:17:50 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ehci.c,v 1.234.2.53 2015/10/11 08:13:11 skrll Exp $ */
+/*     $NetBSD: ehci.c,v 1.234.2.54 2015/10/11 09:17:51 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.53 2015/10/11 08:13:11 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.234.2.54 2015/10/11 09:17:51 skrll Exp $");
 
 #include "ohci.h"
 #include "uhci.h"
@@ -165,7 +165,7 @@
 Static void            ehci_pcd(void *);
 
 Static struct usbd_xfer *
-                       ehci_allocx(struct usbd_bus *);
+                       ehci_allocx(struct usbd_bus *, unsigned int);
 Static void            ehci_freex(struct usbd_bus *, struct usbd_xfer *);
 Static void            ehci_get_lock(struct usbd_bus *, kmutex_t **);
 Static int             ehci_roothub_ctrl(struct usbd_bus *,
@@ -1513,7 +1513,7 @@
 }
 
 Static struct usbd_xfer *
-ehci_allocx(struct usbd_bus *bus)
+ehci_allocx(struct usbd_bus *bus, unsigned int nframes)
 {
        struct ehci_softc *sc = bus->ub_hcpriv;
        struct usbd_xfer *xfer;
diff -r d1dd0e433630 -r ce11fd66cf38 sys/dev/usb/motg.c
--- a/sys/dev/usb/motg.c        Sun Oct 11 08:35:04 2015 +0000
+++ b/sys/dev/usb/motg.c        Sun Oct 11 09:17:50 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: motg.c,v 1.12.2.18 2015/09/22 12:06:01 skrll Exp $     */
+/*     $NetBSD: motg.c,v 1.12.2.19 2015/10/11 09:17:51 skrll Exp $     */
 
 /*
  * Copyright (c) 1998, 2004, 2011, 2012, 2014 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
 #include "opt_motg.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: motg.c,v 1.12.2.18 2015/09/22 12:06:01 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: motg.c,v 1.12.2.19 2015/10/11 09:17:51 skrll Exp $");
 
 #include <sys/param.h>
 
@@ -144,7 +144,8 @@
 static usbd_status     motg_open(struct usbd_pipe *);
 static void            motg_poll(struct usbd_bus *);
 static void            motg_softintr(void *);
-static struct usbd_xfer *      motg_allocx(struct usbd_bus *);
+static struct usbd_xfer *
+                       motg_allocx(struct usbd_bus *, unsigned int);
 static void            motg_freex(struct usbd_bus *, struct usbd_xfer *);
 static void            motg_get_lock(struct usbd_bus *, kmutex_t **);
 static int             motg_roothub_ctrl(struct usbd_bus *, usb_device_request_t *,
@@ -745,7 +746,7 @@
 }
 
 struct usbd_xfer *
-motg_allocx(struct usbd_bus *bus)
+motg_allocx(struct usbd_bus *bus, unsigned int nframes)
 {
        struct motg_softc *sc = bus->ub_hcpriv;
        struct usbd_xfer *xfer;
diff -r d1dd0e433630 -r ce11fd66cf38 sys/dev/usb/ohci.c
--- a/sys/dev/usb/ohci.c        Sun Oct 11 08:35:04 2015 +0000
+++ b/sys/dev/usb/ohci.c        Sun Oct 11 09:17:50 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ohci.c,v 1.254.2.22 2015/09/22 12:06:01 skrll Exp $    */
+/*     $NetBSD: ohci.c,v 1.254.2.23 2015/10/11 09:17:51 skrll Exp $    */
 
 /*
  * Copyright (c) 1998, 2004, 2005, 2012 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.254.2.22 2015/09/22 12:06:01 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.254.2.23 2015/10/11 09:17:51 skrll Exp $");
 
 #include "opt_usb.h"
 
@@ -162,7 +162,8 @@
 Static usbd_status     ohci_setup_isoc(struct usbd_pipe *);
 Static void            ohci_device_isoc_enter(struct usbd_xfer *);
 
-Static struct usbd_xfer *      ohci_allocx(struct usbd_bus *);
+Static struct usbd_xfer *
+                       ohci_allocx(struct usbd_bus *, unsigned int);
 Static void            ohci_freex(struct usbd_bus *, struct usbd_xfer *);
 Static void            ohci_get_lock(struct usbd_bus *, kmutex_t **);
 Static int             ohci_roothub_ctrl(struct usbd_bus *,
@@ -948,7 +949,7 @@
 }
 
 struct usbd_xfer *
-ohci_allocx(struct usbd_bus *bus)
+ohci_allocx(struct usbd_bus *bus, unsigned int nframes)
 {
        struct ohci_softc *sc = bus->ub_hcpriv;
        struct usbd_xfer *xfer;
diff -r d1dd0e433630 -r ce11fd66cf38 sys/dev/usb/uhci.c
--- a/sys/dev/usb/uhci.c        Sun Oct 11 08:35:04 2015 +0000
+++ b/sys/dev/usb/uhci.c        Sun Oct 11 09:17:50 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uhci.c,v 1.264.4.35 2015/09/29 11:38:29 skrll Exp $    */
+/*     $NetBSD: uhci.c,v 1.264.4.36 2015/10/11 09:17:51 skrll Exp $    */
 
 /*
  * Copyright (c) 1998, 2004, 2011, 2012 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.264.4.35 2015/09/29 11:38:29 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.264.4.36 2015/10/11 09:17:51 skrll Exp $");
 
 #include "opt_usb.h"
 
@@ -202,7 +202,8 @@
 Static usbd_status     uhci_setup_isoc(struct usbd_pipe *);
 Static void            uhci_device_isoc_enter(struct usbd_xfer *);
 
-Static struct usbd_xfer *      uhci_allocx(struct usbd_bus *);
+Static struct usbd_xfer *
+                       uhci_allocx(struct usbd_bus *, unsigned int);
 Static void            uhci_freex(struct usbd_bus *, struct usbd_xfer *);
 Static void            uhci_get_lock(struct usbd_bus *, kmutex_t **);
 Static int             uhci_roothub_ctrl(struct usbd_bus *,
@@ -613,7 +614,7 @@
 }
 
 struct usbd_xfer *
-uhci_allocx(struct usbd_bus *bus)
+uhci_allocx(struct usbd_bus *bus, unsigned int nframes)
 {
        struct uhci_softc *sc = bus->ub_hcpriv;
        struct usbd_xfer *xfer;
diff -r d1dd0e433630 -r ce11fd66cf38 sys/dev/usb/usbdi.c
--- a/sys/dev/usb/usbdi.c       Sun Oct 11 08:35:04 2015 +0000
+++ b/sys/dev/usb/usbdi.c       Sun Oct 11 09:17:50 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usbdi.c,v 1.162.2.30 2015/10/10 07:23:25 skrll Exp $   */
+/*     $NetBSD: usbdi.c,v 1.162.2.31 2015/10/11 09:17:51 skrll Exp $   */
 
 /*
  * Copyright (c) 1998, 2012 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.162.2.30 2015/10/10 07:23:25 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.162.2.31 2015/10/11 09:17:51 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -67,7 +67,7 @@
        (struct usbd_interface *, uint8_t, uint8_t, struct usbd_pipe **, int);
 static void *usbd_alloc_buffer(struct usbd_xfer *, uint32_t);
 static void usbd_free_buffer(struct usbd_xfer *);
-static struct usbd_xfer *usbd_alloc_xfer(struct usbd_device *);
+static struct usbd_xfer *usbd_alloc_xfer(struct usbd_device *, unsigned int);
 static usbd_status usbd_free_xfer(struct usbd_xfer *);
 
 #if defined(USB_DEBUG)
@@ -445,7 +445,7 @@
 }
 
 static struct usbd_xfer *
-usbd_alloc_xfer(struct usbd_device *dev)
+usbd_alloc_xfer(struct usbd_device *dev, unsigned int nframes)
 {
        struct usbd_xfer *xfer;
 
@@ -453,7 +453,7 @@
 
        ASSERT_SLEEPABLE();
 
-       xfer = dev->ud_bus->ub_methods->ubm_allocx(dev->ud_bus);
+       xfer = dev->ud_bus->ub_methods->ubm_allocx(dev->ud_bus, nframes);
        if (xfer == NULL)
                return NULL;
        xfer->ux_dev = dev;
@@ -493,7 +493,7 @@
 {
        KASSERT(xp != NULL);
 
-       struct usbd_xfer *xfer = usbd_alloc_xfer(pipe->up_dev);
+       struct usbd_xfer *xfer = usbd_alloc_xfer(pipe->up_dev, nframes);
        if (xfer == NULL)
                return ENOMEM;
 
@@ -1053,7 +1053,7 @@
 
        ASSERT_SLEEPABLE();
 
-       xfer = usbd_alloc_xfer(dev);
+       xfer = usbd_alloc_xfer(dev, 0);
        if (xfer == NULL)
                return USBD_NOMEM;
 
diff -r d1dd0e433630 -r ce11fd66cf38 sys/dev/usb/usbdivar.h
--- a/sys/dev/usb/usbdivar.h    Sun Oct 11 08:35:04 2015 +0000
+++ b/sys/dev/usb/usbdivar.h    Sun Oct 11 09:17:50 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usbdivar.h,v 1.109.2.17 2015/06/06 15:26:15 skrll Exp $        */
+/*     $NetBSD: usbdivar.h,v 1.109.2.18 2015/10/11 09:17:51 skrll Exp $        */
 
 /*
  * Copyright (c) 1998, 2012 The NetBSD Foundation, Inc.
@@ -94,7 +94,7 @@
        usbd_status           (*ubm_open)(struct usbd_pipe *);
        void                  (*ubm_softint)(void *);
        void                  (*ubm_dopoll)(struct usbd_bus *);
-       struct usbd_xfer     *(*ubm_allocx)(struct usbd_bus *);
+       struct usbd_xfer     *(*ubm_allocx)(struct usbd_bus *, unsigned int);
        void                  (*ubm_freex)(struct usbd_bus *, struct usbd_xfer *);
        void                  (*ubm_getlock)(struct usbd_bus *, kmutex_t **);



Home | Main Index | Thread Index | Old Index