mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* hd.c not compiling.
@ 2002-05-14  8:24 Wickus Botha
  2002-05-14  9:40 ` Keith Owens
  0 siblings, 1 reply; 3+ messages in thread
From: Wickus Botha @ 2002-05-14  8:24 UTC (permalink / raw)
  To: 'linux-kernel@vger.kernel.org'

Hey

I'm busy testing the new development kernel 2.5.15. Each time it gets to
compiling the ide stuff it fails. 

make[3]: Entering directory `/usr/src/linux-2.5.15/drivers/ide'
gcc -D__KERNEL__ -I/usr/src/linux-2.5.15/include -Wall -Wstrict-prototypes
-Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common
-pipe -mpreferred-stack-boundary=2 -march=i686   -DKBUILD_BASENAME=hd  -c
-o hd.o hd.c
hd.c: In function `hd_out':
hd.c:282: `TIMEOUT_VALUE' undeclared (first use in this function)
hd.c:282: (Each undeclared identifier is reported only once
hd.c:282: for each function it appears in.)
hd.c: In function `unexpected_hd_interrupt':
hd.c:363: `TIMEOUT_VALUE' undeclared (first use in this function)
hd.c: In function `read_intr':
hd.c:432: `TIMEOUT_VALUE' undeclared (first use in this function)
hd.c: In function `write_intr':
hd.c:470: `TIMEOUT_VALUE' undeclared (first use in this function)
hd.c: In function `hd_request':
hd.c:553: `TIMEOUT_VALUE' undeclared (first use in this function)
hd.c: In function `hd_init':
hd.c:830: `DEVICE_REQUEST' undeclared (first use in this function)
hd.c: At top level:
hd.c:615: warning: `do_hd_request' defined but not used
make[3]: *** [hd.o] Error 1

I've noticed /usr/src/linux/include/linux/blk.h doesn't have the following 2
entries anymore

#define TIMEOUT_VALUE (6*HZ)
#define DEVICE_REQUEST do_hd_request

I added them to the blk.h file and its compiling fine now

#elif (MAJOR_NR == HD_MAJOR)

/* Hard disk:  timeout is 6 seconds. */
#define DEVICE_NAME "hard disk"
#define DEVICE_INTR do_hd
#define TIMEOUT_VALUE (6*HZ)
#define DEVICE_REQUEST do_hd_request
#define DEVICE_NR(device) (minor(device)>>6)





---------------------------------------------------------------------------
VIRUS FREE EMAIL: This message has been screened and determined free
of all known viruses by NetActive Mail Control. For more information on 
Mail Scanning, Internet Access, Virtual Private Networks (VPN), Managed 
Firewall security and other IT Services, please visit us at 
http://www.netactive.co.za

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: hd.c not compiling.
  2002-05-14  8:24 hd.c not compiling Wickus Botha
@ 2002-05-14  9:40 ` Keith Owens
  2002-05-14 12:53   ` Mikael Pettersson
  0 siblings, 1 reply; 3+ messages in thread
From: Keith Owens @ 2002-05-14  9:40 UTC (permalink / raw)
  To: Wickus Botha; +Cc: 'linux-kernel@vger.kernel.org'

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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: hd.c not compiling.
  2002-05-14  9:40 ` Keith Owens
@ 2002-05-14 12:53   ` Mikael Pettersson
  0 siblings, 0 replies; 3+ messages in thread
From: Mikael Pettersson @ 2002-05-14 12:53 UTC (permalink / raw)
  To: Keith Owens; +Cc: Wickus Botha, 'linux-kernel@vger.kernel.org'

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);

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-05-14 12:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-14  8:24 hd.c not compiling Wickus Botha
2002-05-14  9:40 ` Keith Owens
2002-05-14 12:53   ` 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®