public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@steeleye.com>
To: William Lee Irwin III <wli@holomorphy.com>
Cc: Andrew Morton <akpm@osdl.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: 2.6.6-rc2-mm2
Date: 29 Apr 2004 21:05:06 -0500	[thread overview]
Message-ID: <1083290708.1804.191.camel@mulgrave> (raw)
In-Reply-To: <20040430002455.GA996@holomorphy.com>

On Thu, 2004-04-29 at 19:24, William Lee Irwin III wrote:
> # ChangeSet
> #   2004/04/25 09:10:30-05:00 akpm@osdl.org 
> #   [PATCH] aic7xxx: fix oops whe hardware is not present
> #   From: Herbert Xu <herbert@gondor.apana.org.au>

OK, well, on inspection that patch is fairly comprehensively incorrect.

Can you try out the attached?  I've compiled it but have nothing to test
installation with.

Thanks,

James

===== aic7770_osm.c 1.5 vs edited =====
--- 1.5/drivers/scsi/aic7xxx/aic7770_osm.c	Tue Apr  6 23:09:31 2004
+++ edited/aic7770_osm.c	Thu Apr 29 20:07:39 2004
@@ -159,10 +159,10 @@
 void
 ahc_linux_eisa_exit(void)
 {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
-	eisa_driver_unregister(&aic7770_driver);
-	free(aic7770_driver.id_table, M_DEVBUF);
-#endif
+	if(aic7xxx_probe_eisa_vl != 0 && aic7770_driver.id_table != NULL) {
+		eisa_driver_unregister(&aic7770_driver);
+		free(aic7770_driver.id_table, M_DEVBUF);
+	}
 }
 
 static int
===== aic7xxx_osm.c 1.51 vs edited =====
--- 1.51/drivers/scsi/aic7xxx/aic7xxx_osm.c	Sun Apr 25 09:11:53 2004
+++ edited/aic7xxx_osm.c	Thu Apr 29 20:32:32 2004
@@ -843,7 +843,8 @@
 ahc_linux_detect(Scsi_Host_Template *template)
 {
 	struct	ahc_softc *ahc;
-	int     found;
+	int     found = 0;
+	int	eisa_err, pci_err;
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
 	/*
@@ -891,21 +892,12 @@
 	 */
 	ahc_list_lockinit();
 
-#ifdef CONFIG_PCI
-	found = ahc_linux_pci_init();
-	if (found)
-		goto out;
-#endif
+	pci_err = ahc_linux_pci_init();
+	eisa_err = ahc_linux_eisa_init();
 
-#ifdef CONFIG_EISA
-	found = ahc_linux_eisa_init();
-	if (found) {
-#ifdef CONFIG_PCI
-		ahc_linux_pci_exit();
-#endif
+	if(pci_err && eisa_err)
 		goto out;
-	}
-#endif
+
 
 	/*
 	 * Register with the SCSI layer all
@@ -916,12 +908,13 @@
 		if (ahc_linux_register_host(ahc, template) == 0)
 			found++;
 	}
+out:
+
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
 	spin_lock_irq(&io_request_lock);
 #endif
 	aic7xxx_detect_complete++;
 
-out:
 	return (found);
 }
 
@@ -5078,7 +5071,7 @@
 	}
 }
 
-static void __exit ahc_linux_exit(void);
+static void ahc_linux_exit(void);
 
 static int __init
 ahc_linux_init(void)
@@ -5101,7 +5094,7 @@
 #endif
 }
 
-static void __exit
+static void
 ahc_linux_exit(void)
 {
 	struct ahc_softc *ahc;
@@ -5128,12 +5121,8 @@
 	 */
 	scsi_unregister_module(MODULE_SCSI_HA, &aic7xxx_driver_template);
 #endif
-#ifdef CONFIG_PCI
 	ahc_linux_pci_exit();
-#endif
-#ifdef CONFIG_EISA
 	ahc_linux_eisa_exit();
-#endif
 }
 
 module_init(ahc_linux_init);
===== aic7xxx_osm.h 1.52 vs edited =====
--- 1.52/drivers/scsi/aic7xxx/aic7xxx_osm.h	Tue Apr  6 23:09:31 2004
+++ edited/aic7xxx_osm.h	Thu Apr 29 20:39:50 2004
@@ -845,6 +845,12 @@
 int			 aic7770_map_registers(struct ahc_softc *ahc,
 					       u_int port);
 int			 aic7770_map_int(struct ahc_softc *ahc, u_int irq);
