diff options
author | Constantine Sapuntzakis <csapuntz@cvs.openbsd.org> | 2000-07-20 19:15:24 +0000 |
---|---|---|
committer | Constantine Sapuntzakis <csapuntz@cvs.openbsd.org> | 2000-07-20 19:15:24 +0000 |
commit | b4418bed77badfdb892e0982dabf2d40df3d6d73 (patch) | |
tree | 6069a881d36c15b5ca6f0ccdbafa4d07cca70c0f /sys/dev/ic | |
parent | 3119035ada5d482229e31efed27f732f469dcc7f (diff) |
chp->wdc can be NULL on probe.
Propagate verbose flag from cf_data to channel
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/wdc.c | 10 | ||||
-rw-r--r-- | sys/dev/ic/wdcvar.h | 3 |
2 files changed, 9 insertions, 4 deletions
diff --git a/sys/dev/ic/wdc.c b/sys/dev/ic/wdc.c index 0ba3621d019..8166ffa6fa8 100644 --- a/sys/dev/ic/wdc.c +++ b/sys/dev/ic/wdc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wdc.c,v 1.19 2000/07/20 07:40:32 csapuntz Exp $ */ +/* $OpenBSD: wdc.c,v 1.20 2000/07/20 19:15:23 csapuntz Exp $ */ /* $NetBSD: wdc.c,v 1.68 1999/06/23 19:00:17 bouyer Exp $ */ @@ -369,7 +369,9 @@ wdcprobe(chp) chp->_vtbl = &wdc_default_vtbl; #ifdef WDCDEBUG - if (chp->wdc->sc_dev.dv_cfdata->cf_flags & WDC_OPTION_PROBE_VERBOSE) + if ((chp->ch_flags & WDCF_VERBOSE_PROBE) || + (chp->wdc && + (chp->wdc->sc_dev.dv_cfdata->cf_flags & WDC_OPTION_PROBE_VERBOSE))) wdcdebug_mask |= DEBUG_PROBE; #endif /* @@ -454,7 +456,9 @@ wdcprobe(chp) } #ifdef WDCDEBUG - if (chp->wdc->sc_dev.dv_cfdata->cf_flags & WDC_OPTION_PROBE_VERBOSE) + if ((chp->ch_flags & WDCF_VERBOSE_PROBE) || + (chp->wdc && + (chp->wdc->sc_dev.dv_cfdata->cf_flags & WDC_OPTION_PROBE_VERBOSE))) wdcdebug_mask &= ~DEBUG_PROBE; #endif return (ret_value); diff --git a/sys/dev/ic/wdcvar.h b/sys/dev/ic/wdcvar.h index bcfb55a1a08..b325f0d35fd 100644 --- a/sys/dev/ic/wdcvar.h +++ b/sys/dev/ic/wdcvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: wdcvar.h,v 1.10 2000/07/20 07:40:32 csapuntz Exp $ */ +/* $OpenBSD: wdcvar.h,v 1.11 2000/07/20 19:15:23 csapuntz Exp $ */ /* $NetBSD: wdcvar.h,v 1.17 1999/04/11 20:50:29 bouyer Exp $ */ /*- @@ -71,6 +71,7 @@ struct channel_softc { /* Per channel data */ #define WDCF_ACTIVE 0x01 /* channel is active */ #define WDCF_IRQ_WAIT 0x10 /* controller is waiting for irq */ #define WDCF_ONESLAVE 0x20 /* slave-only channel */ +#define WDCF_VERBOSE_PROBE 0x40 /* verbose probe */ u_int8_t ch_status; /* copy of status register */ u_int8_t ch_error; /* copy of error register */ /* per-drive infos */ |