AHCI Driver - add initial ATAPI support, suppy fake SENSE for DISK support.
commitb4189e5ea6046a55933abfaf0db2300403fe01f3
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 5 Jun 2009 05:37:24 +0000 (4 22:37 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 5 Jun 2009 05:37:24 +0000 (4 22:37 -0700)
tree65d0d874bea11f11826f8297ae22db1cd343b8d2
parent258223a30e6f99a6a4cdae5b969947ce79286b78
AHCI Driver - add initial ATAPI support, suppy fake SENSE for DISK support.

Implement basic ATAPI probe and SCSI pass-through.  ATAPI differs from DISK
in that all commands are packetized and follow the SCSI standard for the most
part.

ATAPI does not follow the SCSI standard precisely.  Many ATAPI implementations
just can't handle READ_6, WRITE_6, or modern INQUIRY commands.  To deal with
this the following conversions are done by the layer:

READ_6 -> READ_10

WRITE_6 -> WRITE_10

INQUIRY -> truncate length field to SHORT_INQUIRY_LENGTH and
   clear the SI_EVPD bit in the byte2 field if the
   page_code being requested is 0 (basic inquiry).

Continue to work on the DISK support.  If an error occurs fake AUTOSENSE
data is constructed (is there a way to obtain real sense data?).
sys/dev/disk/ahci/ahci_cam.c
sys/dev/disk/ahci/atascsi.h