libATA Developer's Guide

Jeff Garzik

The contents of this file are subject to the Open Software License version 1.1 that can be found at http://www.opensource.org/licenses/osl-1.1.txt and is included herein by reference.

Alternatively, the contents of this file may be used under the terms of the GNU General Public License version 2 (the "GPL") as distributed in the kernel source COPYING file, in which case the provisions of the GPL are applicable instead of the above. If you wish to allow the use of your version of this file only under the terms of the GPL and not to allow others to use your version of this file under the OSL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the GPL. If you do not delete the provisions above, a recipient may use your version of this file under either the OSL or the GPL.


Table of Contents

1. Introduction
2. libata Driver API
struct ata_port_operations
Disable ATA port
Post-IDENTIFY device configuration
Set PIO/DMA mode
Taskfile read/write
PIO data read/write
ATA command execute
Per-cmd ATAPI DMA capabilities filter
Read specific ATA shadow registers
Select ATA device on bus
Private tuning method
Control PCI IDE BMDMA engine
High-level taskfile hooks
Exception and probe handling (EH)
Hardware interrupt handling
SATA phy read/write
Init and shutdown
3. Error handling
Origins of commands
How commands are issued
How commands are processed
How commands are completed
ata_scsi_error()
Problems with the current EH
4. libata Library
5. libata Core Internals
6. libata SCSI translation/emulation
7. ATA errors and exceptions
Exception categories
HSM violation
ATA/ATAPI device error (non-NCQ / non-CHECK CONDITION)
ATAPI device CHECK CONDITION
ATA device error (NCQ)
ATA bus error
PCI bus error
Late completion
Unknown error (timeout)
Hotplug and power management exceptions
EH recovery actions
Clearing error condition
Reset
Reconfigure transport
8. ata_piix Internals
9. sata_sil Internals
10. Thanks