mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mikael Pettersson <mikpe@csd.uu.se>
To: linux-kernel@vger.kernel.org
Cc: andre@linux-ide.org
Subject: [PATCH] 2.5.6 IDE configuration breakage
Date: Sun, 10 Mar 2002 17:42:30 +0100 (MET)	[thread overview]
Message-ID: <200203101642.RAA02290@harpo.it.uu.se> (raw)

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)
 /*

                 reply	other threads:[~2002-03-10 16:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200203101642.RAA02290@harpo.it.uu.se \
    --to=mikpe@csd.uu.se \
    --cc=andre@linux-ide.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®