Remove unused fields from the pipes.
authormpi <mpi@openbsd.org>
Fri, 30 May 2014 13:24:59 +0000 (13:24 +0000)
committermpi <mpi@openbsd.org>
Fri, 30 May 2014 13:24:59 +0000 (13:24 +0000)
sys/dev/usb/ehci.c
sys/dev/usb/ohci.c
sys/dev/usb/uhci.c

index a948869..d4b063c 100644 (file)
@@ -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 $        */
 
 /*
@@ -84,25 +84,11 @@ struct ehci_pipe {
        struct usbd_pipe 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);
index 0a9b0d3..df9d213 100644 (file)
@@ -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) |
index afb3037..0084194 100644 (file)
@@ -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 */