if i drive is responding):
-if the reset succeeds, check some registers to make sure there is really
a drive (and not a chipset which echoes back the last written value)
-explicitely select the master before trying to read the master's status
and see if anything responds. if nothing (that's attributable to the
PCI IDE controller) responds, then that channel either has no devices on
it or has been disabled (via a non-standard mechanism) by the BIOS. If nothing
responds, don't map the compat.-mode interrupt or attach the wdc to that
channel, because the BIOS is likely to assign that IRQ to a different PCI
device. If that happens, the kernel will panic because that device will
try to map the IRQ level-triggered, but the compat interrupt will have been
mapped edge-triggered. (One possible way around this is to map the compat
interrupt edge-triggered, but it's not clear reading the spec that this
is correct or desirable.)
insert a check to see whether a channel appears to be enabled. Shouldn't
be necessary, according to the spec, but some PC chipsets allow individual
compatibility channels to be disabled. "I hate PCs."