提交 bce7d5e0 编写于 作者: J Jeff Norden 提交者: Jeff Garzik

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: NJeff Norden <jnorden@math.tntech.edu>
Reviewed-by: NAlan Cox <alan@redhat.com>
Signed-off-by: NJeff Garzik <jeff@garzik.org>
上级 08ebd43d
...@@ -533,6 +533,10 @@ static int it821x_check_atapi_dma(struct ata_queued_cmd *qc) ...@@ -533,6 +533,10 @@ static int it821x_check_atapi_dma(struct ata_queued_cmd *qc)
struct ata_port *ap = qc->ap; struct ata_port *ap = qc->ap;
struct it821x_dev *itdev = ap->private_data; 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 */ /* No ATAPI DMA in smart mode */
if (itdev->smart) if (itdev->smart)
return -EOPNOTSUPP; return -EOPNOTSUPP;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册