Re: ATA driver races with interrupts

From: Søren Schmidt <sos_at_DeepCore.dk>
Date: Mon, 02 Aug 2004 22:50:52 +0200
Ville-Pertti Keinonen wrote:
> Søren Schmidt wrote:
> 
>> There is no good solution to this *unless* the HW has bits to 
>> determine which channel caused the interrupt. Now all decent 
>> controller has this, but I have no idea about the VIA since they are 
>> not one of those companies that hands out docs.
>>
>> The only way to safeguard is to "serialize" access to the channels as 
>> I've done on a few oh so broken chipsets...
> 
> 
> Ok, I see where it should be detected now - in ata_generic_intr, before 
> ata_generic_interrupt...
> 
> There is an actual test for the interrupt on the channel, so there 
> should be no race if the controller works correctly.  Apparently the VIA 
> doesn't...
> 
> The detection only applies to DMA - is PIO sensitive to unexpected 
> interrupts, even on working controllers?  If so, shouldn't there be some 
> protection against this?

If the controller doesn't have a bit saying if the interrupt is for us, 
then its impossible to close the race completely (without the above 
measures in place). However some devices use the DMA interrupt bits even 
in PIO mode (ie HPT does this) but I have no docs on the VIA's on that, 
but its worth a try at least...

-- 
-Søren
Received on Mon Aug 02 2004 - 18:50:59 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:04 UTC