mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] 2.5.6 IDE configuration breakage
@ 2002-03-10 16:42 Mikael Pettersson
  0 siblings, 0 replies; only message in thread
From: Mikael Pettersson @ 2002-03-10 16:42 UTC (permalink / raw)
  To: linux-kernel; +Cc: andre

Kernel patch 2.5.6 moved some stuff (types, variables, and functions)
from drivers/ide/ide_modes.h to drivers/ide/ide.c. It did so without
preserving the #ifdef CONFIG_BLK_DEV_IDE_MODES, so 2.5.6 vanilla
doesn't build on my ISA/VLB no-chipset-in-sight '92 vintage 486.

The patch below reintroduces the necessary #ifdef:s. It would be
a bit cleaner if the affected declarations were in a single chunk.

The old HD driver is not an option on this machine. I've tried it in
the past and the IDE driver is much more reliable.

(cc:d to Andre to keep him informed. I know he didn't do the damage.)

/Mikael

--- linux-2.5.6/drivers/ide/ide.c.~1~	Sat Mar  9 12:53:12 2002
+++ linux-2.5.6/drivers/ide/ide.c	Sun Mar 10 14:32:09 2002
@@ -197,6 +197,7 @@
 /*
  * Constant tables for PIO mode programming:
  */
+#ifdef CONFIG_BLK_DEV_IDE_MODES
 const ide_pio_timings_t ide_pio_timings[6] = {
 	{ 70,	165,	600 },	/* PIO Mode 0 */
 	{ 50,	125,	383 },	/* PIO Mode 1 */
@@ -205,11 +206,13 @@
 	{ 25,	70,	120 },	/* PIO Mode 4 with IORDY */
 	{ 20,	50,	100 }	/* PIO Mode 5 with IORDY (nonstandard) */
 };
+#endif
 
 /*
  * Black list. Some drives incorrectly report their maximal PIO mode,
  * at least in respect to CMD640. Here we keep info on some known drives.
  */
+#ifdef CONFIG_BLK_DEV_IDE_MODES
 static struct ide_pio_info {
 	const char	*name;
 	int		pio;
@@ -282,6 +285,7 @@
         { "QUANTUM FIREBALL_1280", 3 },
 	{ NULL,	0 }
 };
+#endif /* CONFIG_BLK_DEV_IDE_MODES */
 
 /* default maximum number of failures */
 #define IDE_DEFAULT_MAX_FAILURES	1
@@ -322,6 +326,7 @@
  * Returns -1 if no match found.
  * Otherwise returns the recommended PIO mode from ide_pio_blacklist[].
  */
+#ifdef CONFIG_BLK_DEV_IDE_MODES
 int ide_scan_pio_blacklist (char *model)
 {
 	struct ide_pio_info *p;
@@ -332,6 +337,7 @@
 	}
 	return -1;
 }
+#endif
 
 /*
  * This routine returns the recommended PIO settings for a given drive,
@@ -342,6 +348,7 @@
 /*
  * Drive PIO mode auto selection
  */
+#ifdef CONFIG_BLK_DEV_IDE_MODES
 byte ide_get_best_pio_mode (ide_drive_t *drive, byte mode_wanted, byte max_mode, ide_pio_data_t *d)
 {
 	int pio_mode;
@@ -413,6 +420,7 @@
 	}
 	return pio_mode;
 }
+#endif /* CONFIG_BLK_DEV_IDE_MODES */
 
 #if (DISK_RECOVERY_TIME > 0)
 /*

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-03-10 16:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-10 16:42 [PATCH] 2.5.6 IDE configuration breakage Mikael Pettersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®