Source-Changes-HG archive

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

[src/nick-nhusb]: src/sys Move the struct usb_task to struct usbd_xfer for ev...



details:   https://anonhg.NetBSD.org/src/rev/a80966ebdf81
branches:  nick-nhusb
changeset: 804647:a80966ebdf81
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sat Apr 30 10:34:14 2016 +0000

description:
Move the struct usb_task to struct usbd_xfer for everyone to use.

diffstat:

 sys/dev/usb/ehci.c              |  11 +++++------
 sys/dev/usb/ehcivar.h           |   3 +--
 sys/dev/usb/ohci.c              |  11 +++++------
 sys/dev/usb/ohcivar.h           |   3 +--
 sys/dev/usb/uhci.c              |   8 ++++----
 sys/dev/usb/uhcivar.h           |   3 +--
 sys/dev/usb/usbdivar.h          |   3 ++-
 sys/dev/usb/xhci.c              |   8 ++++----
 sys/dev/usb/xhcivar.h           |   3 +--
 sys/external/bsd/dwc2/dwc2.c    |   8 ++++----
 sys/external/bsd/dwc2/dwc2var.h |   3 +--
 11 files changed, 29 insertions(+), 35 deletions(-)

diffs (281 lines):

diff -r 53e2c38f7cc1 -r a80966ebdf81 sys/dev/usb/ehci.c
--- a/sys/dev/usb/ehci.c        Sat Apr 30 08:48:09 2016 +0000
+++ b/sys/dev/usb/ehci.c        Sat Apr 30 10:34:14 2016 +0000
@@ -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 @@
 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 @@
        }
 
        /* 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
diff -r 53e2c38f7cc1 -r a80966ebdf81 sys/dev/usb/ehcivar.h
--- a/sys/dev/usb/ehcivar.h     Sat Apr 30 08:48:09 2016 +0000
+++ b/sys/dev/usb/ehcivar.h     Sat Apr 30 10:34:14 2016 +0000
@@ -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 @@
 
 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,
diff -r 53e2c38f7cc1 -r a80966ebdf81 sys/dev/usb/ohci.c
--- a/sys/dev/usb/ohci.c        Sat Apr 30 08:48:09 2016 +0000
+++ b/sys/dev/usb/ohci.c        Sat Apr 30 10:34:14 2016 +0000
@@ -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 @@
 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 @@
        }
 
        /* 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);
 }
 
diff -r 53e2c38f7cc1 -r a80966ebdf81 sys/dev/usb/ohcivar.h
--- a/sys/dev/usb/ohcivar.h     Sat Apr 30 08:48:09 2016 +0000
+++ b/sys/dev/usb/ohcivar.h     Sat Apr 30 10:34:14 2016 +0000
@@ -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 @@
 
 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;
diff -r 53e2c38f7cc1 -r a80966ebdf81 sys/dev/usb/uhci.c
--- a/sys/dev/usb/uhci.c        Sat Apr 30 08:48:09 2016 +0000
+++ b/sys/dev/usb/uhci.c        Sat Apr 30 10:34:14 2016 +0000
@@ -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 @@
        }
 
        /* 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);
 }
 
diff -r 53e2c38f7cc1 -r a80966ebdf81 sys/dev/usb/uhcivar.h
--- a/sys/dev/usb/uhcivar.h     Sat Apr 30 08:48:09 2016 +0000
+++ b/sys/dev/usb/uhcivar.h     Sat Apr 30 10:34:14 2016 +0000
@@ -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 @@
 
 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;
diff -r 53e2c38f7cc1 -r a80966ebdf81 sys/dev/usb/usbdivar.h
--- a/sys/dev/usb/usbdivar.h    Sat Apr 30 08:48:09 2016 +0000
+++ b/sys/dev/usb/usbdivar.h    Sat Apr 30 10:34:14 2016 +0000
@@ -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 @@
 #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;
 };
 
diff -r 53e2c38f7cc1 -r a80966ebdf81 sys/dev/usb/xhci.c
--- a/sys/dev/usb/xhci.c        Sat Apr 30 08:48:09 2016 +0000
+++ b/sys/dev/usb/xhci.c        Sat Apr 30 10:34:14 2016 +0000
@@ -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 @@
                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);
 }
 
diff -r 53e2c38f7cc1 -r a80966ebdf81 sys/dev/usb/xhcivar.h
--- a/sys/dev/usb/xhcivar.h     Sat Apr 30 08:48:09 2016 +0000
+++ b/sys/dev/usb/xhcivar.h     Sat Apr 30 10:34:14 2016 +0000
@@ -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];
 };
 
diff -r 53e2c38f7cc1 -r a80966ebdf81 sys/external/bsd/dwc2/dwc2.c
--- a/sys/external/bsd/dwc2/dwc2.c      Sat Apr 30 08:48:09 2016 +0000
+++ b/sys/external/bsd/dwc2/dwc2.c      Sat Apr 30 10:34:14 2016 +0000
@@ -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 @@
        }
 
        /* 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);
 }
 
diff -r 53e2c38f7cc1 -r a80966ebdf81 sys/external/bsd/dwc2/dwc2var.h
--- a/sys/external/bsd/dwc2/dwc2var.h   Sat Apr 30 08:48:09 2016 +0000
+++ b/sys/external/bsd/dwc2/dwc2var.h   Sat Apr 30 10:34:14 2016 +0000
@@ -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_xfer {
        struct usbd_xfer xfer;                  /* Needs to be first */
-       struct usb_task abort_task;
 
        struct dwc2_hcd_urb *urb;
 



Home | Main Index | Thread Index | Old Index