Subject: Re: kern/22869: Slave IDE drive not detected
To: None <cube@cubidou.net>
From: Charles M. Hannum <abuse@spamalicious.com>
List: tech-kern
Date: 09/22/2003 14:35:05
> For each drive:
>   select drive
>   read wd_error, wd_cyl_{lo,hi}, wd_status
>   if !(wd_status & WDCS_BSY)
>     if wd_error == WDCE_AMNF
>       /* drive found, additional test of wd_cyl_{lo,hi} with

This algorithm is described, very sketchily, in a whitepaper by
Phoenix -- but what you pasted isn't quite right.  The ATA spec
indicates that both 01h and 81h can mean drive 0 is present and passed
diagnostics.

I'm a little concerned that I don't know whether this method works for
pre-ATA disks.