diff options
author | 2015-02-11 22:55:25 +0000 | |
---|---|---|
committer | 2015-02-11 22:55:25 +0000 | |
commit | 3128e5d14c5dc17c51d9251d7d1a62cc3e091c70 (patch) | |
tree | 46aeb6a1cba7b639b095c193731cb69f83b20ca9 | |
parent | Make syslogd tests more reliable. Allow a range of certain log (diff) | |
download | wireguard-openbsd-3128e5d14c5dc17c51d9251d7d1a62cc3e091c70.tar.xz wireguard-openbsd-3128e5d14c5dc17c51d9251d7d1a62cc3e091c70.zip |
- Fix thinko about struct usbd_xfer allocation.
- Use bus_dma_tag_t held in struct usbd_bus.
-rw-r--r-- | sys/dev/usb/dwc2/dwc2.c | 14 | ||||
-rw-r--r-- | sys/dev/usb/dwc2/dwc2var.h | 5 |
2 files changed, 9 insertions, 10 deletions
diff --git a/sys/dev/usb/dwc2/dwc2.c b/sys/dev/usb/dwc2/dwc2.c index d88287245eb..62aa1891a71 100644 --- a/sys/dev/usb/dwc2/dwc2.c +++ b/sys/dev/usb/dwc2/dwc2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dwc2.c,v 1.17 2015/02/11 06:25:20 uebayasi Exp $ */ +/* $OpenBSD: dwc2.c,v 1.18 2015/02/11 22:55:25 uebayasi Exp $ */ /* $NetBSD: dwc2.c,v 1.32 2014/09/02 23:26:20 macallan Exp $ */ /*- @@ -286,7 +286,7 @@ dwc2_allocx(struct usbd_bus *bus) DWC2_MAXISOCPACKETS, GFP_KERNEL); #ifdef DWC2_DEBUG - dxfer->xfer->busy_free = XFER_ONQU; + dxfer->xfer.busy_free = XFER_ONQU; #endif } return (struct usbd_xfer *)dxfer; @@ -363,8 +363,8 @@ dwc2_softintr(void *v) mtx_enter(&hsotg->lock); while ((dxfer = TAILQ_FIRST(&sc->sc_complete)) != NULL) { - KASSERTMSG(!timeout_pending(&dxfer->xfer->timeout_handle), - "xfer %p pipe %p\n", dxfer, dxfer->xfer->pipe); + KASSERTMSG(!timeout_pending(&dxfer->xfer.timeout_handle), + "xfer %p pipe %p\n", dxfer, dxfer->xfer.pipe); /* * dwc2_abort_xfer will remove this transfer from the @@ -379,7 +379,7 @@ dwc2_softintr(void *v) TAILQ_REMOVE(&sc->sc_complete, dxfer, xnext); mtx_leave(&hsotg->lock); - usb_transfer_complete(dxfer->xfer); + usb_transfer_complete(&dxfer->xfer); mtx_enter(&hsotg->lock); } mtx_leave(&hsotg->lock); @@ -431,7 +431,7 @@ dwc2_timeout(void *addr) if (sc->sc_dying) { mtx_enter(&sc->sc_lock); - dwc2_abort_xfer(dxfer->xfer, USBD_TIMEOUT); + dwc2_abort_xfer(&dxfer->xfer, USBD_TIMEOUT); mtx_leave(&sc->sc_lock); return; } @@ -439,7 +439,7 @@ dwc2_timeout(void *addr) /* Execute the abort in a process context. */ usb_init_task(&dxfer->abort_task, dwc2_timeout_task, addr, USB_TASK_TYPE_GENERIC); - usb_add_task(dxfer->xfer->pipe->device, &dxfer->abort_task); + usb_add_task(dxfer->xfer.pipe->device, &dxfer->abort_task); } static void diff --git a/sys/dev/usb/dwc2/dwc2var.h b/sys/dev/usb/dwc2/dwc2var.h index 7c196a632a9..08f1b9d5796 100644 --- a/sys/dev/usb/dwc2/dwc2var.h +++ b/sys/dev/usb/dwc2/dwc2var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dwc2var.h,v 1.10 2015/02/11 06:25:20 uebayasi Exp $ */ +/* $OpenBSD: dwc2var.h,v 1.11 2015/02/11 22:55:25 uebayasi Exp $ */ /* $NetBSD: dwc2var.h,v 1.3 2013/10/22 12:57:40 skrll Exp $ */ /*- @@ -42,7 +42,7 @@ struct dwc2_hsotg; struct dwc2_qtd; struct dwc2_xfer { - struct usbd_xfer *xfer; /* Needs to be first */ + struct usbd_xfer xfer; /* Needs to be first */ struct usb_task abort_task; struct dwc2_hcd_urb *urb; @@ -82,7 +82,6 @@ typedef struct dwc2_softc { bus_space_tag_t sc_iot; bus_space_handle_t sc_ioh; - bus_dma_tag_t sc_dmat; struct dwc2_core_params *sc_params; /* |