Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb - need opt_usb.h if depending on USB_DEBUG



details:   https://anonhg.NetBSD.org/src/rev/13b93c6a553a
branches:  trunk
changeset: 783702:13b93c6a553a
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Jan 05 01:30:15 2013 +0000

description:
- need opt_usb.h if depending on USB_DEBUG
- remove trailing whitespace
- add missing KERNEL_RCSID

diffstat:

 sys/dev/usb/ehci.c         |   26 +++++----
 sys/dev/usb/ezload.c       |    8 ++-
 sys/dev/usb/if_atu.c       |    7 ++-
 sys/dev/usb/if_aue.c       |   14 +++--
 sys/dev/usb/if_axe.c       |   10 ++--
 sys/dev/usb/if_cdce.c      |    6 +-
 sys/dev/usb/if_cue.c       |    6 +-
 sys/dev/usb/if_kue.c       |    6 +-
 sys/dev/usb/if_rum.c       |    7 ++-
 sys/dev/usb/if_run.c       |    8 ++-
 sys/dev/usb/if_udav.c      |   12 ++--
 sys/dev/usb/if_upl.c       |   12 ++--
 sys/dev/usb/if_ural.c      |   15 +++--
 sys/dev/usb/if_url.c       |   13 ++--
 sys/dev/usb/if_urtw.c      |    8 ++-
 sys/dev/usb/if_urtwn.c     |    8 +-
 sys/dev/usb/ohci.c         |    8 ++-
 sys/dev/usb/uatp.c         |   14 ++---
 sys/dev/usb/ugen.c         |   22 ++++----
 sys/dev/usb/uhci.c         |   16 +++--
 sys/dev/usb/uhid.c         |    6 +-
 sys/dev/usb/uhso.c         |   10 ++-
 sys/dev/usb/uhub.c         |    6 +-
 sys/dev/usb/ukbd.c         |   20 ++++----
 sys/dev/usb/umass_scsipi.c |    5 +-
 sys/dev/usb/ums.c          |   34 +++++++------
 sys/dev/usb/usb.c          |   12 ++--
 sys/dev/usb/usb_quirks.c   |   11 ++-
 sys/dev/usb/usb_subr.c     |    6 +-
 sys/dev/usb/usbdi.c        |    6 +-
 sys/dev/usb/usbdi_util.c   |    8 ++-
 sys/dev/usb/uthum.c        |   19 +++++--
 sys/dev/usb/uts.c          |    8 ++-
 sys/dev/usb/uvideo.c       |  110 ++++++++++++++++++++++----------------------
 sys/dev/usb/uyurex.c       |   13 ++++-
 35 files changed, 292 insertions(+), 208 deletions(-)

diffs (truncated from 1757 to 300 lines):

