Skip to contentSkip to conversation

PATCH: Minimal ide-disk updates

PATCH Alan Cox 1 participant 1 message Oct 6, 2004

lore
Share & tools
lore

Alan Cox

author
#0 lore raw

These are the minimal updates for ide-disk. They don't remove all ident whacking in the it8212 driver because there are genuine things to fix there such as the LBA28 flags.

drivers/ide/ide-disk.c +8 -2
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.9rc3/drivers/ide/ide-disk.c linux-2.6.9rc3/drivers/ide/ide-disk.c
@@ -88,6 +88,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.
@@ -1602,8 +1606,10 @@
 	if (id->buf_size)
 		printk (" w/%dKiB Cache", id->buf_size/2);
 
-	printk(", CHS=%d/%d/%d", 
-	       drive->bios_cyl, drive->bios_head, drive->bios_sect);
+	if(drive->bios_cyl)
+		printk(", CHS=%d/%d/%d", 
+	       		drive->bios_cyl, drive->bios_head, drive->bios_sect);
+	       		
 	if (drive->using_dma)
 		(void) HWIF(drive)->ide_dma_verbose(drive);
 	printk("\n");