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 Wrap/unwrap long lines



details:   https://anonhg.NetBSD.org/src/rev/fe2d619c06d2
branches:  nick-nhusb
changeset: 804405:fe2d619c06d2
user:      skrll <skrll%NetBSD.org@localhost>
date:      Fri Oct 09 09:16:43 2015 +0000

description:
Wrap/unwrap long lines

diffstat:

 sys/dev/usb/ehci.c |  60 ++++++++++++++++++++++++++++-------------------------
 1 files changed, 32 insertions(+), 28 deletions(-)

diffs (160 lines):

diff -r 01681f17a56b -r fe2d619c06d2 sys/dev/usb/ehci.c
--- a/sys/dev/usb/ehci.c        Thu Oct 08 07:39:43 2015 +0000
+++ b/sys/dev/usb/ehci.c        Fri Oct 09 09:16:43 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ehci.c,v 1.234.2.50 2015/09/22 12:06:01 skrll Exp $ */
+/*     $NetBSD: ehci.c,v 1.234.2.51 2015/10/09 09:16:43 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.50 2015/09/22 12:06:01 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.234.2.51 2015/10/09 09:16:43 skrll Exp $");
 
 #include "ohci.h"
 #include "uhci.h"
@@ -884,9 +884,11 @@
                USBHIST_LOGN(ehcidebug, 10, "ex=%p std=%p still active",
                    ex, ex->ex_sqtdstart, 0, 0);
 #ifdef EHCI_DEBUG
-               USBHIST_LOGN(ehcidebug, 5, "--- still active start ---", 0, 0, 0, 0);
+               USBHIST_LOGN(ehcidebug, 5, "--- still active start ---", 0, 0,
+                   0, 0);
                ehci_dump_sqtds(ex->ex_sqtdstart);
-               USBHIST_LOGN(ehcidebug, 5, "--- still active end ---", 0, 0, 0, 0);
+               USBHIST_LOGN(ehcidebug, 5, "--- still active end ---", 0, 0, 0,
+                   0);
 #endif
                return;
        }
@@ -1051,9 +1053,10 @@
                uframes = min(1 << (i - 1), USB_UFRAMES_PER_FRAME);
 
                for (itd = ex->ex_itdstart; itd != NULL; itd = itd->xfer_next) {
-                       usb_syncmem(&itd->dma,itd->offs + offsetof(ehci_itd_t,itd_ctl),
-                           sizeof(itd->itd.itd_ctl), BUS_DMASYNC_POSTWRITE |
-                           BUS_DMASYNC_POSTREAD);
+                       usb_syncmem(&itd->dma,
+                           itd->offs + offsetof(ehci_itd_t,itd_ctl),
+                           sizeof(itd->itd.itd_ctl),
+                           BUS_DMASYNC_POSTWRITE | BUS_DMASYNC_POSTREAD);
 
                        for (i = 0; i < EHCI_ITD_NUFRAMES; i += uframes) {
                                /*
@@ -1074,7 +1077,8 @@
                                xfer->ux_frlengths[nframes++] = len;
                                actlen += len;
                        }
-                       usb_syncmem(&itd->dma,itd->offs + offsetof(ehci_itd_t,itd_ctl),
+                       usb_syncmem(&itd->dma,
+                           itd->offs + offsetof(ehci_itd_t,itd_ctl),
                            sizeof(itd->itd.itd_ctl), BUS_DMASYNC_PREREAD);
 
                        if (nframes >= xfer->ux_nframes)
@@ -1094,10 +1098,12 @@
                nframes = 0;
                actlen = 0;
 
-               for (sitd = ex->ex_sitdstart; sitd != NULL; sitd = sitd->xfer_next) {
-                       usb_syncmem(&sitd->dma, sitd->offs + offsetof(ehci_sitd_t, sitd_trans),
-                           sizeof(sitd->sitd.sitd_trans), BUS_DMASYNC_POSTWRITE |
-                           BUS_DMASYNC_POSTREAD);
+               for (sitd = ex->ex_sitdstart; sitd != NULL;
+                    sitd = sitd->xfer_next) {
+                       usb_syncmem(&sitd->dma,
+                           sitd->offs + offsetof(ehci_sitd_t, sitd_trans),
+                           sizeof(sitd->sitd.sitd_trans),
+                           BUS_DMASYNC_POSTWRITE | BUS_DMASYNC_POSTREAD);
 
                        /*
                         * XXX - driver didn't fill in the frame full
@@ -1110,7 +1116,8 @@
                                break;
 
                        status = le32toh(sitd->sitd.sitd_trans);
-                       usb_syncmem(&sitd->dma, sitd->offs + offsetof(ehci_sitd_t, sitd_trans),
+                       usb_syncmem(&sitd->dma,
+                           sitd->offs + offsetof(ehci_sitd_t, sitd_trans),
                            sizeof(sitd->sitd.sitd_trans), BUS_DMASYNC_PREREAD);
 
                        len = EHCI_SITD_GET_LEN(status);
@@ -1163,7 +1170,6 @@
                        actlen += sqtd->len - EHCI_QTD_GET_BYTES(status);
        }
 
-
        /*
         * If there are left over TDs we need to update the toggle.
         * The default pipe doesn't need it since control transfers
@@ -2812,12 +2818,12 @@
 
                        /* the length must be a multiple of the max size */
                        curlen -= curlen % mps;
