summaryrefslogtreecommitdiff
path: root/drivers/ata/pata_it821x.c
diff options
context:
space:
mode:
authorJeff Norden <jnorden@math.tntech.edu>2007-09-04 20:07:20 +0400
committerJeff Garzik <jeff@garzik.org>2007-09-11 05:53:00 +0400
commitbce7d5e0e1fc0c1f1251b7f21a19cb48207408b6 (patch)
tree8155b39f1d7f03f96b556bbe1df6b6be853c7a1a /drivers/ata/pata_it821x.c
parent08ebd43d6b9b63de681b8f255c0fabae8033527c (diff)
downloadlinux-bce7d5e0e1fc0c1f1251b7f21a19cb48207408b6.tar.xz
pata_it821x: fix lost interrupt with atapi devices
Fix "lost" interrupt problem when using dma with CD/DVD drives in some configurations. This problem can make installing linux from media impossible for distro's that have switched to libata-only configurations. The simple fix is to eliminate the use of dma for reading drive status, etc, by checking the number of bytes to transferred. This change will only affect the behavior of atapi devices, not disks. There is more info at http://bugzilla.redhat.com/show_bug.cgi?id=242229 This patch is for 2.6.22.1 Signed-off-by: Jeff Norden <jnorden@math.tntech.edu> Reviewed-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/pata_it821x.c')
-rw-r--r--drivers/ata/pata_it821x.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/ata/pata_it821x.c b/drivers/ata/pata_it821x.c
index ed637ae33ece..5d8b91e70ecd 100644
--- a/drivers/ata/pata_it821x.c
+++ b/drivers/ata/pata_it821x.c
@@ -533,6 +533,10 @@ static int it821x_check_atapi_dma(struct ata_queued_cmd *qc)
struct ata_port *ap = qc->ap;
struct it821x_dev *itdev = ap->private_data;
+ /* Only use dma for transfers to/from the media. */
+ if (qc->nbytes < 2048)
+ return -EOPNOTSUPP;
+
/* No ATAPI DMA in smart mode */
if (itdev->smart)
return -EOPNOTSUPP;