Subject: Re: ATA/ATAPI kernel redesign
To: David Laight <>
From: Manuel Bouyer <>
List: tech-kern
Date: 02/28/2002 21:55:56
On Thu, Feb 28, 2002 at 04:02:10PM +0000, David Laight wrote:
> > > My intention is/was to not maintain the pre-ata support. Yeah, yeah. I know 
> > 
> > Well, so we strongly disagree on this. I think there are a number of NetBSD
> > systems running on old drives.
> Is it worth considering writing an 'ata' driver that doesn't support
> old devices, but leaving the existing 'wd' driver there for systems
> that need it?

As I already said: no, because pre-ATA drives uses the same PIO protocol as
ATA. The only difference is the missing IDENTIFY command (so the geometry
has to be fetched from MBR, which is necessary for ATA on i386 anyway).

> I presume the wd driver contains two sets of cludges, those for
> broken (or old) controllers and those for broken (or old) disks.

kludges for old controllers are in wdc.c, and for old disks in wd.c.
But this is only a few lines each time.

> Dunno how you sort out the kernel config though :-(
> Is there a driver for non-dma devices?  The code paths are much
> cleaner is you don't have to do DMA - especially for memory cards
> where there is little point doing reads asynchronously.

The DMA code could be #ifdef'd out easily, but this won't save much.
Even for memory cards I suspect DMA is faster than PIO.

Manuel Bouyer <>