remarkable-linux/drivers/ata
Mikael Pettersson b9ccd4a90b sata_promise: ASIC PRD table bug workaround, take 2
Second-generation Promise SATA controllers have an ASIC bug
which can trigger if the last PRD entry is larger than 164 bytes,
resulting in intermittent errors and possible data corruption.

Work around this by replacing calls to ata_qc_prep() with a
private version that fills the PRD, checks the size of the
last entry, and if necessary splits it to avoid the bug.
Also reduce sg_tablesize by 1 to accommodate the new entry.

Tested on the second-generation SATA300 TX4 and SATA300 TX2plus,
and the first-generation PDC20378.

Thanks to Alexander Sabourenkov for verifying the bug by
studying the vendor driver, and for writing the initial patch
upon which this one is based.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
--
Changes since previous version:
* use new PDC_MAX_PRD constant to initialise sg_tablesize

 drivers/ata/sata_promise.c |   87 ++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 83 insertions(+), 4 deletions(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-30 09:27:57 -04:00
..
ahci.c [libata] AHCI: add hw link power management support 2007-10-29 11:00:35 -04:00
ata_generic.c libata: Switch most of the remaining SFF drivers to ata_sff_port_start 2007-10-12 14:55:36 -04:00
ata_piix.c [libata] checkpatch-inspired cleanups 2007-10-23 20:59:42 -04:00
Kconfig Update libata driver for bf548 atapi controller against the 2.6.24 tree. 2007-10-17 20:49:02 -04:00
libata-acpi.c [libata] checkpatch-inspired cleanups 2007-10-23 20:59:42 -04:00
libata-core.c Merge branch 'alpm' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev 2007-10-29 12:12:34 -07:00
libata-eh.c [libata] Link power management infrastructure 2007-10-29 11:00:35 -04:00
libata-pmp.c libata: use ata_exec_internal() for PMP register access 2007-10-12 14:55:47 -04:00
libata-scsi.c [libata] Link power management infrastructure 2007-10-29 11:00:35 -04:00
libata-sff.c [libata] checkpatch-inspired cleanups 2007-10-23 20:59:42 -04:00
libata.h [libata] Link power management infrastructure 2007-10-29 11:00:35 -04:00
Makefile drivers/ata: add support to Freescale 3.0Gbps SATA Controller 2007-10-17 20:49:02 -04:00
pata_acpi.c [libata] fix 'if(' and similar areas that lack whitespace 2007-10-29 06:15:27 -04:00
pata_ali.c libata: Switch most of the remaining SFF drivers to ata_sff_port_start 2007-10-12 14:55:36 -04:00
pata_amd.c libata: Switch most of the remaining SFF drivers to ata_sff_port_start 2007-10-12 14:55:36 -04:00
pata_artop.c libata: Switch most of the remaining SFF drivers to ata_sff_port_start 2007-10-12 14:55:36 -04:00
pata_at32.c AVR32 PATA driver 2007-10-12 14:55:37 -04:00
pata_atiixp.c pata_atiixp: Audit notes on locking 2007-10-12 14:55:42 -04:00
pata_bf54x.c Update libata driver for bf548 atapi controller against the 2.6.24 tree. 2007-10-17 20:49:02 -04:00
pata_cmd64x.c pata_cmd64x.c typo fix 2007-10-20 01:02:48 +02:00
pata_cmd640.c libata: Switch most of the remaining SFF drivers to ata_sff_port_start 2007-10-12 14:55:36 -04:00
pata_cs5520.c [libata] struct pci_dev related cleanups 2007-10-12 14:55:47 -04:00
pata_cs5530.c Fix misspellings of "system", "controller", "interrupt" and "necessary". 2007-10-19 23:10:43 +02:00
pata_cs5535.c Fix misspellings of "system", "controller", "interrupt" and "necessary". 2007-10-19 23:10:43 +02:00
pata_cs5536.c pata_cs5536: MWDMA fix 2007-10-19 22:55:03 -04:00
pata_cypress.c libata: Switch most of the remaining SFF drivers to ata_sff_port_start 2007-10-12 14:55:36 -04:00
pata_efar.c libata: Switch most of the remaining SFF drivers to ata_sff_port_start 2007-10-12 14:55:36 -04:00
pata_hpt3x2n.c libata: Switch most of the remaining SFF drivers to ata_sff_port_start 2007-10-12 14:55:36 -04:00
pata_hpt3x3.c libata: implement and use ata_port_desc() to report port configuration 2007-10-12 14:55:37 -04:00
pata_hpt37x.c libata: Switch most of the remaining SFF drivers to ata_sff_port_start 2007-10-12 14:55:36 -04:00
pata_hpt366.c libata: Switch most of the remaining SFF drivers to ata_sff_port_start 2007-10-12 14:55:36 -04:00
pata_icside.c Fix pata_icside build for recent libata API changes 2007-10-25 02:05:26 -04:00
pata_isapnp.c libata: implement and use ata_port_desc() to report port configuration 2007-10-12 14:55:37 -04:00
pata_it821x.c Fix misspellings of "system", "controller", "interrupt" and "necessary". 2007-10-19 23:10:43 +02:00
pata_it8213.c libata: Switch most of the remaining SFF drivers to ata_sff_port_start 2007-10-12 14:55:36 -04:00
pata_ixp4xx_cf.c libata: implement and use ata_port_desc() to report port configuration 2007-10-12 14:55:37 -04:00
pata_jmicron.c pata_jmicron: match vendor and class code only 2007-10-12 14:55:46 -04:00
pata_legacy.c libata: implement and use ata_port_desc() to report port configuration 2007-10-12 14:55:37 -04:00
pata_marvell.c libata: Switch most of the remaining SFF drivers to ata_sff_port_start 2007-10-12 14:55:36 -04:00
pata_mpc52xx.c mpc52xx-ata: fix compile warning (unused variable) 2007-10-14 08:57:30 -07:00
pata_mpiix.c Fix misspellings of "system", "controller", "interrupt" and "necessary". 2007-10-19 23:10:43 +02:00
pata_netcell.c libata: Switch most of the remaining SFF drivers to ata_sff_port_start 2007-10-12 14:55:36 -04:00
pata_ns87410.c Fix misspellings of "system", "controller", "interrupt" and "necessary". 2007-10-19 23:10:43 +02:00
pata_ns87415.c pata_ns87415: define SUPERIO_IDE_MAX_RETRIES 2007-10-29 06:21:33 -04:00
pata_oldpiix.c Fix misspellings of "system", "controller", "interrupt" and "necessary". 2007-10-19 23:10:43 +02:00
pata_opti.c libata: Switch most of the remaining SFF drivers to ata_sff_port_start 2007-10-12 14:55:36 -04:00
pata_optidma.c [libata] fix 'if(' and similar areas that lack whitespace 2007-10-29 06:15:27 -04:00
pata_pcmcia.c [libata] Address some checkpatch-spotted issues 2007-10-29 06:15:27 -04:00
pata_pdc202xx_old.c [libata] fix 'if(' and similar areas that lack whitespace 2007-10-29 06:15:27 -04:00
pata_pdc2027x.c [libata] fix 'if(' and similar areas that lack whitespace 2007-10-29 06:15:27 -04:00
pata_platform.c libata: implement and use ata_port_desc() to report port configuration 2007-10-12 14:55:37 -04:00
pata_qdi.c libata: implement and use ata_port_desc() to report port configuration 2007-10-12 14:55:37 -04:00
pata_radisys.c Fix misspellings of "system", "controller", "interrupt" and "necessary". 2007-10-19 23:10:43 +02:00
pata_rz1000.c libata: Switch most of the remaining SFF drivers to ata_sff_port_start 2007-10-12 14:55:36 -04:00
pata_sc1200.c Fix misspellings of "system", "controller", "interrupt" and "necessary". 2007-10-19 23:10:43 +02:00
pata_scc.c libata: implement ata_wait_after_reset() 2007-10-29 06:15:27 -04:00
pata_serverworks.c libata: Switch most of the remaining SFF drivers to ata_sff_port_start 2007-10-12 14:55:36 -04:00
pata_sil680.c Fix misspellings of "system", "controller", "interrupt" and "necessary". 2007-10-19 23:10:43 +02:00
pata_sis.c libata: Switch most of the remaining SFF drivers to ata_sff_port_start 2007-10-12 14:55:36 -04:00
pata_sl82c105.c libata: Switch most of the remaining SFF drivers to ata_sff_port_start 2007-10-12 14:55:36 -04:00
pata_triflex.c libata: Switch most of the remaining SFF drivers to ata_sff_port_start 2007-10-12 14:55:36 -04:00
pata_via.c [libata] fix 'if(' and similar areas that lack whitespace 2007-10-29 06:15:27 -04:00
pata_winbond.c [libata] fix 'if(' and similar areas that lack whitespace 2007-10-29 06:15:27 -04:00
pdc_adma.c [libata] Address some checkpatch-spotted issues 2007-10-29 06:15:27 -04:00
sata_fsl.c drivers/ata: add support to Freescale 3.0Gbps SATA Controller 2007-10-17 20:49:02 -04:00
sata_inic162x.c [libata] Address some checkpatch-spotted issues 2007-10-29 06:15:27 -04:00
sata_mv.c [libata] Address some checkpatch-spotted issues 2007-10-29 06:15:27 -04:00
sata_nv.c [libata] sata_nv: fix SWNCQ enabling 2007-10-29 06:49:24 -04:00
sata_promise.c sata_promise: ASIC PRD table bug workaround, take 2 2007-10-30 09:27:57 -04:00
sata_promise.h
sata_qstor.c [libata] Address some checkpatch-spotted issues 2007-10-29 06:15:27 -04:00
sata_sil.c [libata] Address some checkpatch-spotted issues 2007-10-29 06:15:27 -04:00
sata_sil24.c [libata] Address some checkpatch-spotted issues 2007-10-29 06:15:27 -04:00
sata_sis.c [libata] Address some checkpatch-spotted issues 2007-10-29 06:15:27 -04:00
sata_svw.c [libata] Address some checkpatch-spotted issues 2007-10-29 06:15:27 -04:00
sata_sx4.c [libata] Address some checkpatch-spotted issues 2007-10-29 06:15:27 -04:00
sata_uli.c [libata] Address some checkpatch-spotted issues 2007-10-29 06:15:27 -04:00
sata_via.c [libata] Address some checkpatch-spotted issues 2007-10-29 06:15:27 -04:00
sata_vsc.c [libata] Address some checkpatch-spotted issues 2007-10-29 06:15:27 -04:00
sis.h libata: PATA-mode fixes for sis_sata 2007-07-02 10:17:42 -04:00