public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sym53c8xx module parameter passing not working (2.5.6)
@ 2004-10-01 15:26 Heinzmann, Robert
  2004-10-01 15:29 ` Christoph Hellwig
  2004-10-01 21:11 ` [PATCH] sym53c8xx module parameter passing not working (2.5.6) Matthew Wilcox
  0 siblings, 2 replies; 9+ messages in thread
From: Heinzmann, Robert @ 2004-10-01 15:26 UTC (permalink / raw)
  To: linux-scsi

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

Hello, 

attached there is a patch that fixes the module parameter passing with
sym53c8xx_2. This is for SLES9 SuSE kernel, but it is so small that it
should apply for other kernels too.

Regards, 

Robert Heinzmann

------------------------------------------------------------------------
COMPUTER CONCEPT 
CC Computersysteme und Kommunikationstechnik GmbH 
Robert Heinzmann
Wiener Str. 114 - 116		Email:	heinzmann@cc-dresden.de
01219 Dresden			Telefon:	+49 (0)351/8 76 92-0
					Telefax:	+49 (0)351/8 76
92-99
					Internet:
http://www.cc-dresden.de
------------------------------------------------------------------------


[-- Attachment #2: sym53c8xx_2-module_param_handling_fix.2.6.5-7.97-default.diff --]
[-- Type: application/octet-stream, Size: 1427 bytes --]

--- linux/drivers/scsi/sym53c8xx_2/sym_glue.c.orig	2004-09-29 16:54:16.000000000 +0200
+++ linux/drivers/scsi/sym53c8xx_2/sym_glue.c	2004-10-01 17:11:29.093154424 +0200
@@ -1899,10 +1899,11 @@
 
 static struct sym_driver_setup
 	sym_driver_safe_setup __initdata = SYM_LINUX_DRIVER_SAFE_SETUP;
-#ifdef	MODULE
-char *sym53c8xx = 0;	/* command line passed by insmod */
-MODULE_PARM(sym53c8xx, "s");
-#endif
+/*
+ *  Proper module parameter handling in 2.6
+ */
+char *sym53c8xx = "sym53c8xx                                                              ";	/* command line passed by insmod */
+module_param(sym53c8xx, charp, 0);
 
 #define OPT_MAX_TAG		1
 #define OPT_BURST_ORDER		2
@@ -2404,6 +2405,10 @@
 
 static int __init sym2_init(void)
 {
+	#ifdef MODULE 
+	if (sym53c8xx)
+	        sym53c8xx_setup(sym53c8xx);
+	#endif
 	pci_register_driver(&sym2_driver);
 	return 0;
 }
--- linux/drivers/scsi/sym53c8xx_2/sym_glue.h.orig	2004-09-29 16:55:03.000000000 +0200
+++ linux/drivers/scsi/sym53c8xx_2/sym_glue.h	2004-10-01 17:08:18.941061936 +0200
@@ -61,6 +61,15 @@
 #include <linux/timer.h>
 #include <linux/types.h>
 
+/* Proper module parameter passing in 2.6 */
+#ifndef LINUX_VERSION_CODE
+#include <linux/version.h>
+#endif /* LINUX_VERSION_CODE */
+
+#if defined(MODULE) && LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
+#include <linux/moduleparam.h>
+#endif 
+
 #include <asm/io.h>
 #ifdef __sparc__
 #  include <asm/irq.h>

[-- Attachment #3: sym53c8xx_2-module_param_handling_fix.2.6.5-7.97-default.Readme.txt --]
[-- Type: text/plain, Size: 353 bytes --]

The 2.6 version of sym53c8xx_2 did not read the module command line parameter properly. 
This was due to a missing call to sym53c8xx_setup().

This fix includes: 
- added missing call to sym53c8xx_setup()
- introduces proper 2.6 module_param() handling
  (changed MODULE_PARM to module_param());

Robert Heinzmann (Heinzmann@cc-dresden.de)



^ permalink raw reply	[flat|nested] 9+ messages in thread
* RE: [PATCH] sym53c8xx module parameter passing not working (2.5.6)
@ 2004-10-01 15:45 Heinzmann, Robert
  0 siblings, 0 replies; 9+ messages in thread
From: Heinzmann, Robert @ 2004-10-01 15:45 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-scsi

Hello Christoph, 

> Given that no one except you noticed the lack of options so 
> far what about moving it to normal parameters instead, aka 
> one option per setting like all non-scsi and resent scsi drivers do?

The options are usually required for multi initiator configurations with
sym53c8xx only, which is not so common. Thus I just wrote this litte
(dirty ?) fix. Moving to normal parameters is something that should be
done, but I'm currently not able to do this :) If everything is beeing
moved to normal parameters, the documentation needs to be fixed too.

I think the current fix is sufficient, considering the installation base
of multi initiator sym53c8xx clusters.

Robert Heinzmann

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2004-10-08 14:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-01 15:26 [PATCH] sym53c8xx module parameter passing not working (2.5.6) Heinzmann, Robert
2004-10-01 15:29 ` Christoph Hellwig
2004-10-01 16:55   ` Matthew Wilcox
2004-10-08  1:30     ` Matthew Wilcox
2004-10-08  2:29       ` Rusty Russell
2004-10-08 14:39         ` New-style module parameters in SCSI drivers Matthew Wilcox
2004-10-01 21:11 ` [PATCH] sym53c8xx module parameter passing not working (2.5.6) Matthew Wilcox
2004-10-01 21:28   ` Randy.Dunlap
  -- strict thread matches above, loose matches on Subject: below --
2004-10-01 15:45 Heinzmann, Robert

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