-                       USBHIST_LOG(ehcidebug, "multiple QTDs, "
-                                   "curlen=%d", curlen, 0, 0, 0);
+                       USBHIST_LOG(ehcidebug, "multiple QTDs, curlen=%d",
+                           curlen, 0, 0, 0);
                        KASSERT(curlen != 0);
                }
-               USBHIST_LOG(ehcidebug, "len=%d curlen=%d curoffs=%zu",
-                       len, curlen, curoffs, 0);
+               USBHIST_LOG(ehcidebug, "len=%d curlen=%d curoffs=%zu", len,
+                   curlen, curoffs, 0);
 
                /*
                 * Allocate another transfer if there's more data left,
@@ -2885,8 +2891,7 @@
        *ep = cur;
        epipe->nexttoggle = tog;
 
-       USBHIST_LOG(ehcidebug, "return sqtd=%p sqtdend=%p",
-           *sp, *ep, 0, 0);
+       USBHIST_LOG(ehcidebug, "return sqtd=%p sqtdend=%p", *sp, *ep, 0, 0);
 
        return USBD_NORMAL_COMPLETION;
 
@@ -2905,8 +2910,7 @@
 
        USBHIST_FUNC(); USBHIST_CALLED(ehcidebug);
 
-       USBHIST_LOG(ehcidebug, "sqtd=%p sqtdend=%p",
-           sqtd, sqtdend, 0, 0);
+       USBHIST_LOG(ehcidebug, "sqtd=%p sqtdend=%p", sqtd, sqtdend, 0, 0);
 
        for (i = 0; sqtd != sqtdend; sqtd = p, i++) {
                p = sqtd->nextqtd;
@@ -3022,8 +3026,8 @@
                                EHCI_PAGE_SIZE, &dma);
 
                if (err) {
-                       USBHIST_LOG(ehcidebug,
-                           "alloc returned %d", err, 0, 0, 0);
+                       USBHIST_LOG(ehcidebug, "alloc returned %d", err, 0, 0,
+                           0);
                        mutex_exit(&sc->sc_lock);
                        return NULL;
                }
@@ -4379,8 +4383,8 @@
                ehci_rem_free_sitd_chain(sc, exfer);
        }
 
-       usb_syncmem(&xfer->ux_dmabuf, 0, xfer->ux_length, BUS_DMASYNC_POSTWRITE |
-                   BUS_DMASYNC_POSTREAD);
+       usb_syncmem(&xfer->ux_dmabuf, 0, xfer->ux_length,
+           BUS_DMASYNC_POSTWRITE | BUS_DMASYNC_POSTREAD);
 }
 Static usbd_status
 ehci_device_isoc_transfer(struct usbd_xfer *xfer)
@@ -4707,7 +4711,7 @@
                ehci_rem_free_itd_chain(sc, exfer);
        }
 
-       usb_syncmem(&xfer->ux_dmabuf, 0, xfer->ux_length, BUS_DMASYNC_POSTWRITE |
-           BUS_DMASYNC_POSTREAD);
+       usb_syncmem(&xfer->ux_dmabuf, 0, xfer->ux_length,
+           BUS_DMASYNC_POSTWRITE | BUS_DMASYNC_POSTREAD);
 
 }



Home | Main Index | Thread Index | Old Index