public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH][BUGFIX] : Megaraid patch for 2.6 2/5
@ 2004-02-20  2:06 Paul Wagland
  0 siblings, 0 replies; only message in thread
From: Paul Wagland @ 2004-02-20  2:06 UTC (permalink / raw)
  To: Linux SCSI mailing list, Linux kernel mailing list
  Cc: akpm, torvalds, James.Bottomley, atulm

[-- 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-02-20  2:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-20  2:06 [PATCH][BUGFIX] : Megaraid patch for 2.6 2/5 Paul Wagland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox