Re: ATA_FLUSHCACHE failing

From: Søren Schmidt <sos_at_DeepCore.dk>
Date: Thu, 06 May 2004 14:14:57 +0200
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


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
_at__at_ -335,6 +335,7 _at__at_
     if (!adp)
 	return ENXIO;
 
+    adp->device->channel->flags |= ATA_IMMEDIATE_MODE;
     bzero(&request, sizeof(struct ata_request));
     request.device = adp->device;
 
_at__at_ -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) {
Received on Thu May 06 2004 - 03:15:06 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:53 UTC