diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2008-01-19 15:51:26 +0000 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-01-19 21:29:39 -0800 |
commit | aa8f2371c564fc9b289dab3a8ecd93212d021fd2 (patch) | |
tree | e8a8cd8e623ec37b68a0d7d9345b80898ceaa1f4 /drivers/ata/pata_pdc202xx_old.c | |
parent | 5db501d7e398c6a838a307adf0347cf6a2b015a3 (diff) | |
download | linux-rpi3-aa8f2371c564fc9b289dab3a8ecd93212d021fd2.tar.gz linux-rpi3-aa8f2371c564fc9b289dab3a8ecd93212d021fd2.tar.bz2 linux-rpi3-aa8f2371c564fc9b289dab3a8ecd93212d021fd2.zip |
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.c | 19 |
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) return ata_sff_port_start(ap); } +/** + * pdc2026x_check_atapi_dma - Check whether ATAPI DMA can be supported for this command + * @qc: Metadata associated with taskfile to check + * + * Just say no - not supported on older Promise. + * + * LOCKING: + * None (inherited from caller). + * + * RETURNS: 0 when ATAPI DMA can be used + * 1 otherwise + */ + +static int pdc2026x_check_atapi_dma(struct ata_queued_cmd *qc) +{ + return 1; +} + static struct scsi_host_template pdc202xx_sht = { .module = THIS_MODULE, .name = DRV_NAME, @@ -311,6 +329,7 @@ static struct ata_port_operations pdc2026x_port_ops = { .post_internal_cmd = ata_bmdma_post_internal_cmd, .cable_detect = pdc2026x_cable_detect, + .check_atapi_dma= pdc2026x_check_atapi_dma, .bmdma_setup = ata_bmdma_setup, .bmdma_start = pdc2026x_bmdma_start, .bmdma_stop = pdc2026x_bmdma_stop, |