diff --git a/sys/dev/ic/wdc.c b/sys/dev/ic/wdc.c index caf95bec1976..e8e4c9df2479 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 41d1644e695d..ac98fec0e590 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;