summaryrefslogtreecommitdiff
path: root/sys/dev/ic/wdcevent.h
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@cvs.openbsd.org>2008-06-30 00:13:31 +0000
committerFederico G. Schwindt <fgsch@cvs.openbsd.org>2008-06-30 00:13:31 +0000
commiteee943e084a74c16666a0f4f10e28b0b3289d6c3 (patch)
tree2402f9b0c1156529f1b4f3283389a1e0fe874b9c /sys/dev/ic/wdcevent.h
parenta96cfdb3fc8bf17e91f9e848d7bc8067bd5d4834 (diff)
wrap logging code around WDC_DEBUG. shrinks kernel by ~4k.
jsg@ krw@ miod@ ok.
Diffstat (limited to 'sys/dev/ic/wdcevent.h')
-rw-r--r--sys/dev/ic/wdcevent.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/sys/dev/ic/wdcevent.h b/sys/dev/ic/wdcevent.h
index 73edec34cb1..5988a8b0f18 100644
--- a/sys/dev/ic/wdcevent.h
+++ b/sys/dev/ic/wdcevent.h
@@ -1,5 +1,4 @@
-/* $OpenBSD: wdcevent.h,v 1.4 2003/09/28 21:01:43 grange Exp $ */
-
+/* $OpenBSD: wdcevent.h,v 1.5 2008/06/30 00:13:30 fgsch Exp $ */
/*
* Copyright (c) 2001 Constantine Sapuntzakis
*
@@ -44,6 +43,7 @@ enum wdcevent_type {
#ifdef _KERNEL
+#ifdef WDC_DEBUG
void wdc_log(struct channel_softc *chp, enum wdcevent_type type,
unsigned int size, char val[]);
@@ -117,6 +117,19 @@ static __inline void WDC_LOG_ATA_CMDEXT(struct channel_softc *chp,
wdc_log(chp, WDCEVENT_ATA_EXT, 9, record);
}
+#else
+#define WDC_LOG_STATUS(chp, status)
+#define WDC_LOG_ERROR(chp, error)
+#define WDC_LOG_ATAPI_CMD(chp, drive, flags, len, cmd)
+#define WDC_LOG_ATAPI_DONE(chp, drive, flags, error)
+#define WDC_LOG_ATA_CMDSHORT(chp, cmd)
+#define WDC_LOG_ATA_CMDLONG(chp, head, precomp, cylinhi, cylinlo, \
+ sector, count, command)
+#define WDC_LOG_SET_DRIVE(chp, drive)
+#define WDC_LOG_REG(chp, reg, val)
+#define WDC_LOG_ATA_CMDEXT(chp, lba_hi1, lba_hi2, lba_mi1, lba_mi2, \
+ lba_lo1, lba_lo2, count1, count2, command)
+#endif /* WDC_DEBUG */
#endif /* _KERNEL */