PATCH: IDE fix ide-disk inability to handle LBA only devices.

From: Alan Cox
Date: Mon Jun 20 2005 - 15:25:32 EST


Years old bug, has to be fixed for it8212 to work

Signed-off-by: Alan Cox <alan@xxxxxxxxxx>

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.12/drivers/ide/ide-disk.c linux-2.6.12/drivers/ide/ide-disk.c
--- linux.vanilla-2.6.12/drivers/ide/ide-disk.c 2005-06-19 11:30:47.000000000 +0100
+++ linux-2.6.12/drivers/ide/ide-disk.c 2005-06-20 20:43:04.000000000 +0100
@@ -119,6 +119,10 @@
{
unsigned long lba_sects, chs_sects, head, tail;

+ /* No non-LBA info .. so valid! */
+ if (id->cyls == 0)
+ return 1;
+
/*
* The ATA spec tells large drives to return
* C/H/S = 16383/16/63 independent of their size.

-
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/