+#else
+static inline int	ahc_linux_eisa_init(void) {
+	return -ENODEV;
+}
+static inline void	ahc_linux_eisa_exit(void) {
+}
 #endif
 
 /******************************* PCI Routines *********************************/
@@ -931,6 +937,12 @@
 ahc_get_pci_bus(ahc_dev_softc_t pci)
 {
 	return (pci->bus->number);
+}
+#else
+static inline int ahc_linux_pci_init(void) {
+	return -ENODEV;
+}
+static inline void ahc_linux_pci_exit(void) {
 }
 #endif
 


  reply	other threads:[~2004-04-30  2:05 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-26  8:39 2.6.6-rc2-mm2 Andrew Morton
2004-04-26 16:55 ` 2.6.6-rc2-mm2 Zwane Mwaikambo
2004-04-26 17:11 ` 2.6.6-rc2-mm2 raven
2004-04-26 17:37   ` 2.6.6-rc2-bk3 (and earlier?) mount problem (?) Grzegorz Kulewski
2004-04-26 18:08     ` Linus Torvalds
2004-04-26 22:08       ` Grzegorz Kulewski
2004-04-26 22:13         ` Linus Torvalds
2004-04-26 22:38           ` Grzegorz Kulewski
2004-04-26 22:56             ` viro
2004-04-27  0:04               ` Grzegorz Kulewski
2004-04-27  0:23                 ` viro
2004-04-27  0:43                   ` viro
2004-04-27  1:00                   ` Linus Torvalds
2004-04-27  1:07                     ` 2.6.6-rc2-bk3 (and earlier?) mount problem (? viro
2004-04-27  9:12                       ` Grzegorz Kulewski
2004-04-27 12:51                         ` Chris Mason
2004-04-27 13:07                           ` Grzegorz Kulewski
2004-04-27 14:05                             ` Paul P Komkoff Jr
2004-04-27 18:34                               ` viro
2004-04-27 20:04                                 ` Paul P Komkoff Jr
2004-04-27 20:28                                   ` viro
2004-04-27 20:39                                     ` Grzegorz Kulewski
2004-04-27 21:35                                       ` viro
2004-04-27 21:59                                         ` Grzegorz Kulewski
2004-04-28 10:19                                     ` Paul P Komkoff Jr
2004-06-19 16:59         ` Memory and rsync problem with vanilla 2.6.7 Grzegorz Kulewski
2004-06-19 17:50           ` Linus Torvalds
2004-06-20  3:47             ` Nick Piggin
2004-06-20 14:18               ` Grzegorz Kulewski
2004-06-20 14:41                 ` Grzegorz Kulewski
2004-06-20 14:45                   ` Nick Piggin
2004-06-20 20:34                     ` Grzegorz Kulewski
2004-06-21 16:22                     ` Grzegorz Kulewski
2004-06-20 13:24             ` Grzegorz Kulewski
2004-06-20 14:04               ` Sam Ravnborg
2004-06-21 18:36             ` network related(?) kernel panic (2.6.7-bk4) Grzegorz Kulewski
2004-04-26 18:52 ` 2.6.6-rc2-mm2 Frédéric L. W. Meunier
2004-04-26 23:06 ` 2.6.6-rc2-mm2 (compile stats) John Cherry
2004-04-28  9:37 ` 2.6.6-rc2-mm2 William Lee Irwin III
2004-04-29 18:41 ` 2.6.6-rc2-mm2 William Lee Irwin III
2004-04-29 20:45   ` 2.6.6-rc2-mm2 Andrew Morton
2004-04-29 21:18     ` 2.6.6-rc2-mm2 William Lee Irwin III
2004-04-30  0:24       ` 2.6.6-rc2-mm2 William Lee Irwin III
2004-04-30  2:05         ` James Bottomley [this message]
2004-04-30  2:24           ` 2.6.6-rc2-mm2 William Lee Irwin III

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=1083290708.1804.191.camel@mulgrave \
    --to=james.bottomley@steeleye.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wli@holomorphy.com \
    /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