patch-2.2.4 linux/drivers/block/ide-probe.c

Next file: linux/drivers/block/ide.c
Previous file: linux/drivers/block/ide-pmac.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.3/linux/drivers/block/ide-probe.c linux/drivers/block/ide-probe.c
@@ -1,5 +1,5 @@
 /*
- *  linux/drivers/block/ide-probe.c	Version 1.03  Dec  5, 1997
+ *  linux/drivers/block/ide-probe.c	Version 1.04  March 10, 1999
  *
  *  Copyright (C) 1994-1998  Linus Torvalds & authors (see below)
  */
@@ -17,6 +17,7 @@
  * Version 1.02		increase WAIT_PIDENTIFY to avoid CD-ROM locking at boot
  *			 by Andrea Arcangeli
  * Version 1.03		fix for (hwif->chipset == ide_4drives)
+ * Version 1.04		fixed buggy treatments of known flash memory cards
  */
 
 #undef REALLY_SLOW_IO		/* most systems can safely undef this */
@@ -84,16 +85,6 @@
 	drive->present = 1;
 
 	/*
-	 * Prevent long system lockup probing later for non-existant
-	 * slave drive if the hwif is actually a Kodak CompactFlash card.
-	 */
-	if (!strcmp(id->model, "KODAK ATA_FLASH")) {
-		ide_drive_t *mate = &HWIF(drive)->drives[1^drive->select.b.unit];
-		mate->present = 0;
-		mate->noprobe = 1;
-	}
-
-	/*
 	 * Check for an ATAPI device
 	 */
 	if (cmd == WIN_PIDENTIFY) {
@@ -137,6 +128,20 @@
 		return;
 	}
 
+	/*
+	 * Not an ATAPI device: looks like a "regular" hard disk
+	 */
+	if (id->config & (1<<7))
+		drive->removable = 1;
+	/*
+	 * Prevent long system lockup probing later for non-existant
+	 * slave drive if the hwif is actually a flash memory card of some variety:
+	 */
+	if (drive_is_flashcard(drive)) {
+		ide_drive_t *mate = &HWIF(drive)->drives[1^drive->select.b.unit];
+		mate->present = 0;
+		mate->noprobe = 1;
+	}
 	drive->media = ide_disk;
 	printk("ATA DISK drive\n");
 	return;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)