Messages in this thread | | | From | Russell King <> | Subject | Re: IDE driver porting problems | Date | Mon, 24 Jul 2000 21:07:37 +0100 (BST) |
| |
Erik Mouw writes: > driver complains about not finding anything at all. If I use an IDE > device, the driver complains with: > > hda: probing with STATUS(0xa0) instead of ALTSTATUS(0x52) > hda: probing with STATUS(0xa1) instead of ALTSTATUS(0x51) > hda: no response (status = 0xa1), resetting drive > hda: probing with STATUS(0x08) instead of ALTSTATUS(0xd0) > hda: no response (status = 0xa1)
Looks like the chip selects or address lines are some how messed up (at a guess). On modern drives, STATUS should always be equal to ALTSTATUS at any given point in time. I'd recommend disconnecting the drive, and writing a small program that continuously reads the data register (as a start) and use a logic analyser to check the connectivity. Then move on to the register 1, 2, and 4, and each time re-check the address lines. Then, move on to writing (again, with the drive disconnected), and check that you get the write pulse.
> >From the ATA-3 specs I figured out that this basically means that there > are a lot of errors, sto the amount that I begin to suspect that there is > something wrong with the interface itself (which is just a CPLD and some > line drivers).
I hope that using these line drivers, a read of the STATUS register (or ALTSTATUS register) without a drive detected returns bit 7 = 0 (as required by the T13 specs) - they allow a 10K resistor connected between IDE data line 7 and ground to perform this function. (*Note: Conner CFS1080 drives _appear_ to have a pull up on this line!)
> My question is actually: what's the general idea behind the drive probes?
There is actually an assumption made by the kernel - that is that the drives are NOT busy before starting the probe. In other words, the drives have spun up completely, and have finished their diagnostics.
The kernel then writes to the drive/head selection register, reads it back and checks that its what it expects it to be. If its not, then it immediately assumes that there isn't a drive present.
It then tries to use the IDENTIFY_DEVICE command to read 512 bytes of identity information.
> PS: Is there some newer ATA documentation, preferably in pdf? I only found > a working draft of the ATA-3 specs in Word format (ouch!)
See www.t13.org
BTW, you may want to look in the EBSA285 BIOS (v1.08 or later) which has a working "wait for ide drive to power up" algorithm, but so far has been tested only on a Seagate ST36531A and a Conner CFS1080 drives. (it does not yet handle the case of only one drive connected as slave). _____ |_____| ------------------------------------------------- ---+---+- | | Russell King rmk@arm.linux.org.uk --- --- | | | | http://www.arm.linux.org.uk/~rmk/aboutme.html / / | | +-+-+ --- -+- / | THE developer of ARM Linux |+| /|\ / | | | --- | +-+-+ ------------------------------------------------- /\\\ |
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |