Source-Changes-HG archive

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

[src/nick-nhusb]: src/sys/dev/usb Don't abuse pipe->up_async_task for xhci_cl...



details:   https://anonhg.NetBSD.org/src/rev/1f2b2b50d6f7
branches:  nick-nhusb
changeset: 334209:1f2b2b50d6f7
user:      skrll <skrll%NetBSD.org@localhost>
date:      Wed May 27 06:56:16 2015 +0000

description:
Don't abuse pipe->up_async_task for xhci_clear_endpoint_stall_async_task.
Add member struct usb_task xp_async_task to struct xhci_pipe.

>From Takahiro HAYASHI.

diffstat:

 sys/dev/usb/xhci.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (48 lines):

diff -r 1e7eaca46f0c -r 1f2b2b50d6f7 sys/dev/usb/xhci.c
--- a/sys/dev/usb/xhci.c        Wed May 27 06:54:18 2015 +0000
+++ b/sys/dev/usb/xhci.c        Wed May 27 06:56:16 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xhci.c,v 1.28.2.21 2015/05/27 06:54:18 skrll Exp $     */
+/*     $NetBSD: xhci.c,v 1.28.2.22 2015/05/27 06:56:16 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.21 2015/05/27 06:54:18 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.28.2.22 2015/05/27 06:56:16 skrll Exp $");
 
 #include "opt_usb.h"
 
@@ -116,6 +116,7 @@
 
 struct xhci_pipe {
        struct usbd_pipe xp_pipe;
+       struct usb_task xp_async_task;
 };
 
 #define XHCI_COMMAND_RING_TRBS 256
@@ -1620,6 +1621,7 @@
 xhci_clear_endpoint_stall_async(struct usbd_xfer *xfer)
 {
        struct xhci_softc * const sc = xfer->ux_pipe->up_dev->ud_bus->ub_hcpriv;
+       struct xhci_pipe * const xp = (struct xhci_pipe *)xfer->ux_pipe;
 
        XHCIHIST_FUNC(); XHCIHIST_CALLED();
        DPRINTFN(4, "xfer %p", xfer, 0, 0, 0);
@@ -1628,11 +1630,9 @@
                return USBD_IOERROR;
        }
 
-       /* XXX never use up_async_task for incompatible type of function */
-       usb_init_task(&xfer->ux_pipe->up_async_task,
+       usb_init_task(&xp->xp_async_task,
            xhci_clear_endpoint_stall_async_task, xfer, USB_TASKQ_MPSAFE);
-       usb_add_task(xfer->ux_pipe->up_dev, &xfer->ux_pipe->up_async_task,
-           USB_TASKQ_HC);
+       usb_add_task(xfer->ux_pipe->up_dev, &xp->xp_async_task, USB_TASKQ_HC);
        DPRINTFN(4, "ends", 0, 0, 0, 0);
 
        return USBD_NORMAL_COMPLETION;



Home | Main Index | Thread Index | Old Index