summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2014-05-30 13:25:00 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2014-05-30 13:25:00 +0000
commitd365054a04668d618738f402bfb204f1829a1764 (patch)
tree777d38ab3e553063f96ac1c3cb4b237aeabf2eaf
parent4d51e43441a4ff2ae1e94a81eb4e68bf327dbeb0 (diff)
Remove unused fields from the pipes.
-rw-r--r--sys/dev/usb/ehci.c22
-rw-r--r--sys/dev/usb/ohci.c14
-rw-r--r--sys/dev/usb/uhci.c10
3 files changed, 3 insertions, 43 deletions
diff --git a/sys/dev/usb/ehci.c b/sys/dev/usb/ehci.c
index a9488695d1b..d4b063c126d 100644
--- a/sys/dev/usb/ehci.c
+++ b/sys/dev/usb/ehci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ehci.c,v 1.155 2014/05/16 19:00:18 mpi Exp $ */
+/* $OpenBSD: ehci.c,v 1.156 2014/05/30 13:24:59 mpi Exp $ */
/* $NetBSD: ehci.c,v 1.66 2004/06/30 03:11:56 mycroft Exp $ */
/*
@@ -85,24 +85,10 @@ struct ehci_pipe {
struct ehci_soft_qh *sqh;
union {
- struct ehci_soft_qtd *qtd;
- /* struct ehci_soft_itd *itd; */
- } tail;
- union {
/* Control pipe */
struct {
struct usb_dma reqdma;
- u_int length;
- /* struct ehci_soft_qtd *setup, *data, *stat; */
} ctl;
- /* Interrupt pipe */
- struct {
- u_int length;
- } intr;
- /* Bulk pipe */
- struct {
- u_int length;
- } bulk;
/* Iso pipe */
struct {
u_int next_frame;
@@ -3053,7 +3039,6 @@ ehci_device_request(struct usbd_xfer *xfer)
}
sqh = epipe->sqh;
- epipe->u.ctl.length = len;
/* Set up data transaction */
if (len != 0) {
@@ -3199,8 +3184,6 @@ ehci_device_bulk_start(struct usbd_xfer *xfer)
sqh = epipe->sqh;
- epipe->u.bulk.length = xfer->length;
-
err = ehci_alloc_sqtd_chain(sc, xfer->length, xfer, &data, &dataend);
if (err) {
DPRINTFN(-1,("ehci_device_bulk_start: no memory\n"));
@@ -3362,8 +3345,6 @@ ehci_device_intr_start(struct usbd_xfer *xfer)
sqh = epipe->sqh;
- epipe->u.intr.length = xfer->length;
-
err = ehci_alloc_sqtd_chain(sc, xfer->length, xfer, &data, &dataend);
if (err) {
DPRINTFN(-1, ("ehci_device_intr_start: no memory\n"));
@@ -3455,7 +3436,6 @@ ehci_device_intr_done(struct usbd_xfer *xfer)
if (xfer->pipe->repeat) {
ehci_free_sqtd_chain(sc, ex);
- xfer->length = epipe->u.intr.length;
usb_syncmem(&xfer->dmabuf, 0, xfer->length,
usbd_xfer_isread(xfer) ?
BUS_DMASYNC_POSTREAD : BUS_DMASYNC_POSTWRITE);
diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c
index 0a9b0d31437..df9d213e4c8 100644
--- a/sys/dev/usb/ohci.c
+++ b/sys/dev/usb/ohci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ohci.c,v 1.130 2014/05/16 18:17:03 mpi Exp $ */
+/* $OpenBSD: ohci.c,v 1.131 2014/05/30 13:24:59 mpi Exp $ */
/* $NetBSD: ohci.c,v 1.139 2003/02/22 05:24:16 tsutsui Exp $ */
/* $FreeBSD: src/sys/dev/usb/ohci.c,v 1.22 1999/11/17 22:33:40 n_hibma Exp $ */
@@ -212,24 +212,16 @@ struct ohci_pipe {
struct ohci_soft_td *td;
struct ohci_soft_itd *itd;
} tail;
- /* Info needed for different pipe kinds. */
union {
/* Control pipe */
struct {
struct usb_dma reqdma;
- u_int length;
- struct ohci_soft_td *setup, *data, *stat;
} ctl;
/* Interrupt pipe */
struct {
int nslots;
int pos;
} intr;
- /* Bulk pipe */
- struct {
- u_int length;
- int isread;
- } bulk;
/* Iso pipe */
struct iso {
int next, inuse;
@@ -1617,7 +1609,6 @@ ohci_device_request(struct usbd_xfer *xfer)
tail->xfer = NULL;
sed = opipe->sed;
- opipe->u.ctl.length = len;
next = stat;
@@ -2760,9 +2751,6 @@ ohci_device_bulk_start(struct usbd_xfer *xfer)
DPRINTFN(4,("ohci_device_bulk_start: xfer=%p len=%u "
"flags=%d endpt=%d\n", xfer, len, xfer->flags, endpt));
- opipe->u.bulk.isread = usbd_xfer_isread(xfer);
- opipe->u.bulk.length = len;
-
/* Update device address */
sed->ed.ed_flags = htole32(
(letoh32(sed->ed.ed_flags) & ~OHCI_ED_ADDRMASK) |
diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c
index afb3037174d..00841944642 100644
--- a/sys/dev/usb/uhci.c
+++ b/sys/dev/usb/uhci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhci.c,v 1.121 2014/05/25 09:59:12 mpi Exp $ */
+/* $OpenBSD: uhci.c,v 1.122 2014/05/30 13:24:59 mpi Exp $ */
/* $NetBSD: uhci.c,v 1.172 2003/02/23 04:19:26 simonb Exp $ */
/* $FreeBSD: src/sys/dev/usb/uhci.c,v 1.33 1999/11/17 22:33:41 n_hibma Exp $ */
@@ -77,10 +77,6 @@ struct uhci_pipe {
struct usbd_pipe pipe;
int nexttoggle;
- u_char aborting;
- struct usbd_xfer *abortstart, *abortend;
-
- /* Info needed for different pipe kinds. */
union {
/* Control pipe */
struct {
@@ -1685,9 +1681,6 @@ uhci_device_bulk_start(struct usbd_xfer *xfer)
endpt = xfer->pipe->endpoint->edesc->bEndpointAddress;
sqh = upipe->u.bulk.sqh;
- upipe->u.bulk.isread = usbd_xfer_isread(xfer);
- upipe->u.bulk.length = len;
-
err = uhci_alloc_std_chain(sc, len, xfer, &data, &dataend);
if (err)
return (err);
@@ -2697,7 +2690,6 @@ uhci_open(struct usbd_pipe *pipe)
DPRINTFN(1, ("uhci_open: pipe=%p, addr=%d, endpt=%d\n",
pipe, pipe->device->address, ed->bEndpointAddress));
- upipe->aborting = 0;
upipe->nexttoggle = pipe->endpoint->savedtoggle;
/* Root Hub */