Subject: Re: kern/15841: WDC/ATA PCMCIA and CardBus flash disk unhandled interrupt locks kernel
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
From: David Laight <david@l8s.co.uk>
List: netbsd-bugs
Date: 03/12/2002 23:41:00
On Tue, Mar 12, 2002 at 10:26:36PM +0100, Manuel Bouyer wrote:
> 
> 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.

I think it is possible to detect a value it the status register
that can only have happened if the command has completed.
(This may require sending an illegal commands to get an error
status set first).

I would have to read the ATA spec very closely....

Note that command that require a data transfer can be identified.

	David

-- 
David Laight: david@l8s.co.uk