Subject: Re: ATA/ATAPI kernel redesign
To: None <>
From: Thor Lancelot Simon <>
List: tech-kern
Date: 02/28/2002 16:23:14
On Thu, Feb 28, 2002 at 09:55:56PM +0100, Manuel Bouyer wrote:
> > 
> > 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.

It is.  I had a long conversation with the guy who maintains SanDisk's
ATA-flash firmware on _exactly_ this subject.

One other thing he recommended (recall that ATA flash "disks" can also
act like PCMCIA wdc "controllers" -- they act like disks or controllers
depending on what kind of slot they're in) was that we use the ST506
Read/Write Multi commands when dealing with disks that can't do the modern 
multisector transfer modes.  He said that though this generally offers
little or no performance benefit with real disks, with ATA memory
devices it can be a very big win because it can let the firmware see
enough data at a time to read/write an entire flash block without
extensive shuffling, which can increase throughput by an order of
magnitude.  When you encounter an ATA flash device in "controller mode"
(that is, plugged into a PCMCIA slot instead of an IDE bus) this is
often the only way you can get decent performance, because their
"controller mode" firmware has enough to do already on its dumb little
CPU that it almost never implements any of the modern PIO-mode stuff.

Modern disk-mode firmware, at least the SanDisk stuff, often does UDMA
and other goodies.

 Thor Lancelot Simon	                            
   But as he knew no bad language, he had called him all the names of common
 objects that he could think of, and had screamed: "You lamp!  You towel!  You
 plate!" and so on.              --Sigmund Freud