projects/linux·commit 4e7c6816

[PATCH] Relax idecd dma alignment check

4e7c6816 · Jens Axboe <[email protected]> · 2005-05-31 17:47:36 +02:00

Only the address needs alignment of mask bits, length should work with
a relaxed alignment check.

Signed-off-by: Jens Axboe <[email protected]>

[ This is take 2: make the length check be for 16-byte alignment, not
  just word alignment.  That should hopefully keep everybody happy,
  while still allowing CD writing with DMA ]

Signed-off-by: Linus Torvalds <[email protected]>
Commit
4e7c6816d680d1945916db047a47847afe4b9b02
Parents
05fda3b1

Changes

1 files changed · +1 −1

FileStatusAddDelContent
drivers/ide/ide-cd.cmodified+1−1View file

drivers/ide/ide-cd.c

View file
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 78e3e7b..39f3e91 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -1936,7 +1936,7 @@ static ide_startstop_t cdrom_do_block_pc(ide_drive_t *drive, struct request *rq)
* NOTE! The "len" and "addr" checks should possibly have
* separate masks.
*/
- if ((rq->data_len & mask) || (addr & mask))
+ if ((rq->data_len & 15) || (addr & mask))
info->dma = 0;
}