scsi_debug version 1.67 for lk 2.5.52
PATCH 1/1 scsi_debug version 1.67 for lk 2.5.52
This patch uses the module_param() facility introduced in lk 2.5.52 (see linux/moduleparam.h) to simplify boot time and module load time parameters for the scsi_debug driver.
The intent of module_param() is to unify
- boot time parameters
- module load time parameters
- sysfs driver parameters
into a few simple calls (seen from the driver's point of view). The sysfs capability hasn't been implemented yet. Using module_param() removes over 100 lines of boilerplate code from the scsi_debug driver.
Following the conventions suggested by Rusty, scsi_debug's kernel boot time options have been changed to this form:
scsi_debug.num_devs=2
while the module load options are now like this:
modprobe scsi_debug num_devs=2
This patch also updates the Kconfig entry for the scsi_debug driver.
Doug Gilbert
drivers/scsi/Kconfig_2552mp renamed from drivers/scsi/Kconfig +10 -16
@@ -1550,24 +1550,18 @@ say M here and read <file:Documentation/modules.txt>. The module will be called nsp32.o. -# -# Note - this is a very special 'host' adapter that simulates the presence of some disks. -# It can come in very handy for troubleshooting. Anyone else is welcome to use it - all -# you do is hack it to simulate the condition you want to test for, and then use it. -# -# The actual configuration in any kernel release could change at any time as I hack it to -# simulate various conditions that I am testing. -# config SCSI_DEBUG - tristate "SCSI debugging host simulator (EXPERIMENTAL)" - depends on EXPERIMENTAL && SCSI + tristate "SCSI debugging host simulator" + depends on SCSI help - This is a host adapter simulator that can be programmed to simulate - a large number of conditions that could occur on a real bus. The - advantage is that many hard to reproduce problems can be tested in a - controlled environment where there is reduced risk of losing - important data. This is primarily of use to people trying to debug - the middle and upper layers of the SCSI subsystem. If unsure, say N. + This is a host adapter simulator that can simulate multiple hosts + each with multiple dummy SCSI devices (disks). It defaults to one + host adapter with one dummy SCSI disk. Each dummy disk uses kernel + RAM as storage (i.e. it is a ramdisk). To save space when multiple + dummy disks are simulated, they share the same kernel RAM for + their storage. See http://www.torque.net/sg/sdebug.html for more + information. This driver is primarily of use to those testing the + SCSI and block subsystems. If unsure, say N. config SCSI_MESH tristate "MESH (Power Mac internal SCSI) support"
drivers/scsi/scsi_debug.c2552mp renamed from drivers/scsi/scsi_debug.c +28 -152
221 lines not on this page · raw message
In message <[email protected]> you write:
Quoted 3 lines
This patch uses the
module_param()facility introduced in lk 2.5.52 (seelinux/moduleparam.h) to simplify boot time and module load time parameters for thescsi_debugdriver.
This is great. The question remains of what to do with MODULE_PARM_DESC(), currently an empty macro.
Reverting them to be stored in ".modinfo" section as was done previously is trivial, but as they are now also boot parameters, which points to a DocBook-style solution.
The same arguments apply to MODULE_AUTHOR, and MODULE_DESCRIPTION.
Preferences anyone?
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.