Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-2-0]: src/sys/dev/ata Pull up revision 1.275 (requested by bouyer...



details:   https://anonhg.NetBSD.org/src/rev/836735814b2b
branches:  netbsd-2-0
changeset: 560784:836735814b2b
user:      jdc <jdc%NetBSD.org@localhost>
date:      Sun May 09 08:19:18 2004 +0000

description:
Pull up revision 1.275 (requested by bouyer in ticket #262)

When using LBA48, use Flush cache extended command if supported.
>From Christos Zoulas in PR 25366, with minor adjustements from me.

diffstat:

 sys/dev/ata/wd.c |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (31 lines):

diff -r 8b038357d615 -r 836735814b2b sys/dev/ata/wd.c
--- a/sys/dev/ata/wd.c  Sun May 09 08:18:40 2004 +0000
+++ b/sys/dev/ata/wd.c  Sun May 09 08:19:18 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wd.c,v 1.274 2004/02/28 06:28:47 yamt Exp $ */
+/*     $NetBSD: wd.c,v 1.274.2.1 2004/05/09 08:19:18 jdc Exp $ */
 
 /*
  * Copyright (c) 1998, 2001 Manuel Bouyer.  All rights reserved.
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.274 2004/02/28 06:28:47 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.274.2.1 2004/05/09 08:19:18 jdc Exp $");
 
 #ifndef WDCDEBUG
 #define WDCDEBUG
@@ -1651,7 +1651,11 @@
        if (wd->drvp->ata_vers < 4) /* WDCC_FLUSHCACHE is here since ATA-4 */
                return;
        memset(&wdc_c, 0, sizeof(struct wdc_command));
-       wdc_c.r_command = WDCC_FLUSHCACHE;
+       if ((wd->sc_params.atap_cmd2_en & ATA_CMD2_LBA48) != 0 &&
+           (wd->sc_params.atap_cmd2_en & ATA_CMD2_FCE) != 0)
+               wdc_c.r_command = WDCC_FLUSHCACHE_EXT;
+       else
+               wdc_c.r_command = WDCC_FLUSHCACHE;
        wdc_c.r_st_bmask = WDCS_DRDY;
        wdc_c.r_st_pmask = WDCS_DRDY;
        wdc_c.flags = flags;



Home | Main Index | Thread Index | Old Index