Module Name: src
Committed By: skrll
Date: Sat Apr 30 10:34:15 UTC 2016
Modified Files:
src/sys/dev/usb [nick-nhusb]: ehci.c ehcivar.h ohci.c ohcivar.h uhci.c
uhcivar.h usbdivar.h xhci.c xhcivar.h
src/sys/external/bsd/dwc2 [nick-nhusb]: dwc2.c dwc2var.h
Log Message:
Move the struct usb_task to struct usbd_xfer for everyone to use.
To generate a diff of this commit:
cvs rdiff -u -r1.234.2.100 -r1.234.2.101 src/sys/dev/usb/ehci.c
cvs rdiff -u -r1.42.14.25 -r1.42.14.26 src/sys/dev/usb/ehcivar.h
cvs rdiff -u -r1.254.2.72 -r1.254.2.73 src/sys/dev/usb/ohci.c
cvs rdiff -u -r1.55.6.12 -r1.55.6.13 src/sys/dev/usb/ohcivar.h
cvs rdiff -u -r1.264.4.74 -r1.264.4.75 src/sys/dev/usb/uhci.c
cvs rdiff -u -r1.52.14.17 -r1.52.14.18 src/sys/dev/usb/uhcivar.h
cvs rdiff -u -r1.109.2.26 -r1.109.2.27 src/sys/dev/usb/usbdivar.h
cvs rdiff -u -r1.28.2.67 -r1.28.2.68 src/sys/dev/usb/xhci.c
cvs rdiff -u -r1.4.12.8 -r1.4.12.9 src/sys/dev/usb/xhcivar.h
cvs rdiff -u -r1.32.2.25 -r1.32.2.26 src/sys/external/bsd/dwc2/dwc2.c
cvs rdiff -u -r1.3.12.10 -r1.3.12.11 src/sys/external/bsd/dwc2/dwc2var.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.100 src/sys/dev/usb/ehci.c:1.234.2.101
--- src/sys/dev/usb/ehci.c:1.234.2.100 Sat Apr 16 16:02:42 2016
+++ src/sys/dev/usb/ehci.c Sat Apr 30 10:34:14 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: ehci.c,v 1.234.2.100 2016/04/16 16:02:42 skrll Exp $ */
+/* $NetBSD: ehci.c,v 1.234.2.101 2016/04/30 10:34:14 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.100 2016/04/16 16:02:42 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.234.2.101 2016/04/30 10:34:14 skrll Exp $");
#include "ohci.h"
#include "uhci.h"
@@ -3407,14 +3407,13 @@ Static void
ehci_timeout(void *addr)
{
struct usbd_xfer *xfer = addr;
- struct ehci_xfer *exfer = EHCI_XFER2EXFER(xfer);
struct usbd_pipe *pipe = xfer->ux_pipe;
struct usbd_device *dev = pipe->up_dev;
ehci_softc_t *sc = EHCI_XFER2SC(xfer);
EHCIHIST_FUNC(); EHCIHIST_CALLED();
- DPRINTF("exfer %p", exfer, 0, 0, 0);
+ DPRINTF("xfer %p", xfer, 0, 0, 0);
#ifdef EHCI_DEBUG
if (ehcidebug >= 2)
usbd_dump_pipe(pipe);
@@ -3428,9 +3427,9 @@ ehci_timeout(void *addr)
}
/* Execute the abort in a process context. */
- usb_init_task(&exfer->ex_aborttask, ehci_timeout_task, xfer,
+ usb_init_task(&xfer->ux_aborttask, ehci_timeout_task, xfer,
USB_TASKQ_MPSAFE);
- usb_add_task(dev, &exfer->ex_aborttask, USB_TASKQ_HC);
+ usb_add_task(dev, &xfer->ux_aborttask, USB_TASKQ_HC);
}
Static void
Index: src/sys/dev/usb/ehcivar.h
diff -u src/sys/dev/usb/ehcivar.h:1.42.14.25 src/sys/dev/usb/ehcivar.h:1.42.14.26
--- src/sys/dev/usb/ehcivar.h:1.42.14.25 Mon Apr 4 07:43:12 2016
+++ src/sys/dev/usb/ehcivar.h Sat Apr 30 10:34:14 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: ehcivar.h,v 1.42.14.25 2016/04/04 07:43:12 skrll Exp $ */
+/* $NetBSD: ehcivar.h,v 1.42.14.26 2016/04/30 10:34:14 skrll Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -91,7 +91,6 @@ typedef struct ehci_soft_itd {
struct ehci_xfer {
struct usbd_xfer ex_xfer;
- struct usb_task ex_aborttask;
TAILQ_ENTRY(ehci_xfer) ex_next; /* list of active xfers */
enum {
EX_NONE,
Index: src/sys/dev/usb/ohci.c
diff -u src/sys/dev/usb/ohci.c:1.254.2.72 src/sys/dev/usb/ohci.c:1.254.2.73
--- src/sys/dev/usb/ohci.c:1.254.2.72 Sat Apr 16 16:02:42 2016
+++ src/sys/dev/usb/ohci.c Sat Apr 30 10:34:14 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: ohci.c,v 1.254.2.72 2016/04/16 16:02:42 skrll Exp $ */
+/* $NetBSD: ohci.c,v 1.254.2.73 2016/04/30 10:34:14 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.72 2016/04/16 16:02:42 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.254.2.73 2016/04/30 10:34:14 skrll Exp $");
#include "opt_usb.h"
@@ -1917,11 +1917,10 @@ void
ohci_timeout(void *addr)
{
struct usbd_xfer *xfer = addr;
- struct ohci_xfer *oxfer = OHCI_XFER2OXFER(xfer);
ohci_softc_t *sc = OHCI_XFER2SC(xfer);
OHCIHIST_FUNC(); OHCIHIST_CALLED();
- DPRINTF("oxfer=%p", oxfer, 0, 0, 0);
+ DPRINTF("xfer=%p", xfer, 0, 0, 0);
if (sc->sc_dying) {
mutex_enter(&sc->sc_lock);
@@ -1931,9 +1930,9 @@ ohci_timeout(void *addr)
}
/* Execute the abort in a process context. */
- usb_init_task(&oxfer->abort_task, ohci_timeout_task, addr,
+ usb_init_task(&xfer->ux_aborttask, ohci_timeout_task, addr,
USB_TASKQ_MPSAFE);
- usb_add_task(xfer->ux_pipe->up_dev, &oxfer->abort_task,
+ usb_add_task(xfer->ux_pipe->up_dev, &xfer->ux_aborttask,
USB_TASKQ_HC);
}
Index: src/sys/dev/usb/ohcivar.h
diff -u src/sys/dev/usb/ohcivar.h:1.55.6.12 src/sys/dev/usb/ohcivar.h:1.55.6.13
--- src/sys/dev/usb/ohcivar.h:1.55.6.12 Sun Jan 10 10:16:00 2016
+++ src/sys/dev/usb/ohcivar.h Sat Apr 30 10:34:14 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: ohcivar.h,v 1.55.6.12 2016/01/10 10:16:00 skrll Exp $ */
+/* $NetBSD: ohcivar.h,v 1.55.6.13 2016/04/30 10:34:14 skrll Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -145,7 +145,6 @@ typedef struct ohci_softc {
struct ohci_xfer {
struct usbd_xfer xfer;
- struct usb_task abort_task;
/* ctrl */
ohci_soft_td_t *ox_setup;
ohci_soft_td_t *ox_stat;
Index: src/sys/dev/usb/uhci.c
diff -u src/sys/dev/usb/uhci.c:1.264.4.74 src/sys/dev/usb/uhci.c:1.264.4.75
--- src/sys/dev/usb/uhci.c:1.264.4.74 Sat Apr 16 16:02:42 2016
+++ src/sys/dev/usb/uhci.c Sat Apr 30 10:34:14 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: uhci.c,v 1.264.4.74 2016/04/16 16:02:42 skrll Exp $ */
+/* $NetBSD: uhci.c,v 1.264.4.75 2016/04/30 10:34:14 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.74 2016/04/16 16:02:42 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.264.4.75 2016/04/30 10:34:14 skrll Exp $");
#include "opt_usb.h"
@@ -1715,9 +1715,9 @@ uhci_timeout(void *addr)
}
/* Execute the abort in a process context. */
- usb_init_task(&uxfer->ux_aborttask, uhci_timeout_task, xfer,
+ usb_init_task(&xfer->ux_aborttask, uhci_timeout_task, xfer,
USB_TASKQ_MPSAFE);
- usb_add_task(uxfer->ux_xfer.ux_pipe->up_dev, &uxfer->ux_aborttask,
+ usb_add_task(uxfer->ux_xfer.ux_pipe->up_dev, &xfer->ux_aborttask,
USB_TASKQ_HC);
}
Index: src/sys/dev/usb/uhcivar.h
diff -u src/sys/dev/usb/uhcivar.h:1.52.14.17 src/sys/dev/usb/uhcivar.h:1.52.14.18
--- src/sys/dev/usb/uhcivar.h:1.52.14.17 Thu Mar 17 09:04:53 2016
+++ src/sys/dev/usb/uhcivar.h Sat Apr 30 10:34:14 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: uhcivar.h,v 1.52.14.17 2016/03/17 09:04:53 skrll Exp $ */
+/* $NetBSD: uhcivar.h,v 1.52.14.18 2016/04/30 10:34:14 skrll Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -61,7 +61,6 @@ typedef union {
struct uhci_xfer {
struct usbd_xfer ux_xfer;
- struct usb_task ux_aborttask;
enum {
UX_NONE, UX_CTRL, UX_BULK, UX_INTR, UX_ISOC
} ux_type;
Index: src/sys/dev/usb/usbdivar.h
diff -u src/sys/dev/usb/usbdivar.h:1.109.2.26 src/sys/dev/usb/usbdivar.h:1.109.2.27
--- src/sys/dev/usb/usbdivar.h:1.109.2.26 Tue Mar 29 08:42:41 2016
+++ src/sys/dev/usb/usbdivar.h Sat Apr 30 10:34:14 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: usbdivar.h,v 1.109.2.26 2016/03/29 08:42:41 skrll Exp $ */
+/* $NetBSD: usbdivar.h,v 1.109.2.27 2016/04/30 10:34:14 skrll Exp $ */
/*
* Copyright (c) 1998, 2012 The NetBSD Foundation, Inc.
@@ -286,6 +286,7 @@ struct usbd_xfer {
#define UXFER_ABORTWAIT 0x02 /* abort completion is being awaited. */
kcondvar_t ux_hccv; /* private use by the HC driver */
+ struct usb_task ux_aborttask;
struct callout ux_callout;
};
Index: src/sys/dev/usb/xhci.c
diff -u src/sys/dev/usb/xhci.c:1.28.2.67 src/sys/dev/usb/xhci.c:1.28.2.68
--- src/sys/dev/usb/xhci.c:1.28.2.67 Sat Apr 16 13:54:38 2016
+++ src/sys/dev/usb/xhci.c Sat Apr 30 10:34:14 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: xhci.c,v 1.28.2.67 2016/04/16 13:54:38 skrll Exp $ */
+/* $NetBSD: xhci.c,v 1.28.2.68 2016/04/30 10:34:14 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.67 2016/04/16 13:54:38 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.28.2.68 2016/04/30 10:34:14 skrll Exp $");
#include "opt_usb.h"
@@ -3544,9 +3544,9 @@ xhci_timeout(void *addr)
return;
}
- usb_init_task(&xx->xx_abort_task, xhci_timeout_task, addr,
+ usb_init_task(&xfer->ux_aborttask, xhci_timeout_task, addr,
USB_TASKQ_MPSAFE);
- usb_add_task(xx->xx_xfer.ux_pipe->up_dev, &xx->xx_abort_task,
+ usb_add_task(xx->xx_xfer.ux_pipe->up_dev, &xfer->ux_aborttask,
USB_TASKQ_HC);
}
Index: src/sys/dev/usb/xhcivar.h
diff -u src/sys/dev/usb/xhcivar.h:1.4.12.8 src/sys/dev/usb/xhcivar.h:1.4.12.9
--- src/sys/dev/usb/xhcivar.h:1.4.12.8 Sun Apr 10 15:37:33 2016
+++ src/sys/dev/usb/xhcivar.h Sat Apr 30 10:34:14 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: xhcivar.h,v 1.4.12.8 2016/04/10 15:37:33 skrll Exp $ */
+/* $NetBSD: xhcivar.h,v 1.4.12.9 2016/04/30 10:34:14 skrll Exp $ */
/*
* Copyright (c) 2013 Jonathan A. Kollasch
@@ -35,7 +35,6 @@
struct xhci_xfer {
struct usbd_xfer xx_xfer;
- struct usb_task xx_abort_task;
struct xhci_trb xx_trb[XHCI_XFER_NTRB];
};
Index: src/sys/external/bsd/dwc2/dwc2.c
diff -u src/sys/external/bsd/dwc2/dwc2.c:1.32.2.25 src/sys/external/bsd/dwc2/dwc2.c:1.32.2.26
--- src/sys/external/bsd/dwc2/dwc2.c:1.32.2.25 Sat Mar 19 11:30:30 2016
+++ src/sys/external/bsd/dwc2/dwc2.c Sat Apr 30 10:34:14 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc2.c,v 1.32.2.25 2016/03/19 11:30:30 skrll Exp $ */
+/* $NetBSD: dwc2.c,v 1.32.2.26 2016/04/30 10:34:14 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.25 2016/03/19 11:30:30 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwc2.c,v 1.32.2.26 2016/04/30 10:34:14 skrll Exp $");
#include "opt_usb.h"
@@ -365,9 +365,9 @@ dwc2_timeout(void *addr)
}
/* Execute the abort in a process context. */
- usb_init_task(&dxfer->abort_task, dwc2_timeout_task, addr,
+ usb_init_task(&xfer->ux_aborttask, dwc2_timeout_task, addr,
USB_TASKQ_MPSAFE);
- usb_add_task(dxfer->xfer.ux_pipe->up_dev, &dxfer->abort_task,
+ usb_add_task(dxfer->xfer.ux_pipe->up_dev, &xfer->ux_aborttask,
USB_TASKQ_HC);
}
Index: src/sys/external/bsd/dwc2/dwc2var.h
diff -u src/sys/external/bsd/dwc2/dwc2var.h:1.3.12.10 src/sys/external/bsd/dwc2/dwc2var.h:1.3.12.11
--- src/sys/external/bsd/dwc2/dwc2var.h:1.3.12.10 Sat Mar 5 13:01:47 2016
+++ src/sys/external/bsd/dwc2/dwc2var.h Sat Apr 30 10:34:14 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc2var.h,v 1.3.12.10 2016/03/05 13:01:47 skrll Exp $ */
+/* $NetBSD: dwc2var.h,v 1.3.12.11 2016/04/30 10:34:14 skrll Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -39,7 +39,6 @@ struct dwc2_qtd;
struct dwc2_xfer {
struct usbd_xfer xfer; /* Needs to be first */
- struct usb_task abort_task;
struct dwc2_hcd_urb *urb;