]> err.no Git - linux-2.6/commitdiff
[PATCH] Relax idecd dma alignment check
authorJens Axboe <axboe@suse.de>
Tue, 31 May 2005 15:47:36 +0000 (17:47 +0200)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 31 May 2005 16:11:57 +0000 (09:11 -0700)
Only the address needs alignment of mask bits, length should work with
a relaxed alignment check.

Signed-off-by: Jens Axboe <axboe@suse.de>
[ 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 <torvalds@osdl.org>
drivers/ide/ide-cd.c

index 78e3e7b24d7d62fb12bb2736f001d95894b1d42b..39f3e9101ed4b9eebb45237de5d1d3c982063d89 100644 (file)
@@ -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;
        }