summaryrefslogtreecommitdiff
path: root/sys/dev/ata/wd.c
diff options
context:
space:
mode:
authorConstantine Sapuntzakis <csapuntz@cvs.openbsd.org>2001-04-02 19:41:36 +0000
committerConstantine Sapuntzakis <csapuntz@cvs.openbsd.org>2001-04-02 19:41:36 +0000
commit92d3551f6f3379d9e9e7a6e3652ca50686373a1d (patch)
tree4b02ff73c1ca25ea28df4bc26ae868f042468efa /sys/dev/ata/wd.c
parentd3a937f6d7cfa52108570cfda1be5b625c023d21 (diff)
ATA_POLL should have been AT_POLL
Flushcache on shutdown used to pass both AT_POLL and AT_WAIT. The two flags do not make sense together. Should fix panic when shutting down from ddb
Diffstat (limited to 'sys/dev/ata/wd.c')
-rw-r--r--sys/dev/ata/wd.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/dev/ata/wd.c b/sys/dev/ata/wd.c
index 1a2a24f3b78..d5ac653ca53 100644
--- a/sys/dev/ata/wd.c
+++ b/sys/dev/ata/wd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wd.c,v 1.14 2001/01/25 03:50:50 todd Exp $ */
+/* $OpenBSD: wd.c,v 1.15 2001/04/02 19:41:35 csapuntz Exp $ */
/* $NetBSD: wd.c,v 1.193 1999/02/28 17:15:27 explorer Exp $ */
/*
@@ -1380,7 +1380,11 @@ wd_flushcache(wd, flags)
wdc_c.r_command = WDCC_FLUSHCACHE;
wdc_c.r_st_bmask = WDCS_DRDY;
wdc_c.r_st_pmask = WDCS_DRDY;
- wdc_c.flags = flags | AT_WAIT;
+ if (flags != 0) {
+ wdc_c.flags = AT_POLL;
+ } else {
+ wdc_c.flags = AT_WAIT;
+ }
wdc_c.timeout = 30000; /* 30s timeout */
if (wdc_exec_command(wd->drvp, &wdc_c) != WDC_COMPLETE) {
printf("%s: flush cache command didn't complete\n",
@@ -1406,7 +1410,7 @@ wd_shutdown(arg)
void *arg;
{
struct wd_softc *wd = arg;
- wd_flushcache(wd, ATA_POLL);
+ wd_flushcache(wd, AT_POLL);
}
/*