diff -r 11214d934d09 -r 13b93c6a553a sys/dev/usb/ehci.c
--- a/sys/dev/usb/ehci.c        Fri Jan 04 22:23:06 2013 +0000
+++ b/sys/dev/usb/ehci.c        Sat Jan 05 01:30:15 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ehci.c,v 1.194 2013/01/02 09:49:14 skrll Exp $ */
+/*     $NetBSD: ehci.c,v 1.195 2013/01/05 01:30:15 christos Exp $ */
 
 /*
  * Copyright (c) 2004-2012 The NetBSD Foundation, Inc.
@@ -53,11 +53,13 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.194 2013/01/02 09:49:14 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.195 2013/01/05 01:30:15 christos Exp $");
 
 #include "ohci.h"
 #include "uhci.h"
+#ifdef _KERNEL_OPT
 #include "opt_usb.h"
+#endif
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1493,12 +1495,12 @@
        for (i = 0; sqtd && i < 20 && !stop; sqtd = sqtd->nextqtd, i++) {
                ehci_dump_sqtd(sqtd);
                usb_syncmem(&sqtd->dma,
-                   sqtd->offs + offsetof(ehci_qtd_t, qtd_next), 
+                   sqtd->offs + offsetof(ehci_qtd_t, qtd_next),
                    sizeof(sqtd->qtd),
                    BUS_DMASYNC_POSTWRITE | BUS_DMASYNC_POSTREAD);
                stop = sqtd->qtd.qtd_next & htole32(EHCI_LINK_TERMINATE);
                usb_syncmem(&sqtd->dma,
-                   sqtd->offs + offsetof(ehci_qtd_t, qtd_next), 
+                   sqtd->offs + offsetof(ehci_qtd_t, qtd_next),
                    sizeof(sqtd->qtd), BUS_DMASYNC_PREREAD);
        }
        if (sqtd)
@@ -1508,11 +1510,11 @@
 Static void
 ehci_dump_sqtd(ehci_soft_qtd_t *sqtd)
 {
-       usb_syncmem(&sqtd->dma, sqtd->offs, 
+       usb_syncmem(&sqtd->dma, sqtd->offs,
            sizeof(sqtd->qtd), BUS_DMASYNC_POSTWRITE | BUS_DMASYNC_POSTREAD);
        printf("QTD(%p) at 0x%08x:\n", sqtd, sqtd->physaddr);
        ehci_dump_qtd(&sqtd->qtd);
-       usb_syncmem(&sqtd->dma, sqtd->offs, 
+       usb_syncmem(&sqtd->dma, sqtd->offs,
            sizeof(sqtd->qtd), BUS_DMASYNC_PREREAD);
 }
 
@@ -1544,7 +1546,7 @@
        ehci_qh_t *qh = &sqh->qh;
        u_int32_t endp, endphub;
 
-       usb_syncmem(&sqh->dma, sqh->offs, 
+       usb_syncmem(&sqh->dma, sqh->offs,
            sizeof(sqh->qh), BUS_DMASYNC_POSTWRITE | BUS_DMASYNC_POSTREAD);
        printf("QH(%p) at 0x%08x:\n", sqh, sqh->physaddr);
        printf("  link="); ehci_dump_link(qh->qh_link, 1); printf("\n");
@@ -1566,7 +1568,7 @@
        printf("  curqtd="); ehci_dump_link(qh->qh_curqtd, 0); printf("\n");
        printf("Overlay qTD:\n");
        ehci_dump_qtd(&qh->qh_qtd);
-       usb_syncmem(&sqh->dma, sqh->offs, 
+       usb_syncmem(&sqh->dma, sqh->offs,
            sizeof(sqh->qh), BUS_DMASYNC_PREREAD);
 }
 
@@ -2368,7 +2370,7 @@
                         * If we are doing embedded transaction translation,
                         * then directly attached LS/FS devices are reset by
                         * the EHCI controller itself.  PSPD is encoded
-                        * the same way as in USBSTATUS. 
+                        * the same way as in USBSTATUS.
                         */
                        i = __SHIFTOUT(v, EHCI_PS_PSPD) * UPS_LOW_SPEED;
                }
@@ -4059,7 +4061,7 @@
                         */
 
                        itd->itd.itd_ctl[j] = htole32 ( EHCI_ITD_ACTIVE |
-                           EHCI_ITD_SET_LEN(xfer->frlengths[trans_count]) | 
+                           EHCI_ITD_SET_LEN(xfer->frlengths[trans_count]) |
                            EHCI_ITD_SET_PG(addr) |
                            EHCI_ITD_SET_OFFS(EHCI_PAGE_OFFSET(DMAADDR(dma_buf,offs))));
 
@@ -4071,7 +4073,7 @@
                                itd->itd.itd_ctl[j] |= htole32(EHCI_ITD_IOC);
                                break;
                        }
-               }       
+               }
 
                /* Step 1.75, set buffer pointers. To simplify matters, all
                 * pointers are filled out for the next 7 hardware pages in
@@ -4111,7 +4113,7 @@
                    EHCI_ITD_SET_MAXPKT(UE_GET_SIZE(j)));
 
                /* FIXME: handle invalid trans */
