Skip to contentSkip to conversation

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

PATCH Alan Cox 1 participant 1 message Jun 20, 2005

lore
Share & tools
lore

Alan Cox

author
#0 lore raw

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

drivers/ide/ide-disk.c +4 -0
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
@@ -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.