Subject: Re: kern/15841: WDC/ATA PCMCIA and CardBus flash disk unhandled interrupt locks kernel
To: David Laight <david@l8s.co.uk>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: netbsd-bugs
Date: 03/12/2002 22:26:36
On Tue, Mar 12, 2002 at 08:58:34AM +0100, Manuel Bouyer wrote:
> On Mon, Mar 11, 2002 at 10:49:02PM +0000, David Laight wrote:
> > What is wrong with the 'alternate' status register?
> > (returns the same as the status register but without
> > clearing the IRQ).
> 
> Not all controllers provide it :(

Oh, and after more though (which I probably discovered while writing the
code): there is still a race condition with the alternate status register,
which is that when you find the device not busy, you can't say if it's because
the command completed or if it's because it has not yet been started.
The only way to clear the race would be to wait a bit (the exact delay is
specified in the ATA specs) but it's not a solution for an interrupt routine.

The only way to properly share interrupt is to have a bit saying "yes,
interrupt occured" for each device.

--
Manuel Bouyer, LIP6, Universite Paris VI.           Manuel.Bouyer@lip6.fr
--