ATA_FLUSHCACHE failing

Søren Schmidt sos at DeepCore.dk
Thu May 6 05:15:06 PDT 2004


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

-------------- next part --------------
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) {


More information about the freebsd-current mailing list