Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ata FLUSH CACHE EXT is a 48-bit command, issue as su...
details: https://anonhg.NetBSD.org/src/rev/60ec5fe11518
branches: trunk
changeset: 780406:60ec5fe11518
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Sun Jul 22 18:42:11 2012 +0000
description:
FLUSH CACHE EXT is a 48-bit command, issue as such. Both FLUSH CACHE commands
will return the LBA of first failure in the return task file, specifiy that we
want it read, even if we don't look at the value.
diffstat:
sys/dev/ata/wd.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diffs (36 lines):
diff -r fbab6b79be5c -r 60ec5fe11518 sys/dev/ata/wd.c
--- a/sys/dev/ata/wd.c Sun Jul 22 18:37:31 2012 +0000
+++ b/sys/dev/ata/wd.c Sun Jul 22 18:42:11 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wd.c,v 1.396 2012/07/22 18:37:31 jakllsch Exp $ */
+/* $NetBSD: wd.c,v 1.397 2012/07/22 18:42:11 jakllsch Exp $ */
/*
* Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved.
@@ -54,7 +54,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.396 2012/07/22 18:37:31 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.397 2012/07/22 18:42:11 jakllsch Exp $");
#include "opt_ata.h"
@@ -1906,13 +1906,14 @@
return ENODEV;
memset(&ata_c, 0, sizeof(struct ata_command));
if ((wd->sc_params.atap_cmd2_en & ATA_CMD2_LBA48) != 0 &&
- (wd->sc_params.atap_cmd2_en & ATA_CMD2_FCE) != 0)
+ (wd->sc_params.atap_cmd2_en & ATA_CMD2_FCE) != 0) {
ata_c.r_command = WDCC_FLUSHCACHE_EXT;
- else
+ flags |= AT_LBA48;
+ } else
ata_c.r_command = WDCC_FLUSHCACHE;
ata_c.r_st_bmask = WDCS_DRDY;
ata_c.r_st_pmask = WDCS_DRDY;
- ata_c.flags = flags;
+ ata_c.flags = flags | AT_READREG;
ata_c.timeout = 300000; /* 5m timeout */
if (wd->atabus->ata_exec_command(wd->drvp, &ata_c) != ATACMD_COMPLETE) {
aprint_error_dev(wd->sc_dev,
Home |
Main Index |
Thread Index |
Old Index