Subject: Re: New IDE system: first pass
To: None <current-users@NetBSD.ORG, port-i386@NetBSD.ORG>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: current-users
Date: 05/20/1998 18:49:46
On May 20, Manuel Bouyer wrote
> Hi,
> I've made a preliminary release of the new ide system I'm working on
> available. It's in ftp://ftp.netbsd.org:/pub/incoming/bouyer/newide.tar.gz
> This file has to be extracted in /usr/src/sys. It contains a buch of
> new files, and a patch file (apply with 'patch -p < ide.diff').
>
I forgot to mention an important change: I've done some work at the
probe/attach routines.
For direct-config busses (isapnp, pcmcia ...) the controller is
attached without further tests.
For isa, my guess is that there will nothing else at the controller's
adresses (0x1f0/0x3f0, or 0x170/0x370). At most we'll have different boards
at one controller adresses (are there other things than IDE which uses
2 adresses spaces separated by 0x200 ? ) As we can't wait for the reset
in the probe (a reset can take up to 31s, per ATA/ATAPI specs) we just check
that the status register has reasonable values (e.g not BSY and DRQ at the
same time) and that the device assert BSY after a reset (the control and
status register are in 2 different adress spaces). My guess here
is that if there are no drives, registers will have either 0x00 or 0xff.
I also added a for status == alternate_status, but some old hardware may
not have a working status register.
pciide use the same probe as ISA to check wether the PCI device is enabled,
and that there are no other IDE devices at the same address.
At attach time, we do a full reset, with some heuristic to find the
absent/present drives.
--
Manuel Bouyer, LIP6, Universite Paris VI. Manuel.Bouyer@lip6.fr
--