public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Wagland <paul@kungfoocoder.org>
To: Linux SCSI mailing list <linux-scsi@vger.kernel.org>,
	Linux kernel mailing list <linux-kernel@vger.kernel.org>
Cc: akpm@osdl.org, torvalds@osdl.org,
	James.Bottomley@HansenPartnership.com, atulm@lsil.com
Subject: [PATCH][BUGFIX] : Megaraid patch for 2.6 2/5
Date: Fri, 20 Feb 2004 03:06:00 +0100	[thread overview]
Message-ID: <1077242759.12567.78.camel@morsel.kungfoocoder.org> (raw)

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

Hi all,

On Linux-SCSI over the last few days I have been discussing a couple of
problems with the 2.6.2 megaraid driver. This patch fixes the problem
that the /proc files were being created in the wrong place, the reason
for this is that the /proc/megaraid directory was being created too
late, so it has been moved earlier in the initialisation sequence. There
has been one comment made about the #ifdef CONFIG_PROC_FS not being
needed, but if they are removed then I would also need to remove the
error when we can't create it, since it always "fails" to create a proc
entry when CONFIG_PROC_FS is not set. Please let me know if you would
like this re-submitted.

patch is attached and below.

diff --recursive --ignore-all-space --unified linux-2.6.2.o/drivers/scsi/megaraid.c linux-2.6.2.megaraid/drivers/scsi/megaraid.c
--- linux-2.6.2.o/drivers/scsi/megaraid.c	2004-02-20 01:32:21.000000000 +0100
+++ linux-2.6.2.megaraid/drivers/scsi/megaraid.c	2004-02-20 01:32:26.000000000 +0100
@@ -5119,10 +5119,6 @@
 	if (max_mbox_busy_wait > MBOX_BUSY_WAIT)
 		max_mbox_busy_wait = MBOX_BUSY_WAIT;
 
-	error = pci_module_init(&megaraid_pci_driver);
-	if (error) 
-		return error;
-	
 #ifdef CONFIG_PROC_FS
 	mega_proc_dir_entry = proc_mkdir("megaraid", &proc_root);
 	if (!mega_proc_dir_entry) {
@@ -5130,6 +5126,13 @@
 				"megaraid: failed to create megaraid root\n");
 	}
 #endif
+	error = pci_module_init(&megaraid_pci_driver);
+	if (error) {
+#ifdef CONFIG_PROC_FS
+		remove_proc_entry("megaraid", &proc_root);
+#endif
+		return error;
+	}
 
 	/*
 	 * Register the driver as a character device, for applications


[-- Attachment #2: 2-megaraid.init.patch --]
[-- Type: text/x-patch, Size: 917 bytes --]

diff --recursive --ignore-all-space --unified linux-2.6.2.o/drivers/scsi/megaraid.c linux-2.6.2.megaraid/drivers/scsi/megaraid.c
--- linux-2.6.2.o/drivers/scsi/megaraid.c	2004-02-20 01:32:21.000000000 +0100
+++ linux-2.6.2.megaraid/drivers/scsi/megaraid.c	2004-02-20 01:32:26.000000000 +0100
@@ -5119,10 +5119,6 @@
 	if (max_mbox_busy_wait > MBOX_BUSY_WAIT)
 		max_mbox_busy_wait = MBOX_BUSY_WAIT;
 
-	error = pci_module_init(&megaraid_pci_driver);
-	if (error) 
-		return error;
-	
 #ifdef CONFIG_PROC_FS
 	mega_proc_dir_entry = proc_mkdir("megaraid", &proc_root);
 	if (!mega_proc_dir_entry) {
@@ -5130,6 +5126,13 @@
 				"megaraid: failed to create megaraid root\n");
 	}
 #endif
+	error = pci_module_init(&megaraid_pci_driver);
+	if (error) {
+#ifdef CONFIG_PROC_FS
+		remove_proc_entry("megaraid", &proc_root);
+#endif
+		return error;
+	}
 
 	/*
 	 * Register the driver as a character device, for applications

                 reply	other threads:[~2004-02-20  2:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1077242759.12567.78.camel@morsel.kungfoocoder.org \
    --to=paul@kungfoocoder.org \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=akpm@osdl.org \
    --cc=atulm@lsil.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=torvalds@osdl.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