Sun Oct 11 09:17:51 2015 UTC ()
Update ubm_allocx with the isoc frame count parameter and use it in
dwctwo(4)
(skrll)
diff -r1.12.6.12 -r1.12.6.13 src/sys/arch/mips/adm5120/dev/ahci.c
diff -r1.47.6.12 -r1.47.6.13 src/sys/dev/ic/sl811hs.c
diff -r1.234.2.53 -r1.234.2.54 src/sys/dev/usb/ehci.c
diff -r1.12.2.18 -r1.12.2.19 src/sys/dev/usb/motg.c
diff -r1.254.2.22 -r1.254.2.23 src/sys/dev/usb/ohci.c
diff -r1.264.4.35 -r1.264.4.36 src/sys/dev/usb/uhci.c
diff -r1.162.2.30 -r1.162.2.31 src/sys/dev/usb/usbdi.c
diff -r1.109.2.17 -r1.109.2.18 src/sys/dev/usb/usbdivar.h
diff -r1.28.2.40 -r1.28.2.41 src/sys/dev/usb/xhci.c
diff -r1.32.2.12 -r1.32.2.13 src/sys/external/bsd/dwc2/dwc2.c
diff -r1.3.12.5 -r1.3.12.6 src/sys/external/bsd/dwc2/dwc2var.h
diff -r1.22.4.9 -r1.22.4.10 src/sys/rump/dev/lib/libugenhc/ugenhc.c
--- src/sys/arch/mips/adm5120/dev/ahci.c 2015/03/19 17:26:42 1.12.6.12
+++ src/sys/arch/mips/adm5120/dev/ahci.c 2015/10/11 09:17:50 1.12.6.13
@@ -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;
--- src/sys/dev/ic/sl811hs.c 2015/10/11 08:35:04 1.47.6.12
+++ src/sys/dev/ic/sl811hs.c 2015/10/11 09:17:51 1.47.6.13
@@ -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;
--- src/sys/dev/usb/ehci.c 2015/10/11 08:13:11 1.234.2.53
+++ src/sys/dev/usb/ehci.c 2015/10/11 09:17:51 1.234.2.54
@@ -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;
--- src/sys/dev/usb/motg.c 2015/09/22 12:06:01 1.12.2.18
+++ src/sys/dev/usb/motg.c 2015/10/11 09:17:51 1.12.2.19
@@ -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;
--- src/sys/dev/usb/ohci.c 2015/09/22 12:06:01 1.254.2.22
+++ src/sys/dev/usb/ohci.c 2015/10/11 09:17:51 1.254.2.23
@@ -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;
--- src/sys/dev/usb/uhci.c 2015/09/29 11:38:29 1.264.4.35
+++ src/sys/dev/usb/uhci.c 2015/10/11 09:17:51 1.264.4.36
@@ -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;
--- src/sys/dev/usb/usbdi.c 2015/10/10 07:23:25 1.162.2.30
+++ src/sys/dev/usb/usbdi.c 2015/10/11 09:17:51 1.162.2.31
@@ -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;
--- src/sys/dev/usb/usbdivar.h 2015/06/06 15:26:15 1.109.2.17
+++ src/sys/dev/usb/usbdivar.h 2015/10/11 09:17:51 1.109.2.18
@@ -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 **);
usbd_status (*ubm_newdev)(device_t, struct usbd_bus *, int,
--- src/sys/dev/usb/xhci.c 2015/10/03 16:33:33 1.28.2.40
+++ src/sys/dev/usb/xhci.c 2015/10/11 09:17:51 1.28.2.41
@@ -1,4 +1,4 @@
-/* $NetBSD: xhci.c,v 1.28.2.40 2015/10/03 16:33:33 skrll Exp $ */
+/* $NetBSD: xhci.c,v 1.28.2.41 2015/10/11 09:17:51 skrll Exp $ */
/*
* Copyright (c) 2013 Jonathan A. Kollasch
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.28.2.40 2015/10/03 16:33:33 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.28.2.41 2015/10/11 09:17:51 skrll Exp $");
#include "opt_usb.h"
@@ -129,7 +129,7 @@
static int xhci_intr1(struct xhci_softc * const);
static void xhci_softintr(void *);
static void xhci_poll(struct usbd_bus *);
-static struct usbd_xfer *xhci_allocx(struct usbd_bus *);
+static struct usbd_xfer *xhci_allocx(struct usbd_bus *, unsigned int);
static void xhci_freex(struct usbd_bus *, struct usbd_xfer *);
static void xhci_get_lock(struct usbd_bus *, kmutex_t **);
static usbd_status xhci_new_device(device_t, struct usbd_bus *, int, int, int,
@@ -2054,7 +2054,7 @@
}
static struct usbd_xfer *
-xhci_allocx(struct usbd_bus *bus)
+xhci_allocx(struct usbd_bus *bus, unsigned int nframes)
{
struct xhci_softc * const sc = bus->ub_hcpriv;
struct usbd_xfer *xfer;
--- src/sys/external/bsd/dwc2/dwc2.c 2015/10/04 10:45:37 1.32.2.12
+++ src/sys/external/bsd/dwc2/dwc2.c 2015/10/11 09:17:51 1.32.2.13
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc2.c,v 1.32.2.12 2015/10/04 10:45:37 skrll Exp $ */
+/* $NetBSD: dwc2.c,v 1.32.2.13 2015/10/11 09:17:51 skrll Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dwc2.c,v 1.32.2.12 2015/10/04 10:45:37 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwc2.c,v 1.32.2.13 2015/10/11 09:17:51 skrll Exp $");
#include "opt_usb.h"
@@ -84,7 +84,8 @@
Static void dwc2_softintr(void *);
Static void dwc2_waitintr(struct dwc2_softc *, struct usbd_xfer *);
-Static struct usbd_xfer * dwc2_allocx(struct usbd_bus *);
+Static struct usbd_xfer *
+ dwc2_allocx(struct usbd_bus *, unsigned int);
Static void dwc2_freex(struct usbd_bus *, struct usbd_xfer *);
Static void dwc2_get_lock(struct usbd_bus *, kmutex_t **);
Static int dwc2_roothub_ctrl(struct usbd_bus *, usb_device_request_t *,
@@ -204,7 +205,7 @@
};
struct usbd_xfer *
-dwc2_allocx(struct usbd_bus *bus)
+dwc2_allocx(struct usbd_bus *bus, unsigned int nframes)
{
struct dwc2_softc *sc = DWC2_BUS2SC(bus);
struct dwc2_xfer *dxfer;
@@ -217,7 +218,7 @@
memset(dxfer, 0, sizeof(*dxfer));
dxfer->urb = dwc2_hcd_urb_alloc(sc->sc_hsotg,
- DWC2_MAXISOCPACKETS, GFP_KERNEL);
+ nframes, GFP_KERNEL);
#ifdef DIAGNOSTIC
dxfer->xfer.ux_state = XFER_BUSY;
@@ -241,7 +242,7 @@
xfer->ux_state = XFER_FREE;
#endif
DWC2_EVCNT_INCR(sc->sc_ev_xferpoolput);
- dwc2_hcd_urb_free(sc->sc_hsotg, dxfer->urb, DWC2_MAXISOCPACKETS);
+ dwc2_hcd_urb_free(sc->sc_hsotg, dxfer->urb, dxfer->urb->packet_count);
pool_cache_put(sc->sc_xferpool, xfer);
}
@@ -1060,7 +1061,7 @@
return USBD_NOMEM;
memset(dwc2_urb, 0, sizeof(*dwc2_urb) +
- sizeof(dwc2_urb->iso_descs[0]) * DWC2_MAXISOCPACKETS);
+ sizeof(dwc2_urb->iso_descs[0]) * dwc2_urb->packet_count);
dwc2_urb->priv = xfer;
@@ -1090,7 +1091,6 @@
dwc2_urb->length = len;
dwc2_urb->flags = flags;
dwc2_urb->status = -EINPROGRESS;
- dwc2_urb->packet_count = xfer->ux_nframes;
if (xfertype == UE_INTERRUPT ||
xfertype == UE_ISOCHRONOUS) {
@@ -1131,7 +1131,7 @@
xfer->ux_actlen = 0;
KASSERT(xfertype != UE_ISOCHRONOUS ||
- xfer->ux_nframes < DWC2_MAXISOCPACKETS);
+ xfer->ux_nframes < dwc2_urb->packet_count);
KASSERTMSG(xfer->ux_nframes == 0 || xfertype == UE_ISOCHRONOUS,
"nframes %d xfertype %d\n", xfer->ux_nframes, xfertype);
--- src/sys/external/bsd/dwc2/dwc2var.h 2015/06/06 14:40:20 1.3.12.5
+++ src/sys/external/bsd/dwc2/dwc2var.h 2015/10/11 09:17:51 1.3.12.6
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc2var.h,v 1.3.12.5 2015/06/06 14:40:20 skrll Exp $ */
+/* $NetBSD: dwc2var.h,v 1.3.12.6 2015/10/11 09:17:51 skrll Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -34,7 +34,6 @@
#include <sys/pool.h>
-#define DWC2_MAXISOCPACKETS 16
struct dwc2_hsotg;
struct dwc2_qtd;
--- src/sys/rump/dev/lib/libugenhc/ugenhc.c 2015/03/19 17:26:42 1.22.4.9
+++ src/sys/rump/dev/lib/libugenhc/ugenhc.c 2015/10/11 09:17:51 1.22.4.10
@@ -1,4 +1,4 @@
-/* $NetBSD: ugenhc.c,v 1.22.4.9 2015/03/19 17:26:42 skrll Exp $ */
+/* $NetBSD: ugenhc.c,v 1.22.4.10 2015/10/11 09:17:51 skrll Exp $ */
/*
* Copyright (c) 2009, 2010 Antti Kantee. All Rights Reserved.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ugenhc.c,v 1.22.4.9 2015/03/19 17:26:42 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ugenhc.c,v 1.22.4.10 2015/10/11 09:17:51 skrll Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -882,7 +882,7 @@
}
static struct usbd_xfer *
-ugenhc_allocx(struct usbd_bus *bus)
+ugenhc_allocx(struct usbd_bus *bus, unsigned int nframes)
{
struct usbd_xfer *xfer;