]> bbs.cooldavid.org Git - net-next-2.6.git/commit
sata_promise: separate SATA and PATA ops
authorMikael Pettersson <mikpe@it.uu.se>
Sun, 11 Mar 2007 20:20:43 +0000 (21:20 +0100)
committerJeff Garzik <jeff@garzik.org>
Sat, 28 Apr 2007 18:15:59 +0000 (14:15 -0400)
commit724114a5738131997af9272f3c716dbe457c1690
tree047726b640734419bf0477ddb08ae2ada72abf74
parent799331fda03f969b781553b786f38b83ec3bb608
sata_promise: separate SATA and PATA ops

This patch changes sata_promise so that the PATA ports
on TX2plus chips are bound to the pdc_pata_ops structure.
This means that operations called from the SATA ops
structures don't need any SATA-vs-PATA tests any more.
Instead, operations that depend on a port being SATA or
PATA are separated into different procedures.

* pdc_cable_type() is split into a PATA version and a
  SATA version
* pdc_error_handler() is split into a PATA version and a
  SATA version, that both call a common version after
  setting up the `hardreset' function pointer
* pdc_old_check_atapi_dma() is now only used for SATAI
  ports, so is renamed to pdc_old_sata_check_atapi_dma()
  and simplified
* pdc_sata_scr_{read,write}() are now only used for SATA
  ports, so their is-not-SATA tests are removed
* pdc_port_start() is split into three procedures: a wrapper
  which performs the ->ops adjustment on TX2plus PATA ports,
  a procedure with the common code, and a procedure with
  the SATA-specific code (this bit might be cleaned up by
  Tejun's new init model)

Tested on 20619, 20575, and 20775 chips.

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