summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/ata/wd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/ata/wd.c b/sys/dev/ata/wd.c
index 97c52e29b0f..840f088b165 100644
--- a/sys/dev/ata/wd.c
+++ b/sys/dev/ata/wd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wd.c,v 1.41 2004/07/06 00:38:38 aaron Exp $ */
+/* $OpenBSD: wd.c,v 1.42 2005/05/15 18:09:29 grange Exp $ */
/* $NetBSD: wd.c,v 1.193 1999/02/28 17:15:27 explorer Exp $ */
/*
@@ -1274,7 +1274,8 @@ wd_flushcache(struct wd_softc *wd, int flags)
if (wd->drvp->ata_vers < 4) /* WDCC_FLUSHCACHE is here since ATA-4 */
return;
bzero(&wdc_c, sizeof(struct wdc_command));
- wdc_c.r_command = WDCC_FLUSHCACHE;
+ wdc_c.r_command = (wd->sc_flags & WDF_LBA48 ? WDCC_FLUSHCACHE_EXT :
+ WDCC_FLUSHCACHE);
wdc_c.r_st_bmask = WDCS_DRDY;
wdc_c.r_st_pmask = WDCS_DRDY;
if (flags != 0) {