From: Eric Kerin <eric@bootseg.com>
To: Andrew Morton <akpm@osdl.org>
Cc: alexn@telia.com, linux-kernel@vger.kernel.org,
linux-scsi@vger.kernel.org
Subject: Re: 2.6.3 oops at kobject_unregister, alsa & aic7xxx
Date: Tue, 24 Feb 2004 02:54:44 -0500 [thread overview]
Message-ID: <1077609283.3172.46.camel@opiate> (raw)
In-Reply-To: <20040223233218.73e61a9e.akpm@osdl.org>
On Tue, 2004-02-24 at 02:32, Andrew Morton wrote:
> Eric Kerin <eric@bootseg.com> wrote:
> > There's a 2nd patch in the above thread that changes those modules to
> > stay loaded even if no devices are found, which Arjan V pointed out was
> > the preferred way for drivers to work.
>
> Sounds good. Do you have that patch handy?
> -
Sure do,
Below are the patches I coded up for the aic7xxx and aic79xx drivers
that leave the module loaded.
Eric Kerin
--- aic7xxx_osm.c.original 2004-01-02 03:56:32.000000000 -0500
+++ aic7xxx_osm.c 2004-01-03 05:03:41.000000000 -0500
@@ -844,6 +844,7 @@ ahc_linux_detect(Scsi_Host_Template *tem
{
struct ahc_softc *ahc;
int found;
+ int pci_reg_state;
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
/*
@@ -891,8 +892,9 @@ ahc_linux_detect(Scsi_Host_Template *tem
*/
ahc_list_lockinit();
+ pci_reg_state = -1;
#ifdef CONFIG_PCI
- ahc_linux_pci_init();
+ pci_reg_state = ahc_linux_pci_init();
#endif
#ifdef CONFIG_EISA
@@ -913,6 +915,10 @@ ahc_linux_detect(Scsi_Host_Template *tem
spin_lock_irq(&io_request_lock);
#endif
aic7xxx_detect_complete++;
+ if(pci_reg_state == 0 && found == 0){
+ return(1);
+ }
+
return (found);
}
--- aic79xx_osm.c.original 2004-01-02 02:46:43.000000000 -0500
+++ aic79xx_osm.c 2004-01-03 05:05:52.000000000 -0500
@@ -856,6 +856,7 @@ ahd_linux_detect(Scsi_Host_Template *tem
{
struct ahd_softc *ahd;
int found;
+ int pci_reg_state;
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
/*
@@ -906,8 +907,9 @@ ahd_linux_detect(Scsi_Host_Template *tem
*/
ahd_list_lockinit();
+ pci_reg_state = -1;
#ifdef CONFIG_PCI
- ahd_linux_pci_init();
+ pci_reg_state = ahd_linux_pci_init();
#endif
/*
@@ -924,6 +926,10 @@ ahd_linux_detect(Scsi_Host_Template *tem
spin_lock_irq(&io_request_lock);
#endif
aic79xx_detect_complete++;
+ if(pci_reg_state == 0 && found == 0){
+ return(1);
+ }
+
return (found);
}
next prev parent reply other threads:[~2004-02-24 7:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-23 14:30 2.6.3 oops at kobject_unregister, alsa & aic7xxx Alexander Nyberg
2004-02-24 0:07 ` Andrew Morton
2004-02-24 0:43 ` Alexander Nyberg
2004-02-24 6:05 ` Eric Kerin
2004-02-24 6:17 ` Andrew Morton
2004-02-24 7:07 ` Eric Kerin
2004-02-24 7:32 ` Andrew Morton
2004-02-24 7:54 ` Eric Kerin [this message]
2004-02-24 17:56 ` Justin T. Gibbs
2004-02-24 23:12 ` Jason Lunz
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=1077609283.3172.46.camel@opiate \
--to=eric@bootseg.com \
--cc=akpm@osdl.org \
--cc=alexn@telia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@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