aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_pdc202xx_old.c
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2008-01-19 10:51:26 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-01-20 00:29:39 -0500
commitaa8f2371c564fc9b289dab3a8ecd93212d021fd2 (patch)
treee8a8cd8e623ec37b68a0d7d9345b80898ceaa1f4 /drivers/ata/pata_pdc202xx_old.c
parent5db501d7e398c6a838a307adf0347cf6a2b015a3 (diff)
pata_pdc202xx_old: Fix crashes with ATAPI
The PDC202xx older devices do not support ATAPI DMA via the usual interfaces. What documentation I have isn't sufficient to support DMA and it isn't clear if the Windows drivers do this or it is possible at all. (Neither do the drivers/ide old drivers) So turn it ATAPI DMA off, these are disk optimised controllers. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/ata/pata_pdc202xx_old.c')
-rw-r--r--drivers/ata/pata_pdc202xx_old.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/ata/pata_pdc202xx_old.c b/drivers/ata/pata_pdc202xx_old.c
index 8f2815601791..6c9689b59b06 100644
--- a/drivers/ata/pata_pdc202xx_old.c
+++ b/drivers/ata/pata_pdc202xx_old.c
@@ -244,6 +244,24 @@ static int pdc2026x_port_start(struct ata_port *ap)
244 return ata_sff_port_start(ap); 244 return ata_sff_port_start(ap);
245} 245}
246 246
247/**
248 * pdc2026x_check_atapi_dma - Check whether ATAPI DMA can be supported for this command
249 * @qc: Metadata associated with taskfile to check
250 *
251 * Just say no - not supported on older Promise.
252 *
253 * LOCKING:
254 * None (inherited from caller).
255 *
256 * RETURNS: 0 when ATAPI DMA can be used
257 * 1 otherwise
258 */
259
260static int pdc2026x_check_atapi_dma(struct ata_queued_cmd *qc)
261{
262 return 1;
263}
264
247static struct scsi_host_template pdc202xx_sht = { 265static struct scsi_host_template pdc202xx_sht = {
248 .module = THIS_MODULE, 266 .module = THIS_MODULE,
249 .name = DRV_NAME, 267 .name = DRV_NAME,
@@ -311,6 +329,7 @@ static struct ata_port_operations pdc2026x_port_ops = {
311 .post_internal_cmd = ata_bmdma_post_internal_cmd, 329 .post_internal_cmd = ata_bmdma_post_internal_cmd,
312 .cable_detect = pdc2026x_cable_detect, 330 .cable_detect = pdc2026x_cable_detect,
313 331
332 .check_atapi_dma= pdc2026x_check_atapi_dma,
314 .bmdma_setup = ata_bmdma_setup, 333 .bmdma_setup = ata_bmdma_setup,
315 .bmdma_start = pdc2026x_bmdma_start, 334 .bmdma_start = pdc2026x_bmdma_start,
316 .bmdma_stop = pdc2026x_bmdma_stop, 335 .bmdma_stop = pdc2026x_bmdma_stop,