linux/drivers/scsi/libsas
Dan Williams b50102d3e9 [SCSI] isci: atapi support
Based on original implementation from Jiangbi Liu and Maciej Trela.

ATAPI transfers happen in two-to-three stages.  The two stage atapi
commands are those that include a dma data transfer.  The data transfer
portion of these operations is handled by the hardware packet-dma
acceleration.  The three-stage commands do not have a data transfer and
are handled without hardware assistance in raw frame mode.

stage1: transmit host-to-device fis to notify the device of an incoming
atapi cdb.  Upon reception of the pio-setup-fis repost the task_context
to perform the dma transfer of the cdb+data (go to stage3), or repost
the task_context to transmit the cdb as a raw frame (go to stage 2).

stage2: wait for hardware notification of the cdb transmission and then
go to stage 3.

stage3: wait for the arrival of the terminating device-to-host fis and
terminate the command.

To keep the implementation simple we only support ATAPI packet-dma
protocol (for commands with data) to avoid needing to handle the data
transfer manually (like we do for SATA-PIO).  This may affect
compatibility for a small number of devices (see
ATA_HORKAGE_ATAPI_MOD16_DMA).

If the data-transfer underruns, or encounters an error the
device-to-host fis is expected to arrive in the unsolicited frame queue
to pass to libata for disposition.  However, in the DONE_UNEXP_FIS (data
underrun) case it appears we need to craft a response.  In the
DONE_REG_ERR case we do receive the UF and propagate it to libsas.

Signed-off-by: Maciej Trela <maciej.trela@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-10-02 13:20:03 -05:00
..
Kconfig [SCSI] libsas: convert to standard kernel debugging 2011-01-24 12:05:38 -06:00
Makefile Merge branch 'trivial' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6 2011-03-20 18:14:55 -07:00
sas_ata.c [SCSI] libsas: Add option for SATA soft reset 2011-05-26 22:49:33 -05:00
sas_discover.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
sas_dump.c [SCSI] libsas: convert to standard kernel debugging 2011-01-24 12:05:38 -06:00
sas_dump.h [SCSI] libsas: convert to standard kernel debugging 2011-01-24 12:05:38 -06:00
sas_event.c [SCSI] libsas: Add SAS_HA state flags to avoid queueing events while unloading 2007-01-13 16:21:53 -06:00
sas_expander.c [SCSI] libsas: set sas_address and device type of rphy 2011-10-02 12:51:06 -05:00
sas_host_smp.c [SCSI] libsas: sgpio write support 2011-09-22 14:59:09 +04:00
sas_init.c [SCSI] libsas: export sas_alloc_task() 2011-08-27 08:35:13 -06:00
sas_internal.h [SCSI] libsas: fix/amend device gone notification in sas_deform_port() 2011-05-26 22:49:32 -05:00
sas_phy.c [SCSI] libsas: fix/amend device gone notification in sas_deform_port() 2011-05-26 22:49:32 -05:00
sas_port.c [SCSI] libsas: fix/amend device gone notification in sas_deform_port() 2011-05-26 22:49:32 -05:00
sas_scsi_host.c [SCSI] isci: atapi support 2011-10-02 13:20:03 -05:00
sas_task.c [SCSI] Unify SAM_ and SAM_STAT_ macros 2010-07-28 09:07:49 -05:00