Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic Fixed AHC_DEBUG on 64 bit arches with a bit of ca...



details:   https://anonhg.NetBSD.org/src/rev/4ed7ffda7d32
branches:  trunk
changeset: 515304:4ed7ffda7d32
user:      elric <elric%NetBSD.org@localhost>
date:      Fri Sep 21 23:54:57 2001 +0000

description:
Fixed AHC_DEBUG on 64 bit arches with a bit of casting in a printf.
Added a message to help me debug a problem that I'm having.  The
printf is protected by AHC_DEBUG.

diffstat:

 sys/dev/ic/aic7xxx.c |  18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)

diffs (40 lines):

diff -r 5abd98999733 -r 4ed7ffda7d32 sys/dev/ic/aic7xxx.c
--- a/sys/dev/ic/aic7xxx.c      Fri Sep 21 23:53:52 2001 +0000
+++ b/sys/dev/ic/aic7xxx.c      Fri Sep 21 23:54:57 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: aic7xxx.c,v 1.80 2001/09/16 16:34:36 wiz Exp $ */
+/*     $NetBSD: aic7xxx.c,v 1.81 2001/09/21 23:54:57 elric Exp $       */
 
 /*
  * Generic driver for the aic7xxx based adaptec SCSI controllers
@@ -3546,12 +3546,12 @@
 
 #ifdef AHC_DEBUG
        if (ahc_debug & AHC_SHOWMISC) {
-               printf("%s: hardware scb %d bytes; kernel scb %d bytes; "
-                      "ahc_dma %d bytes\n",
+               printf("%s: hardware scb %lu bytes; kernel scb %lu bytes; "
+                      "ahc_dma %lu bytes\n",
                        ahc_name(ahc),
-                       sizeof(struct hardware_scb),
-                       sizeof(struct scb),
-                       sizeof(struct ahc_dma_seg));
+                       (unsigned long) sizeof(struct hardware_scb),
+                       (unsigned long) sizeof(struct scb),
+                       (unsigned long) sizeof(struct ahc_dma_seg));
        }
 #endif /* AHC_DEBUG */
 
@@ -4176,6 +4176,12 @@
                            ((xs->xs_control & XS_CTL_DATA_IN) ?
                             BUS_DMA_READ : BUS_DMA_WRITE));
                if (error) {
+#ifdef AHC_DEBUG
+                       printf("%s: in ahc_setup_data(): bus_dmamap_load() "
+                           "= %d\n",
+                           ahc_name(ahc),
+                           error);
+#endif
                        if (!ahc_istagged_device(ahc, xs, 0))
                                ahc_index_busy_tcl(ahc, hscb->tcl, TRUE);
                        xs->error = XS_RESOURCE_SHORTAGE;       /* XXX fvdl */



Home | Main Index | Thread Index | Old Index