diff options
author | Tejun Heo <tj@kernel.org> | 2008-11-03 19:01:09 +0900 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-11-04 01:08:27 -0500 |
commit | 6a87e42e955ff27e07a77f65f8f077dc7c4171e1 (patch) | |
tree | e5d50b2b91c17c6719b75bbd88ea5cbed4130304 /drivers | |
parent | a464189de350b050aa8f334bd4cc53ed406e56dd (diff) | |
download | linux-6a87e42e955ff27e07a77f65f8f077dc7c4171e1.tar.gz linux-6a87e42e955ff27e07a77f65f8f077dc7c4171e1.tar.bz2 linux-6a87e42e955ff27e07a77f65f8f077dc7c4171e1.zip |
libata: implement ATA_HORKAGE_ATAPI_MOD16_DMA and apply it
libata always uses PIO for ATAPI commands when the number of bytes to
transfer isn't multiple of 16 but quantum DAT72 chokes on odd bytes
PIO transfers. Implement a horkage to skip the mod16 check and apply
it to the quantum device.
This is reported by John Clark in the following thread.
http://thread.gmane.org/gmane.linux.ide/34748
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: John Clark <clarkjc@runbox.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ata/libata-core.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 82af7011f2dd..91b478f20557 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -4024,6 +4024,7 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { /* Weird ATAPI devices */ { "TORiSAN DVD-ROM DRD-N216", NULL, ATA_HORKAGE_MAX_SEC_128 }, + { "QUANTUM DAT DAT72-000", NULL, ATA_HORKAGE_ATAPI_MOD16_DMA }, /* Devices we expect to fail diagnostics */ @@ -4444,7 +4445,8 @@ int atapi_check_dma(struct ata_queued_cmd *qc) /* Don't allow DMA if it isn't multiple of 16 bytes. Quite a * few ATAPI devices choke on such DMA requests. */ - if (unlikely(qc->nbytes & 15)) + if (!(qc->dev->horkage & ATA_HORKAGE_ATAPI_MOD16_DMA) && + unlikely(qc->nbytes & 15)) return 1; if (ap->ops->check_atapi_dma) |