Skip to contentSkip to conversation

PATCH: ide-disk: don't validate non LBA info when there is no geometry

PATCH Alan Cox 1 participant 1 message Nov 5, 2004 libata

lore
Share & tools
lore

Alan Cox

author
#0 lore raw
drivers/ide/ide-disk.c +4 -0
diff --exclude-from /usr/src/exclude -u --new-file --recursive linux.vanilla-2.6.10rc1/drivers/ide/ide-disk.c linux-2.6.10rc1/drivers/ide/ide-disk.c
@@ -84,6 +84,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.