Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 06 May 2004 14:14:57 +0200
From:      =?UTF-8?B?U8O4cmVuIFNjaG1pZHQ=?= <sos@DeepCore.dk>
To:        Mark Santcroos <marks@ripe.net>
Cc:        current@FreeBSD.org
Subject:   Re: ATA_FLUSHCACHE failing
Message-ID:  <409A2C41.8000103@DeepCore.dk>
In-Reply-To: <20040506120541.GA1131@laptop.6bone.nl>
References:  <20040505195425.GA2559@laptop.6bone.nl> <409948A7.1040100@DeepCore.dk> <20040506212202.O19882@gamplex.bde.org> <20040506120541.GA1131@laptop.6bone.nl>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
Mark Santcroos wrote:
> On Thu, May 06, 2004 at 09:36:31PM +1000, Bruce Evans wrote:
> 
>>Panic dumps cannot use either device interrupts or timeouts, not to
>>mention normal locks, since panics may occur in almost any context;
>>in particular they may occur with all interrupts masked and important
>>locks in a bad state.  Immediate mode must be used, but it doesn't
>>seem to be, and a comment says that it is only used for other things:
> 
> 
> My eye felt on the same code and comments!
> 
> But if this is indeed the problem, why isn't everyone experiencing this
> issue?

Good question, maybe interrupts are not treated equally on all 
platforms, I just tested here on a couble and they work just fine hmm..

Anhow try this patch:


-- 
-Søren


[-- Attachment #2 --]
Index: ata-disk.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/ata/ata-disk.c,v
retrieving revision 1.172
diff -u -r1.172 ata-disk.c
--- ata-disk.c	13 Apr 2004 09:44:20 -0000	1.172
+++ ata-disk.c	6 May 2004 12:08:31 -0000
@@ -335,6 +335,7 @@
     if (!adp)
 	return ENXIO;
 
+    adp->device->channel->flags |= ATA_IMMEDIATE_MODE;
     bzero(&request, sizeof(struct ata_request));
     request.device = adp->device;
 
@@ -352,7 +353,7 @@
     }
     else {
 	request.u.ata.command = ATA_FLUSHCACHE;
-	request.flags = ATA_R_CONTROL;
+	request.flags = (ATA_R_CONTROL | ATA_R_IMMEDIATE);
     }
 
     if (request.device->channel->hw.transaction(&request) == ATA_OP_CONTINUES) {
help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?409A2C41.8000103>