summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorkenh <kenh@NetBSD.org>1998-09-10 19:24:45 +0000
committerkenh <kenh@NetBSD.org>1998-09-10 19:24:45 +0000
commit9539399333c7244acab8b7570123c8a83cb6d5dc (patch)
tree473847334ac658160b3ccae14e1403fa044bf99d /sys/dev
parent9dba6f18e83dbd7c8175eb16594e89388d5f9fe7 (diff)
Add support for passing device quirks from the attachment routine,
and add support for a NO_EXTRA_RESETS quirk (required by the TEAC IDE Card/II, which the Vaio uses).
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/wdc.c8
-rw-r--r--sys/dev/ic/wdcvar.h6
2 files changed, 10 insertions, 4 deletions
diff --git a/sys/dev/ic/wdc.c b/sys/dev/ic/wdc.c
index caf95bec197..e8e4c9df247 100644
--- a/sys/dev/ic/wdc.c
+++ b/sys/dev/ic/wdc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: wdc.c,v 1.27 1998/08/15 10:10:50 mycroft Exp $ */
+/* $NetBSD: wdc.c,v 1.28 1998/09/10 19:24:45 kenh Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -350,7 +350,8 @@ wdcattach(wdc, adp)
* devices keep it in a mostly working, but strange state (with busy
* led on)
*/
- wdcreset(wdc, VERBOSE);
+ if (!(wdc->sc_adp->flags & WDC_NO_EXTRA_RESETS))
+ wdcreset(wdc, VERBOSE);
}
/*
@@ -1532,7 +1533,8 @@ wdc_atapi_get_params(ab_link, drive, id)
wdc->sc_flags |= WDCF_ACTIVE;
error = 1;
- (void)wdcreset(wdc, VERBOSE);
+ if (!(wdc->sc_adp->flags & WDC_NO_EXTRA_RESETS))
+ (void)wdcreset(wdc, VERBOSE);
if ((status = wdccommand(wdc, (struct wd_link*)(&(ab_link->scsipi_atapi)),
ATAPI_SOFT_RESET, drive, 0, 0, 0, 0)) != 0) {
#ifdef ATAPI_DEBUG
diff --git a/sys/dev/ic/wdcvar.h b/sys/dev/ic/wdcvar.h
index 41d1644e695..ac98fec0e59 100644
--- a/sys/dev/ic/wdcvar.h
+++ b/sys/dev/ic/wdcvar.h
@@ -1,4 +1,4 @@
-/* $NetBSD: wdcvar.h,v 1.3 1998/08/15 10:10:50 mycroft Exp $ */
+/* $NetBSD: wdcvar.h,v 1.4 1998/09/10 19:24:45 kenh Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -39,6 +39,7 @@
struct wdc_attachment_data {
/* manadatory fields */
int cap;
+ int flags;
bus_space_tag_t iot;
bus_space_handle_t ioh;
bus_space_tag_t auxiot;
@@ -67,6 +68,9 @@ struct wdc_attachment_data {
#define WDC_CAPABILITY_DMA 0x02 /* DMA */
#define WDC_CAPABILITY_HWLOCK 0x04 /* Needs to lock HW */
+/* Flags passed from the attach routine to the wdc driver */
+#define WDC_NO_EXTRA_RESETS 0x01 /* Only reset once at attach */
+
struct wdc_softc {
struct device sc_dev;
const struct wdc_attachment_data *sc_adp;