Skip to content

Commit

Permalink
pata_it821x: fix lost interrupt with atapi devices
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeff Norden authored and Jeff Garzik committed Sep 11, 2007
1 parent 08ebd43 commit bce7d5e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/ata/pata_it821x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit bce7d5e

Please sign in to comment.