Re: hd.c not compiling.

From: Mikael Pettersson (mikpe@csd.uu.se)
Date: Tue May 14 2002 - 07:53:18 EST


Keith Owens writes:
> On Tue, 14 May 2002 10:24:51 +0200,
> Wickus Botha <Wickus@na.co.za> wrote:
> >I'm busy testing the new development kernel 2.5.15. Each time it gets to
> >compiling the ide stuff it fails.
> >hd.c: In function `hd_out':
> >hd.c:282: `TIMEOUT_VALUE' undeclared (first use in this function)
>
> That is the only hd only driver. It has not been updated to follow
> recent 2.5 changes. Unless you want the old hd only code, set
> CONFIG_BLK_DEV_HD_IDE=n and use the newer driver for all IDE disks.

Except of course when the new IDE driver crashes and burns, like it does on
my (infamous?) '93 vintage '486. On that box Andre's IDE driver works great
in 2.2.20+ide and 2.4.19pre, but Martin's mutated IDE driver hangs when init
comes to the point where is remounts file systems read-write.

A cleaner fix for hd.c in 2.5.15 follows below; it's from -dj.

/Mikael

--- linux-2.5.15/drivers/ide/hd.c.~1~ Mon May 6 13:05:04 2002
+++ linux-2.5.15/drivers/ide/hd.c Fri May 10 01:54:43 2002
@@ -66,6 +66,7 @@
 
 static int revalidate_hddisk(kdev_t, int);
 
+#define TIMEOUT_VALUE (6*HZ)
 #define HD_DELAY 0
 
 #define MAX_ERRORS 16 /* Max read/write errors/sector */
@@ -827,7 +828,7 @@
                 printk("hd: unable to get major %d for hard disk\n",MAJOR_NR);
                 return -1;
         }
- blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST, &hd_lock);
+ blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), do_hd_request, &hd_lock);
         blk_queue_max_sectors(BLK_DEFAULT_QUEUE(MAJOR_NR), 255);
         add_gendisk(&hd_gendisk);
         init_timer(&device_timer);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue May 14 2002 - 12:00:23 EST