Re: [rfc/patch] libata -- port configurable delays

Jeff Garzik
2005-05-13T23:22:20Z

Alan Cox wrote:
> On Gwe, 2005-05-13 at 19:58, Benjamin LaHaise wrote:
>
>>is available at http://www.kvack.org/~bcrl/simple-aio-min_nr.c).
>>Before this patch __delay() is the number one entry in oprofile
>>results for this workload. Does this look like a reasonable approach
>>for chipsets that aren't completely braindead? Cheers,
>
>
> If your chipset implements the 400nS lockout in hardware it certainly
> seems to make sense. Nice to know someone has put it in hardware

No, it's just mostly irrelevant under SATA.

Under SATA you are -not- talking to a device when you touch
Status/AltStatus, you are talking to the host controller. Specifically,
you're talking to a controller buffer that stores a copy of the ATA
shadow registers.

The ATA registers are transmitted to the device in a single packet,
called a FIS, when the Command or Device Control register is written.

When the device updates its status, or completes a command, it sends a
FIS from device to controller, instructing the controller to update its
cached copy of the Status register.

You're bitbanging a buffer, in SATA.

Jeff