Re: [PATCH] Backport recent IDE updates, take 2

From: Erik Andersen
Date: Wed Aug 27 2003 - 15:40:03 EST


On Wed Aug 27, 2003 at 04:35:07PM +0100, Alan Cox wrote:
> On Gwe, 2003-08-22 at 23:11, Erik Andersen wrote:
> > CHS), and sanely clamps LBA48 when not doing DMA, preventing data
> > corruption, and avoids idedisk_supports_host_protected_area()
>
> Doesnt seem to do that right. Marcelo, please don't apply any of this
> stuff until someone actually fixes the lba48 clipping properly

if (idedisk_supports_lba48(id)) {
/* drive speaks 48-bit LBA */
drive->select.b.lba = 1;
drive->capacity64 = id->lba_capacity_2;
if (hpa)
idedisk_check_hpa(drive);
if (drive->addressing == 0 && drive->capacity64 > (1ULL)<<28) {
/* FIXME: most controllers that won't do LBA48 with
* DMA will do it via PIO so we ought to implement a
* PIO fallback... For now, punt and limit the drive
* to 128 GiB to prevent bad things from happening... */
drive->capacity64 = (1ULL)<<28;
}
}

This is not sufficient?

-Erik

--
Erik B. Andersen http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/