Source-Changes-HG archive

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

[src/trunk]: src/sys/dev Comment out some debug settings.



details:   https://anonhg.NetBSD.org/src/rev/4e97ce858a49
branches:  trunk
changeset: 477202:4e97ce858a49
user:      augustss <augustss%NetBSD.org@localhost>
date:      Fri Oct 15 10:59:56 1999 +0000

description:
Comment out some debug settings.
Change attach printing so it looks more standard.

diffstat:

 sys/dev/cardbus/cardbus.c       |  16 +++++++++++++---
 sys/dev/cardbus/cardbus_map.c   |   4 ++--
 sys/dev/cardbus/if_ex_cardbus.c |  11 ++++++-----
 sys/dev/pci/pccbb.c             |  18 ++++++++----------
 4 files changed, 29 insertions(+), 20 deletions(-)

diffs (188 lines):

diff -r 8e91c9bd7c7c -r 4e97ce858a49 sys/dev/cardbus/cardbus.c
--- a/sys/dev/cardbus/cardbus.c Fri Oct 15 07:55:08 1999 +0000
+++ b/sys/dev/cardbus/cardbus.c Fri Oct 15 10:59:56 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cardbus.c,v 1.2 1999/10/15 06:41:27 haya Exp $ */
+/*     $NetBSD: cardbus.c,v 1.3 1999/10/15 10:59:56 augustss Exp $     */
 
 /*
  * Copyright (c) 1997 and 1998 HAYAKAWA Koichi.  All rights reserved.
@@ -149,8 +149,8 @@
   sc->sc_cacheline = cba->cba_cacheline;
   sc->sc_lattimer = cba->cba_lattimer;
 
-  printf(" bus %d device %d\n", sc->sc_bus, sc->sc_device);
-  printf("cacheline 0x%x, lattimer 0x%x", sc->sc_cacheline,sc->sc_lattimer);
+  printf(": bus %d device %d", sc->sc_bus, sc->sc_device);
+  printf(" cacheline 0x%x, lattimer 0x%x\n", sc->sc_cacheline,sc->sc_lattimer);
 
   sc->sc_iot = cba->cba_iot;   /* CardBus I/O space tag */
   sc->sc_memt = cba->cba_memt; /* CardBus MEM space tag */
@@ -516,7 +516,9 @@
  */
 
 static u_int8_t *decode_tuple __P((u_int8_t *));
+#ifdef CARDBUS_DEBUG
 static char *tuple_name __P((int));
+#endif
 
 static int
 decode_tuples(tuple, buflen)
@@ -546,16 +548,21 @@
 {
   u_int8_t type;
   u_int8_t len;
+#ifdef CARDBUS_DEBUG
   int i;
+#endif
 
   type = tuple[0];
   len = tuple[1] + 2;
 
+#ifdef CARDBUS_DEBUG
   printf("tuple: %s len %d\n", tuple_name(type), len);
+#endif
   if (CISTPL_END == type) {
     return NULL;
   }
 
+#ifdef CARDBUS_DEBUG
   for (i = 0; i < len; ++i) {
     if (i % 16 == 0) {
       printf("  0x%2x:", i);
@@ -568,11 +575,13 @@
   if (i % 16 != 0) {
     printf("\n");
   }
+#endif
 
   return tuple + len;
 }
 
 
+#ifdef CARDBUS_DEBUG
 static char *
 tuple_name(type)
      int type;
@@ -607,3 +616,4 @@
     return "Reserved";
   }
 }
+#endif
diff -r 8e91c9bd7c7c -r 4e97ce858a49 sys/dev/cardbus/cardbus_map.c
--- a/sys/dev/cardbus/cardbus_map.c     Fri Oct 15 07:55:08 1999 +0000
+++ b/sys/dev/cardbus/cardbus_map.c     Fri Oct 15 10:59:56 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cardbus_map.c,v 1.2 1999/10/15 06:42:21 haya Exp $     */
+/*     $NetBSD: cardbus_map.c,v 1.3 1999/10/15 10:59:57 augustss Exp $ */
 
 /*
  * Copyright (c) 1999
@@ -33,7 +33,7 @@
  */
 
 
-#define CARDBUS_MAP_DEBUG 1
+/* #define CARDBUS_MAP_DEBUG 1 */
 
 #include <sys/types.h>
 #include <sys/param.h>
diff -r 8e91c9bd7c7c -r 4e97ce858a49 sys/dev/cardbus/if_ex_cardbus.c
--- a/sys/dev/cardbus/if_ex_cardbus.c   Fri Oct 15 07:55:08 1999 +0000
+++ b/sys/dev/cardbus/if_ex_cardbus.c   Fri Oct 15 10:59:56 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ex_cardbus.c,v 1.2 1999/10/15 06:42:22 haya Exp $   */
+/*     $NetBSD: if_ex_cardbus.c,v 1.3 1999/10/15 10:59:57 augustss Exp $       */
 
 /*
  * CardBus specific routines for 3Com 3C575-family CardBus ethernet adapter
@@ -37,7 +37,7 @@
  */
 
 
-#define EX_DEBUG 4     /* define to report infomation for debugging */
+/* #define EX_DEBUG 4 */       /* define to report infomation for debugging */
 
 #define EX_POWER_STATIC                /* do not use enable/disable functions */
                                /* I'm waiting elinkxl.c uses
@@ -225,7 +225,7 @@
   case CARDBUS_PRODUCT_3COM_3C575TX:
     psc->sc_cardtype = EX_3C575;
     command |= (CARDBUS_COMMAND_IO_ENABLE | CARDBUS_COMMAND_MASTER_ENABLE);
-    printf("\n 3Com 3C575TX (boomerang)");
+    printf(": 3Com 3C575TX (boomerang)\n");
     break;
   case CARDBUS_PRODUCT_3COM_3C575BTX:
     psc->sc_cardtype = EX_3C575B;
@@ -249,7 +249,7 @@
     /* Setup interrupt acknowledge hook */
     sc->intr_ack = ex_cardbus_intr_ack;
     
-    printf("\n 3Com 3C575BTX (cyclone)");
+    printf(": 3Com 3C575BTX (cyclone)\n");
     break;
   }
 
@@ -261,7 +261,8 @@
   bhlc = cardbus_conf_read(cc, cf, ca->ca_tag, CARDBUS_BHLC_REG);
   if (CARDBUS_LATTIMER(bhlc) < 0x20) {
     /* at least the value of latency timer should 0x20. */
-    DPRINTF(("if_ex_cardbus: lattimer %x -> 0x20\n", CARDBUS_LATTIMER(bhlc)));
+    DPRINTF(("if_ex_cardbus: lattimer 0x%x -> 0x20\n",
+            CARDBUS_LATTIMER(bhlc)));
     bhlc &= ~(CARDBUS_LATTIMER_MASK << CARDBUS_LATTIMER_SHIFT);
     bhlc |= (0x20 << CARDBUS_LATTIMER_SHIFT);
     cardbus_conf_write(cc, cf, ca->ca_tag, CARDBUS_BHLC_REG, bhlc);
diff -r 8e91c9bd7c7c -r 4e97ce858a49 sys/dev/pci/pccbb.c
--- a/sys/dev/pci/pccbb.c       Fri Oct 15 07:55:08 1999 +0000
+++ b/sys/dev/pci/pccbb.c       Fri Oct 15 10:59:56 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pccbb.c,v 1.2 1999/10/15 06:42:39 haya Exp $   */
+/*     $NetBSD: pccbb.c,v 1.3 1999/10/15 10:59:58 augustss Exp $       */
 
 /*
  * Copyright (c) 1998 and 1999 HAYAKAWA Koichi.  All rights reserved.
@@ -29,7 +29,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-/* $Id: pccbb.c,v 1.2 1999/10/15 06:42:39 haya Exp $ */
+/* $Id: pccbb.c,v 1.3 1999/10/15 10:59:58 augustss Exp $ */
 
 /*
 #define CBB_DEBUG
@@ -684,9 +684,8 @@
       pci_lscp |= (0x20 << PCI_CB_LATENCY_SHIFT);
       pci_conf_write(pc, tag, PCI_CB_LSCP_REG, pci_lscp);
     }
-    DPRINTF(("CardBus latency time 0x%x\n", PCI_CB_LATENCY(pci_lscp)));
-    printf("CardBus latency timer 0x%x (%x)\n", PCI_CB_LATENCY(pci_lscp),
-          pci_conf_read(pc, tag, PCI_CB_LSCP_REG));
+    DPRINTF(("CardBus latency timer 0x%x (%x)\n", PCI_CB_LATENCY(pci_lscp),
+            pci_conf_read(pc, tag, PCI_CB_LSCP_REG)));
   }
 
   /*
@@ -699,9 +698,8 @@
       pci_bhlc |= (0x10 << PCI_LATTIMER_SHIFT);
       pci_conf_write(pc, tag, PCI_BHLC_REG, pci_bhlc);
     }
-    DPRINTF(("PCI latency time 0x%x\n", PCI_LATTIMER(pci_bhlc)));
-    printf("PCI latency timer 0x%x (%x)\n", PCI_LATTIMER(pci_bhlc),
-          pci_conf_read(pc, tag, PCI_BHLC_REG));
+    DPRINTF(("PCI latency timer 0x%x (%x)\n", PCI_LATTIMER(pci_bhlc),
+            pci_conf_read(pc, tag, PCI_BHLC_REG)));
   }
 
   /* disable Legacy IO */
@@ -2797,8 +2795,8 @@
   if (sc->sc_memt == bst) {
     top = &sc->sc_memwindow;
     align = 0x1000;
-    printf("using memory window, %x %x %x\n\n",
-          sc->sc_iot, sc->sc_memt, bst);
+    DPRINTF(("using memory window, %x %x %x\n\n",
+            sc->sc_iot, sc->sc_memt, bst));
   }
 
   if (pccbb_winlist_insert(top, addr, size, bsh, flags)) {



Home | Main Index | Thread Index | Old Index