Thread: [Linux1394-cvslog] rev 846 - trunk
Brought to you by:
aeb,
bencollins
From: SVN U. <ben...@li...> - 2003-03-19 19:20:23
|
Author: bencollins Date: 2003-03-19 14:19:33 -0500 (Wed, 19 Mar 2003) New Revision: 846 Modified: trunk/csr.c trunk/ieee1394_core.c trunk/nodemgr.c trunk/ohci1394.c trunk/pcilynx.c trunk/sbp2.c Log: Convert to new module_param() interface since MODULE_PARM() is not deprecated. Modified: trunk/ieee1394_core.c ============================================================================== --- trunk/ieee1394_core.c (original) +++ trunk/ieee1394_core.c 2003-03-19 14:19:35.000000000 -0500 @@ -28,6 +28,7 @@ #include <linux/slab.h> #include <linux/interrupt.h> #include <linux/module.h> +#include <linux/moduleparam.h> #include <linux/proc_fs.h> #include <linux/bitops.h> #include <asm/byteorder.h> @@ -48,9 +49,9 @@ /* * Disable the nodemgr detection and config rom reading functionality. */ -MODULE_PARM(disable_nodemgr, "i"); -MODULE_PARM_DESC(disable_nodemgr, "Disable nodemgr functionality."); static int disable_nodemgr = 0; +module_param(disable_nodemgr, int, 0444); +MODULE_PARM_DESC(disable_nodemgr, "Disable nodemgr functionality."); /* We are GPL, so treat us special */ MODULE_LICENSE("GPL"); Modified: trunk/ohci1394.c ============================================================================== --- trunk/ohci1394.c (original) +++ trunk/ohci1394.c 2003-03-19 14:19:35.000000000 -0500 @@ -90,6 +90,7 @@ #include <linux/wait.h> #include <linux/errno.h> #include <linux/module.h> +#include <linux/moduleparam.h> #include <linux/pci.h> #include <linux/fs.h> #include <linux/poll.h> @@ -163,9 +164,9 @@ "$Rev$ Ben Collins <bco...@de...>"; /* Module Parameters */ -MODULE_PARM(phys_dma,"i"); -MODULE_PARM_DESC(phys_dma, "Enable physical dma (default = 1)."); static int phys_dma = 1; +module_param(phys_dma, int, 0644); +MODULE_PARM_DESC(phys_dma, "Enable physical dma (default = 1)."); static void dma_trm_tasklet(unsigned long data); static void dma_trm_reset(struct dma_trm_ctx *d); Modified: trunk/nodemgr.c ============================================================================== --- trunk/nodemgr.c (original) +++ trunk/nodemgr.c 2003-03-19 14:19:35.000000000 -0500 @@ -31,9 +31,12 @@ #include "nodemgr.h" -#if 1 +#if BUS_ID_SIZE >= 20 +#define FW_BUS_ID_FMT "%016Lx" +#define FW_BUS_ID_ARGS(__hi, __ne) (unsigned long long)(__ne->guid) +#elif 1 #define FW_BUS_ID_FMT "%012Lx" -#define FW_BUS_ID_ARGS(__hi, __ne) (unsigned long long)(__ne->guid & 0xffffffffffffL) +#define FW_BUS_ID_ARGS(__hi, __ne) (unsigned long long)__ne->guid & 0xffffffffffffLL #else #define FW_BUS_ID_FMT "%d-" NODE_BUS_FMT #define FW_BUS_ID_ARGS(__hi, __ne) __hi->id, NODE_BUS_ARGS(__ne->nodeid) Modified: trunk/sbp2.c ============================================================================== --- trunk/sbp2.c (original) +++ trunk/sbp2.c 2003-03-19 14:19:35.000000000 -0500 @@ -33,16 +33,16 @@ * * Module Load Options: * - * sbp2_max_speed - Force max speed allowed - * (2 = 400mb, 1 = 200mb, 0 = 100mb. default = 2) - * sbp2_serialize_io - Serialize all I/O coming down from the scsi drivers - * (0 = deserialized, 1 = serialized, default = 0) - * sbp2_max_sectors, - Change max sectors per I/O supported (default = 255) - * sbp2_exclusive_login - Set to zero if you'd like to allow multiple hosts the ability - * to log in at the same time. Sbp2 device must support this, - * and you must know what you're doing (default = 1) + * max_speed - Force max speed allowed + * (2 = 400mb, 1 = 200mb, 0 = 100mb. default = 2) + * serialize_io - Serialize all I/O coming down from the scsi drivers + * (0 = deserialized, 1 = serialized, default = 0) + * max_sectors, - Change max sectors per I/O supported (default = 255) + * exclusive_login - Set to zero if you'd like to allow multiple hosts the ability + * to log in at the same time. Sbp2 device must support this, + * and you must know what you're doing (default = 1) * - * (e.g. insmod sbp2 sbp2_serialize_io = 1) + * (e.g. insmod sbp2 sbp2.serialize_io = 1) * * * Current Support: @@ -236,7 +236,7 @@ * * New packet dump debug define (CONFIG_IEEE1394_SBP2_PACKET_DUMP) which allows * dumping of all sbp2 related packets sent and received. Especially effective * when phys dma is disabled on ohci controller (e.g. insmod ohci1394 phys_dma=0). - * * Added new sbp2 module load option (sbp2_exclusive_login) for allowing + * * Added new sbp2 module load option (exclusive_login) for allowing * non-exclusive login to sbp2 device, for special multi-host applications. * 04/23/02 - Fix for Sony CD-ROM drives. Only send fetch agent reset to sbp2 device if it * returns the dead bit in status. Thanks to Chandan (ch...@to...) for this one. @@ -263,6 +263,7 @@ #include <linux/fs.h> #include <linux/poll.h> #include <linux/module.h> +#include <linux/moduleparam.h> #include <linux/types.h> #include <linux/delay.h> #include <linux/sched.h> @@ -304,7 +305,7 @@ */ /* - * Change sbp2_max_speed on module load if you have a bad IEEE-1394 + * Change max_speed on module load if you have a bad IEEE-1394 * controller that has trouble running 2KB packets at 400mb. * * NOTE: On certain OHCI parts I have seen short packets on async transmit @@ -312,34 +313,34 @@ * bump down the speed if you are running into problems. * * Valid values: - * sbp2_max_speed = 2 (default: max speed 400mb) - * sbp2_max_speed = 1 (max speed 200mb) - * sbp2_max_speed = 0 (max speed 100mb) + * max_speed = 2 (default: max speed 400mb) + * max_speed = 1 (max speed 200mb) + * max_speed = 0 (max speed 100mb) */ -MODULE_PARM(sbp2_max_speed,"i"); -MODULE_PARM_DESC(sbp2_max_speed, "Force max speed (2 = 400mb default, 1 = 200mb, 0 = 100mb)"); -static int sbp2_max_speed = SPEED_400; +static int max_speed = SPEED_400; +module_param(max_speed, int, 0644); +MODULE_PARM_DESC(max_speed, "Force max speed (2 = 400mb default, 1 = 200mb, 0 = 100mb)"); /* - * Set sbp2_serialize_io to 1 if you'd like only one scsi command sent + * Set serialize_io to 1 if you'd like only one scsi command sent * down to us at a time (debugging). This might be necessary for very * badly behaved sbp2 devices. */ -MODULE_PARM(sbp2_serialize_io,"i"); -MODULE_PARM_DESC(sbp2_serialize_io, "Serialize all I/O coming down from the scsi drivers (default = 0)"); -static int sbp2_serialize_io = 0; /* serialize I/O - available for debugging purposes */ +static int serialize_io = 0; +module_param(serialize_io, int, 0444); +MODULE_PARM_DESC(serialize_io, "Serialize all I/O coming down from the scsi drivers (default = 0)"); /* - * Bump up sbp2_max_sectors if you'd like to support very large sized + * Bump up max_sectors if you'd like to support very large sized * transfers. Please note that some older sbp2 bridge chips are broken for * transfers greater or equal to 128KB. Default is a value of 255 * sectors, or just under 128KB (at 512 byte sector size). I can note that * the Oxsemi sbp2 chipsets have no problems supporting very large * transfer sizes. */ -MODULE_PARM(sbp2_max_sectors,"i"); -MODULE_PARM_DESC(sbp2_max_sectors, "Change max sectors per I/O supported (default = 255)"); -static int sbp2_max_sectors = SBP2_MAX_SECTORS; +static int max_sectors = SBP2_MAX_SECTORS; +module_param(max_sectors, int, 0444); +MODULE_PARM_DESC(max_sectors, "Change max sectors per I/O supported (default = 255)"); /* * Exclusive login to sbp2 device? In most cases, the sbp2 driver should @@ -348,13 +349,13 @@ * etc.). If you're running an sbp2 device that supports multiple logins, * and you're either running read-only filesystems or some sort of special * filesystem supporting multiple hosts (one such filesystem is OpenGFS, - * see opengfs.sourceforge.net for more info), then set sbp2_exclusive_login + * see opengfs.sourceforge.net for more info), then set exclusive_login * to zero. Note: The Oxsemi OXFW911 sbp2 chipset supports up to four * concurrent logins. */ -MODULE_PARM(sbp2_exclusive_login,"i"); -MODULE_PARM_DESC(sbp2_exclusive_login, "Exclusive login to sbp2 device (default = 1)"); -static int sbp2_exclusive_login = 1; +static int exclusive_login = 1; +module_param(exclusive_login, int, 0644); +MODULE_PARM_DESC(exclusive_login, "Exclusive login to sbp2 device (default = 1)"); /* * SCSI inquiry hack for really badly behaved sbp2 devices. Turn this on @@ -362,13 +363,13 @@ * This hack makes the inquiry look more like a typical MS Windows * inquiry. * - * If sbp2_force_inquiry_hack=1 is required for your device to work, + * If force_inquiry_hack=1 is required for your device to work, * please submit the logged sbp2_firmware_revision value of this device to * the linux1394-devel mailing list. */ -MODULE_PARM(sbp2_force_inquiry_hack,"i"); -MODULE_PARM_DESC(sbp2_force_inquiry_hack, "Force SCSI inquiry hack (default = 0)"); -static int sbp2_force_inquiry_hack = 0; +static int force_inquiry_hack = 0; +module_param(force_inquiry_hack, int, 0444); +MODULE_PARM_DESC(force_inquiry_hack, "Force SCSI inquiry hack (default = 0)"); /* @@ -635,7 +636,7 @@ unsigned long flags, orbs; struct sbp2_command_info *command; - orbs = sbp2_serialize_io ? 2 : SBP2_MAX_COMMAND_ORBS; + orbs = serialize_io ? 2 : SBP2_MAX_COMMAND_ORBS; spin_lock_irqsave(&scsi_id->sbp2_command_orb_lock, flags); for (i = 0; i < orbs; i++) { @@ -1325,7 +1326,7 @@ scsi_id->login_orb->lun_misc = ORB_SET_FUNCTION(LOGIN_REQUEST); scsi_id->login_orb->lun_misc |= ORB_SET_RECONNECT(0); /* One second reconnect time */ - scsi_id->login_orb->lun_misc |= ORB_SET_EXCLUSIVE(sbp2_exclusive_login); /* Exclusive access to device */ + scsi_id->login_orb->lun_misc |= ORB_SET_EXCLUSIVE(exclusive_login); /* Exclusive access to device */ scsi_id->login_orb->lun_misc |= ORB_SET_NOTIFY(1); /* Notify us of login complete */ /* Set the lun if we were able to pull it from the device's unit directory */ if (scsi_id->sbp2_device_type_and_lun != SBP2_DEVICE_TYPE_LUN_UNINITIALIZED) { @@ -1673,7 +1674,7 @@ /* Firmware revision */ scsi_id->sbp2_firmware_revision = CONFIG_ROM_VALUE(ud->quadlets[i]); - if (sbp2_force_inquiry_hack) + if (force_inquiry_hack) SBP2_INFO("sbp2_firmware_revision = %x", (unsigned int) scsi_id->sbp2_firmware_revision); else SBP2_DEBUG("sbp2_firmware_revision = %x", @@ -1691,20 +1692,20 @@ /* If the vendor id is 0xa0b8 (Symbios vendor id), then we have a * bridge with 128KB max transfer size limitation. For sanity, we - * only voice this when the current sbp2_max_sectors setting + * only voice this when the current max_sectors setting * exceeds the 128k limit. By default, that is not the case. * * It would be really nice if we could detect this before the scsi * host gets initialized. That way we can down-force the - * sbp2_max_sectors to account for it. That is not currently + * max_sectors to account for it. That is not currently * possible. */ if ((scsi_id->sbp2_firmware_revision & 0xffff00) == SBP2_128KB_BROKEN_FIRMWARE && - (sbp2_max_sectors * 512) > (128*1024)) { + (max_sectors * 512) > (128*1024)) { SBP2_WARN("Node " NODE_BUS_FMT ": Bridge only supports 128KB max transfer size.", NODE_BUS_ARGS(scsi_id->ne->nodeid)); - SBP2_WARN("WARNING: Current sbp2_max_sectors setting is larger than 128KB (%d sectors)!", - sbp2_max_sectors); + SBP2_WARN("WARNING: Current max_sectors setting is larger than 128KB (%d sectors)!", + max_sectors); scsi_id->workarounds |= SBP2_BREAKAGE_128K_MAX_TRANSFER; } @@ -1742,8 +1743,8 @@ + NODEID_TO_NODE(scsi_id->ne->nodeid)]; /* Bump down our speed if the user requested it */ - if (scsi_id->speed_code > sbp2_max_speed) { - scsi_id->speed_code = sbp2_max_speed; + if (scsi_id->speed_code > max_speed) { + scsi_id->speed_code = max_speed; SBP2_ERR("Forcing SBP-2 max speed down to %s", hpsb_speedto_str[scsi_id->speed_code]); } @@ -2193,7 +2194,7 @@ * reject this inquiry command. Fix the request_bufflen. */ if (*cmd == INQUIRY) { - if (sbp2_force_inquiry_hack || scsi_id->workarounds & SBP2_BREAKAGE_INQUIRY_HACK) + if (force_inquiry_hack || scsi_id->workarounds & SBP2_BREAKAGE_INQUIRY_HACK) request_bufflen = cmd[4] = 0x24; else request_bufflen = cmd[4]; @@ -2935,10 +2936,10 @@ SPRINTF("Driver version : %s\n", version); SPRINTF("\nModule options :\n"); - SPRINTF(" sbp2_max_speed : %s\n", hpsb_speedto_str[sbp2_max_speed]); - SPRINTF(" sbp2_max_sectors : %d\n", sbp2_max_sectors); - SPRINTF(" sbp2_serialize_io : %s\n", sbp2_serialize_io ? "yes" : "no"); - SPRINTF(" sbp2_exclusive_login : %s\n", sbp2_exclusive_login ? "yes" : "no"); + SPRINTF(" max_speed : %s\n", hpsb_speedto_str[max_speed]); + SPRINTF(" max_sectors : %d\n", max_sectors); + SPRINTF(" serialize_io : %s\n", serialize_io ? "yes" : "no"); + SPRINTF(" exclusive_login : %s\n", exclusive_login ? "yes" : "no"); SPRINTF("\nAttached devices : %s\n", !list_empty(&host->my_devices) ? "" : "none"); @@ -3009,7 +3010,7 @@ /* Module load debug option to force one command at a time * (serializing I/O) */ - if (sbp2_serialize_io) { + if (serialize_io) { SBP2_ERR("Driver forced to serialize I/O (serialize_io = 1)"); scsi_driver_template.can_queue = 1; scsi_driver_template.cmd_per_lun = 1; @@ -3018,7 +3019,7 @@ /* * Set max sectors (module load option). Default is 255 sectors. */ - scsi_driver_template.max_sectors = sbp2_max_sectors; + scsi_driver_template.max_sectors = max_sectors; /* Modified: trunk/pcilynx.c ============================================================================== --- trunk/pcilynx.c (original) +++ trunk/pcilynx.c 2003-03-19 14:19:35.000000000 -0500 @@ -37,6 +37,7 @@ #include <linux/wait.h> #include <linux/errno.h> #include <linux/module.h> +#include <linux/moduleparam.h> #include <linux/init.h> #include <linux/pci.h> #include <linux/fs.h> @@ -71,8 +72,8 @@ /* Module Parameters */ -MODULE_PARM(skip_eeprom,"i"); -MODULE_PARM_DESC(skip_eeprom, "Do not try to read bus info block from serial eeprom, but user generic one (default = 0)."); +module_param(skip_eeprom, int, 0444); +MODULE_PARM_DESC(skip_eeprom, "Use generic bus info block instead of serial eeprom (default = 0)."); static int skip_eeprom = 0; @@ -981,8 +982,9 @@ * on performance - the value 2400 was found by experiment and may not work * everywhere as good as here - use mem_mindma option for modules to change */ -short mem_mindma = 2400; -MODULE_PARM(mem_mindma, "h"); +static short mem_mindma = 2400; +module_param(mem_mindma, short, 0444); +MODULE_PARM_DESC(mem_mindma, "Minimum amount of data required to use DMA"); static ssize_t mem_dmaread(struct memdata *md, u32 physbuf, ssize_t count, int offset) Modified: trunk/csr.c ============================================================================== --- trunk/csr.c (original) +++ trunk/csr.c 2003-03-19 14:19:35.000000000 -0500 @@ -18,7 +18,8 @@ */ #include <linux/string.h> -#include <linux/module.h> /* needed for MODULE_PARM */ +#include <linux/module.h> +#include <linux/moduleparam.h> #include "ieee1394_types.h" #include "hosts.h" @@ -27,9 +28,10 @@ /* Module Parameters */ /* this module parameter can be used to disable mapping of the FCP registers */ -MODULE_PARM(fcp,"i"); -MODULE_PARM_DESC(fcp, "Map FCP registers (default = 1, disable = 0)."); + static int fcp = 1; +module_param(fcp, int, 0444); +MODULE_PARM_DESC(fcp, "Map FCP registers (default = 1, disable = 0)."); static u16 csr_crc16(unsigned *data, int length) { |