diff --git a/drivers/ata/pata_it821x.c b/drivers/ata/pata_it821x.c index ed637ae33ece31faecb60076df6106166bd32ff9..5d8b91e70ecd82b41b33b3ab407eeb650599d9ff 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;