Commit dc282020 authored by bram.verweij@wanadoo.nl's avatar bram.verweij@wanadoo.nl Committed by Bartlomiej Zolnierkiewicz

[ide] fix DMA support for LBA48 disks on ALi15x3 (revs < 0xC5)

From: Bram Verweij <bram.verweij@wanadoo.nl>

The problem seems to be that ide-disk.c tries to use PIO mode for
blocks > 137 GB (which is good), and LBA48 + DMA for blocks <= 137GB
(which is known to be a problem, i.e., this is why the no_lba48_dma 
field was introduced in the first place).  Attached is a small patch
that makes ide-disk.c use PIO mode for blocks > 137 GB, and LBA28 DMA
(instead of LBA48 DMA) for blocks <= 137 GB.

bart: argh, I forgot about 'lba48' flag; patch slightly modified by me
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent 1a8fca91
......@@ -133,6 +133,8 @@ static ide_startstop_t __ide_do_rw_disk(ide_drive_t *drive, struct request *rq,
if (hwif->no_lba48_dma && lba48 && dma) {
if (block + rq->nr_sectors > 1ULL << 28)
dma = 0;
else
lba48 = 0;
}
if (!dma) {
......@@ -146,7 +148,7 @@ static ide_startstop_t __ide_do_rw_disk(ide_drive_t *drive, struct request *rq,
/* FIXME: SELECT_MASK(drive, 0) ? */
if (drive->select.b.lba) {
if (drive->addressing == 1) {
if (lba48) {
task_ioreg_t tasklets[10];
pr_debug("%s: LBA=0x%012llx\n", drive->name, block);
......
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