mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
ide-cd: fix DMA alignment regression
e5318b531b
("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:
http://bugzilla.kernel.org/show_bug.cgi?id=11742.
Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Tested-by: Valerio Passini <valerio.passini@unicam.it>
[bart: fixup patch description per comments from Sergei Shtylyov]
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This commit is contained in:
parent
721d5dfe7e
commit
9bd27cba1a
1 changed files with 2 additions and 1 deletions
|
@ -1250,7 +1250,8 @@ static void cdrom_do_block_pc(ide_drive_t *drive, struct request *rq)
|
||||||
* separate masks.
|
* separate masks.
|
||||||
*/
|
*/
|
||||||
alignment = queue_dma_alignment(q) | q->dma_pad_mask;
|
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))
|
|| object_is_on_stack(buf))
|
||||||
drive->dma = 0;
|
drive->dma = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue