diff options
author | Borislav Petkov <petkovbb@gmail.com> | 2008-11-02 15:40:07 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-11-02 15:40:07 -0500 |
commit | 9bd27cba1aeacb6b12d05f4e5ed6361072f08fe0 (patch) | |
tree | 33917b6981e58ad553a86c44c91f07b1ecb13847 /drivers/ide | |
parent | 721d5dfe7e516954c501d5e9d0dfab379cf4241a (diff) |
ide-cd: fix DMA alignment regression
e5318b531b008c79d2a0c0df06a7b8628da38e2f ("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>
Diffstat (limited to 'drivers/ide')
-rw-r--r-- | drivers/ide/ide-cd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index 48b5eda3ab41..42ab6d8715f2 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c | |||
@@ -1250,7 +1250,8 @@ static void cdrom_do_block_pc(ide_drive_t *drive, struct request *rq) | |||
1250 | * separate masks. | 1250 | * separate masks. |
1251 | */ | 1251 | */ |
1252 | alignment = queue_dma_alignment(q) | q->dma_pad_mask; | 1252 | alignment = queue_dma_alignment(q) | q->dma_pad_mask; |
1253 | if ((unsigned long)buf & alignment || rq->data_len & alignment | 1253 | if ((unsigned long)buf & alignment |
1254 | || rq->data_len & q->dma_pad_mask | ||
1254 | || object_is_on_stack(buf)) | 1255 | || object_is_on_stack(buf)) |
1255 | drive->dma = 0; | 1256 | drive->dma = 0; |
1256 | } | 1257 | } |