Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/dev/ic



On Monday 06 October 2003 09:51 pm, Manuel Bouyer wrote:
> Module Name:  src
> Committed By: bouyer
> Date:         Mon Oct  6 21:51:31 UTC 2003
>
> Modified Files:
>       src/sys/dev/ic: wdc.c
>
> Log Message:
> Revert to polling for ata_get_params() in wdc_channel_attach().
> When probing a nonexistent slave, we may timeout waiting for an interrupt.
> In __wdccommand_start(), for polled data in commands, abort quickly if
> status still read 0 after 400ns (for a nonexistant slave, the
> command will either be aborted, or the status register will report 0; for
> a real device we should have BSY, DRQ or ERR).
> Thanks to Alexander Yurchenko for reporting the problem and testing the
> fix.

It's really NOT acceptable to poll here -- this creates conditions where the 
system can wedge for a long period (e.g. inserting a CF card).  It is also 
not necessary in order to implement this algorithm.  You can poll the 
"alternate status" register without clearing the interrupt, and let the 
interrupt handle the completion later.  I implemented this a week or so ago 
but haven't had time to do testing with it.



Home | Main Index | Thread Index | Old Index