summaryrefslogtreecommitdiff
path: root/sys/dev/atapiscsi
diff options
context:
space:
mode:
authorConstantine Sapuntzakis <csapuntz@cvs.openbsd.org>2000-07-20 07:40:34 +0000
committerConstantine Sapuntzakis <csapuntz@cvs.openbsd.org>2000-07-20 07:40:34 +0000
commit4102e47a146ec457668af3567e31fc3831116054 (patch)
tree36497063240b5984571224da233896a1b54548a6 /sys/dev/atapiscsi
parent3dc6d2b7b2aa9826763759e522e39385dda07520 (diff)
Fix to ATA detect. Some devices seem to be comatose after reset
(return 0x00 status persistently). Send them identify to wake them up. Flag value 0x10000 will enable probe messages for a channel/controller. When UKC supports setting flags, this will be useful debugging failing IDE detects without kernel recompiles.
Diffstat (limited to 'sys/dev/atapiscsi')
-rw-r--r--sys/dev/atapiscsi/atapiscsi.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/sys/dev/atapiscsi/atapiscsi.c b/sys/dev/atapiscsi/atapiscsi.c
index 246a0ec2a43..62edec6abe1 100644
--- a/sys/dev/atapiscsi/atapiscsi.c
+++ b/sys/dev/atapiscsi/atapiscsi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: atapiscsi.c,v 1.27 2000/06/30 06:56:24 art Exp $ */
+/* $OpenBSD: atapiscsi.c,v 1.28 2000/07/20 07:40:33 csapuntz Exp $ */
/*
* This code is derived from code with the copyright below.
@@ -68,6 +68,8 @@
#include <dev/atapiscsi/atapiconf.h>
+#define WDCDEBUG
+
#define DEBUG_INTR 0x01
#define DEBUG_XFERS 0x02
#define DEBUG_STATUS 0x04
@@ -77,7 +79,7 @@
#define DEBUG_POLL 0x40
#define DEBUG_ERRORS 0x80 /* Debug error handling code */
-#ifdef WDCDEBUG
+#if defined(WDCDEBUG)
int wdcdebug_atapi_mask = 0;
#define WDCDEBUG_PRINT(args, level) \
if (wdcdebug_atapi_mask & (level)) \
@@ -224,6 +226,11 @@ atapiscsi_attach(parent, self, aux)
printf("\n");
+#ifdef WDCDEBUG
+ if (chp->wdc->sc_dev.dv_cfdata->cf_flags & WDC_OPTION_PROBE_VERBOSE)
+ wdcdebug_atapi_mask |= DEBUG_PROBE;
+#endif
+
as->chp = chp;
as->sc_adapterlink.adapter_softc = as;
as->sc_adapterlink.adapter_target = 7;
@@ -295,6 +302,11 @@ atapiscsi_attach(parent, self, aux)
wdc_print_caps(drvp);
}
}
+
+#ifdef WDCDEBUG
+ if (chp->wdc->sc_dev.dv_cfdata->cf_flags & WDC_OPTION_PROBE_VERBOSE)
+ wdcdebug_atapi_mask &= ~DEBUG_PROBE;
+#endif
}
void