-               itd->itd.itd_bufr[2] |= 
+               itd->itd.itd_bufr[2] |=
                    htole32(EHCI_ITD_SET_MULTI(UE_GET_TRANS(j)+1));
 
                usb_syncmem(&itd->dma,
diff -r 11214d934d09 -r 13b93c6a553a sys/dev/usb/ezload.c
--- a/sys/dev/usb/ezload.c      Fri Jan 04 22:23:06 2013 +0000
+++ b/sys/dev/usb/ezload.c      Sat Jan 05 01:30:15 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ezload.c,v 1.13 2012/03/11 01:06:06 mrg Exp $  */
+/*     $NetBSD: ezload.c,v 1.14 2013/01/05 01:30:15 christos Exp $     */
 
 /*
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,11 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ezload.c,v 1.13 2012/03/11 01:06:06 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ezload.c,v 1.14 2013/01/05 01:30:15 christos Exp $");
+
+#ifdef _KERNEL_OPT
+#include "opt_usb.h"
+#endif
 
 #include <sys/param.h>
 #include <sys/systm.h>
diff -r 11214d934d09 -r 13b93c6a553a sys/dev/usb/if_atu.c
--- a/sys/dev/usb/if_atu.c      Fri Jan 04 22:23:06 2013 +0000
+++ b/sys/dev/usb/if_atu.c      Sat Jan 05 01:30:15 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_atu.c,v 1.45 2012/12/27 16:42:32 skrll Exp $ */
+/*     $NetBSD: if_atu.c,v 1.46 2013/01/05 01:30:15 christos Exp $ */
 /*     $OpenBSD: if_atu.c,v 1.48 2004/12/30 01:53:21 dlg Exp $ */
 /*
  * Copyright (c) 2003, 2004
@@ -48,8 +48,11 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_atu.c,v 1.45 2012/12/27 16:42:32 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_atu.c,v 1.46 2013/01/05 01:30:15 christos Exp $");
 
+#ifdef _KERNEL_OPT
+#include "opt_usb.h"
+#endif
 
 #include <sys/param.h>
 #include <sys/sockio.h>
diff -r 11214d934d09 -r 13b93c6a553a sys/dev/usb/if_aue.c
--- a/sys/dev/usb/if_aue.c      Fri Jan 04 22:23:06 2013 +0000
+++ b/sys/dev/usb/if_aue.c      Sat Jan 05 01:30:15 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_aue.c,v 1.128 2012/12/27 16:42:32 skrll Exp $       */
+/*     $NetBSD: if_aue.c,v 1.129 2013/01/05 01:30:15 christos Exp $    */
 
 /*
  * Copyright (c) 1997, 1998, 1999, 2000
@@ -78,9 +78,11 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_aue.c,v 1.128 2012/12/27 16:42:32 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_aue.c,v 1.129 2013/01/05 01:30:15 christos Exp $");
 
+#ifdef _KERNEL_OPT
 #include "opt_inet.h"
+#endif
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -687,9 +689,9 @@
 {
        struct usb_attach_arg *uaa = aux;
 
-       /* 
+       /*
         * Some manufacturers use the same vendor and product id for
-        * different devices. We need to sanity check the DeviceClass 
+        * different devices. We need to sanity check the DeviceClass
         * in this case
         * Currently known guilty products:
         * 0x050d/0x0121 Belkin Bluetooth and USB2LAN
@@ -700,13 +702,13 @@
        if (uaa->vendor == USB_VENDOR_BELKIN &&
                uaa->product == USB_PRODUCT_BELKIN_USB2LAN) {
                usb_device_descriptor_t *dd;
-               
+
                dd = usbd_get_device_descriptor(uaa->device);
                if (dd != NULL &&
                        dd->bDeviceClass != UDCLASS_IN_INTERFACE)
                        return (UMATCH_NONE);
        }
-       
+
        return (aue_lookup(uaa->vendor, uaa->product) != NULL ?
                UMATCH_VENDOR_PRODUCT : UMATCH_NONE);
 }
diff -r 11214d934d09 -r 13b93c6a553a sys/dev/usb/if_axe.c
--- a/sys/dev/usb/if_axe.c      Fri Jan 04 22:23:06 2013 +0000
+++ b/sys/dev/usb/if_axe.c      Sat Jan 05 01:30:15 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_axe.c,v 1.61 2012/12/27 16:42:32 skrll Exp $        */
+/*     $NetBSD: if_axe.c,v 1.62 2013/01/05 01:30:15 christos Exp $     */
 /*     $OpenBSD: if_axe.c,v 1.96 2010/01/09 05:33:08 jsg Exp $ */
 
 /*
@@ -89,9 +89,9 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.61 2012/12/27 16:42:32 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.62 2013/01/05 01:30:15 christos Exp $");
 
-#if defined(_KERNEL_OPT)
+#ifdef _KERNEL_OPT
 #include "opt_inet.h"
 #endif
 
@@ -924,8 +924,8 @@
                        buf += sizeof(hdr);
 
                        if (((le16toh(hdr.len) & AXE_RH1M_RXLEN_MASK) ^
-                           (le16toh(hdr.ilen) & AXE_RH1M_RXLEN_MASK)) != 
-                           AXE_RH1M_RXLEN_MASK) {              
+                           (le16toh(hdr.ilen) & AXE_RH1M_RXLEN_MASK)) !=
+                           AXE_RH1M_RXLEN_MASK) {
                                ifp->if_ierrors++;
                                goto done;
                        }
diff -r 11214d934d09 -r 13b93c6a553a sys/dev/usb/if_cdce.c
--- a/sys/dev/usb/if_cdce.c     Fri Jan 04 22:23:06 2013 +0000
+++ b/sys/dev/usb/if_cdce.c     Sat Jan 05 01:30:15 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_cdce.c,v 1.37 2012/04/05 16:31:53 plunky Exp $ */
+/*     $NetBSD: if_cdce.c,v 1.38 2013/01/05 01:30:15 christos Exp $ */
 
 /*
  * Copyright (c) 1997, 1998, 1999, 2000-2003 Bill Paul <wpaul%windriver.com@localhost>
@@ -41,9 +41,9 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_cdce.c,v 1.37 2012/04/05 16:31:53 plunky Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_cdce.c,v 1.38 2013/01/05 01:30:15 christos Exp $");
 
-#if defined(_KERNEL_OPT)
+#ifdef _KERNEL_OPT
 #include "opt_inet.h"
 #endif
 
diff -r 11214d934d09 -r 13b93c6a553a sys/dev/usb/if_cue.c
--- a/sys/dev/usb/if_cue.c      Fri Jan 04 22:23:06 2013 +0000
+++ b/sys/dev/usb/if_cue.c      Sat Jan 05 01:30:15 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_cue.c,v 1.64 2012/12/27 16:42:32 skrll Exp $        */
+/*     $NetBSD: if_cue.c,v 1.65 2013/01/05 01:30:15 christos Exp $     */
 /*
  * Copyright (c) 1997, 1998, 1999, 2000
  *     Bill Paul <wpaul%ee.columbia.edu@localhost>.  All rights reserved.
@@ -56,9 +56,11 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_cue.c,v 1.64 2012/12/27 16:42:32 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_cue.c,v 1.65 2013/01/05 01:30:15 christos Exp $");
 
+#ifdef _KERNEL_OPT
 #include "opt_inet.h"
+#endif
 
 #include <sys/param.h>
 #include <sys/systm.h>
diff -r 11214d934d09 -r 13b93c6a553a sys/dev/usb/if_kue.c
--- a/sys/dev/usb/if_kue.c      Fri Jan 04 22:23:06 2013 +0000
+++ b/sys/dev/usb/if_kue.c      Sat Jan 05 01:30:15 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_kue.c,v 1.78 2012/12/27 16:42:32 skrll Exp $        */
+/*     $NetBSD: if_kue.c,v 1.79 2013/01/05 01:30:15 christos Exp $     */
 
 /*
  * Copyright (c) 1997, 1998, 1999, 2000
@@ -71,9 +71,11 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_kue.c,v 1.78 2012/12/27 16:42:32 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_kue.c,v 1.79 2013/01/05 01:30:15 christos Exp $");
 
+#ifdef _KERNEL_OPT
 #include "opt_inet.h"
+#endif
 
 #include <sys/param.h>
 #include <sys/systm.h>
diff -r 11214d934d09 -r 13b93c6a553a sys/dev/usb/if_rum.c
--- a/sys/dev/usb/if_rum.c      Fri Jan 04 22:23:06 2013 +0000



Home | Main Index | Thread Index | Old Index