Commit 9bd27cba authored by Borislav Petkov's avatar Borislav Petkov Committed by Bartlomiej Zolnierkiewicz
Browse files

ide-cd: fix DMA alignment regression

e5318b53 ("ide: use the dma safe check for
REQ_TYPE_ATA_PC") introduced a regression which caused some ATAPI drives to
turn off DMA for REQ_TYPE_BLOCK_PC commands while burning and thus degrading
performance and ultimately causing an excessive amount of underruns.

The issue is documented also in:

Signed-off-by: default avatarBorislav Petkov <>
Cc: FUJITA Tomonori <>
Tested-by: default avatarValerio Passini <>
[bart: fixup patch description per comments from Sergei Shtylyov]
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <>
parent 721d5dfe
......@@ -1250,7 +1250,8 @@ static void cdrom_do_block_pc(ide_drive_t *drive, struct request *rq)
* separate masks.
alignment = queue_dma_alignment(q) | q->dma_pad_mask;
if ((unsigned long)buf & alignment || rq->data_len & alignment
if ((unsigned long)buf & alignment
|| rq->data_len & q->dma_pad_mask
|| object_is_on_stack(buf))
drive->dma = 0;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment