public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: stefan@jaschke-net.de
Cc: "J . A . Magallon" <jamagallon@able.es>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: patch: cdrom_init not called correctly (was Re: ac10 ide-cd oopses on boot)
Date: Fri, 20 Apr 2001 10:45:24 +0200	[thread overview]
Message-ID: <20010420104524.J501@suse.de> (raw)
In-Reply-To: <20010420004914.A1052@werewolf.able.es> <01042009050000.06427@antares>
In-Reply-To: <01042009050000.06427@antares>; from s-jaschke@t-online.de on Fri, Apr 20, 2001 at 09:05:00AM +0200

[-- Attachment #1: Type: text/plain, Size: 770 bytes --]

On Fri, Apr 20 2001, Stefan Jaschke wrote:
> On Friday 20 April 2001 00:49, J . A . Magallon wrote:
> > Hi,
> >
> > Just built 2.4.3-ac10 and got an oops when booting. It tries to detect
> > the CD and gives the oops.
> > >>EIP; c01bfc7c <cdrom_get_entry+1c/50>   <=====
> 
> This appears to be a known problem. Jens Axboe sent a patch in a different
> thread ("SD-W2002 DVD-RAM") that fixes this. I am including it
> here for your convenience. (The patch is against 2.4.4-pre4 + Jens' 
> latest fixes.) 

Indeed, and it was the missing init call as suspected. The problem is
that cdrom is consequently linked after low level drivers -- this is
really the stuff that should be fixed, but instead of rewriting all of
that this quick hack should suffice.

-- 
Jens Axboe


[-- Attachment #2: cd-ac10-1 --]
[-- Type: text/plain, Size: 1304 bytes --]

--- drivers/cdrom/cdrom.c~	Fri Apr 20 10:43:31 2001
+++ drivers/cdrom/cdrom.c	Fri Apr 20 10:44:21 2001
@@ -381,7 +381,7 @@
  * change it here without gcc complaining at every line.
  */
 #define ENSURE(call, bits) if (cdo->call == NULL) *change_capability &= ~(bits)
-
+static int cdrom_init(void);
 int register_cdrom(struct cdrom_device_info *cdi)
 {
 	static char banner_printed;
@@ -397,11 +397,9 @@
 	if (cdo->open == NULL || cdo->release == NULL)
 		return -2;
 	if ( !banner_printed ) {
-		printk(KERN_INFO "Uniform CD-ROM driver " REVISION "\n");
 		banner_printed = 1;
-#ifdef CONFIG_SYSCTL
-		cdrom_sysctl_register();
-#endif /* CONFIG_SYSCTL */ 
+		printk(KERN_INFO "Uniform CD-ROM driver " REVISION "\n");
+		cdrom_init();
 	}
 	ENSURE(drive_status, CDC_DRIVE_STATUS );
 	ENSURE(media_changed, CDC_MEDIA_CHANGED);
@@ -477,7 +475,6 @@
 {
 	struct cdrom_device_info *cdi, *prev;
 	int major = MAJOR(unreg->dev);
-	int bit_nr, cd_index;
 
 	cdinfo(CD_OPEN, "entering unregister_cdrom\n"); 
 
@@ -2706,7 +2703,7 @@
 
 #endif /* CONFIG_SYSCTL */
 
-static int __init cdrom_init(void)
+static int cdrom_init(void)
 {
 	int n_entries = CDROM_MAX_CDROMS / (sizeof(unsigned long) * 8);
 
@@ -2729,5 +2726,4 @@
 	devfs_unregister(devfs_handle);
 }
 
-module_init(cdrom_init);
 module_exit(cdrom_exit);

      reply	other threads:[~2001-04-20  8:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-19 22:49 ac10 ide-cd oopses on boot J . A . Magallon
2001-04-19 23:07 ` Alan Cox
2001-04-19 23:34   ` J . A . Magallon
2001-04-20  2:38     ` Bill Nottingham
2001-04-20  2:55       ` Jordan
2001-04-20 10:44         ` [lkml]Re: " thunder7
2001-04-20  0:17   ` Udo A. Steinberg
2001-04-20  0:29     ` J . A . Magallon
2001-04-20  7:05 ` Stefan Jaschke
2001-04-20  8:45   ` Jens Axboe [this message]

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=20010420104524.J501@suse.de \
    --to=axboe@suse.de \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=jamagallon@able.es \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stefan@jaschke-net.de \
    /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