Subject: ATA/ATAPI kernel redesign
To: None <>
From: Lloyd Parkes <>
List: tech-kern
Date: 02/17/2002 13:04:48
I've been digging into ATA/ATAPI because I have been having problems
with several of my ATAPI devices under NetBSD. I have been able to write
some quite simple software that drives these devices under DOS, but I
have had no end of trouble getting the ATA/ATAPI code in NetBSD to drive

Why is this? Driving ATA/ATAPI devices isn't difficult, I certainly had
no trouble doing it outside NetBSD. It is my guess that this is caused
by the complexity of trying to support all the vagueries of legacy WDC
style ST506/412 devices as well as all the vagueries of ATA/ATAPI
devices. The obvious solution is to mothball support for WDC style
ST506/412 devices. I believe that we can do this without causing a fuss.

My proposal is as follows:

	1) The files dev/ic/wdc* are copied into dev/ata/ and renamed to
	   reflect a more ATA view of the world. Personally, I would do
	   this by copying the CVS files because I like keeping a full
	   history of changes.
	2) The GENERIC config files are changed to comment out wdc on
	   the ISA bus with appropriate comments explaining that this
	   driver and the ata driver are mutually exclusive.
	3) We clean up dev/ata/*, removing a lot of accumulated cruft.
	   I expect that we would have enough support in dev/ata for
	   early (dodgy) ATA devices that well behaved WDC style
	   ST506/412 devices will in fact work with it.

I would also like to point out that a modern NetBSD distribution won't
fit on most ST506/412 devices.

I'm about to start working on this in my own CVS tree because I really
would like to get my ATAPI devices working properly.