]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
sata_promise: ATAPI support
authorMikael Pettersson <mikpe@it.uu.se>
Tue, 9 Jan 2007 09:51:46 +0000 (10:51 +0100)
committerJeff Garzik <jeff@garzik.org>
Fri, 9 Feb 2007 22:39:29 +0000 (17:39 -0500)
commit95006188cb1399f1358330503906e5891c129a10
treeaf4547ba4e845207567584b55e8940269ada4972
parent870ae337d568e8633ec30ca6f6afb7b58a558ba3
sata_promise: ATAPI support

This patch adds ATAPI support to the sata_promise driver.
This has been tested on both first- and second-generation
chips (20378 and 20575), and with both SATAPI and PATAPI
devices. CD-writing works.

SATAPI DMA works on second-generation chips, but on
first-generation chips SATAPI is limited to PIO due
to what appears to be HW limitations.
PATAPI DMA works on both first- and second-generation
chips, but requires the separate PATA support patch
before it can be used on TX2plus chips.

The functional changes to the driver are:
- remove ATA_FLAG_NO_ATAPI from PDC_COMMON_FLAGS
- add ->check_atapi_dma() operation to enable DMA for bulk data
  transfers but force PIO for other ATAPI commands; this filter
  is from Promise's driver and largely matches pata_pdc207x.c
- use a more restrictive ->check_atapi_dma() on first-generation
  chips to force SATAPI to always use PIO
- add handling of ATAPI protocols to pdc_qc_prep(), pdc_host_intr(),
  and pdc_qc_issue_prot(): ATAPI_DMA is handled by the driver
  while non-DMA protocols are handed over to libata generic code
- add pdc_issue_atapi_pkt_cmd() to handle the initial steps in
  issuing ATAPI DMA commands before sending the actual CDB;
  this procedure was ported from Promise's driver

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/ata/sata_promise.c