aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2007-06-17 17:54:52 -0400
committerStefan Richter <stefanr@s5r6.in-berlin.de>2007-07-09 18:07:41 -0400
commit77bba7aea7dc833caa34761fa7ce081a40a14493 (patch)
tree7ccb9af9ad981ede46ffc8043c69749b50fa6c54 /drivers/ieee1394
parent93f2e0259a76ceb9c598d5af382aecbb2df01c51 (diff)
ieee1394: sbp2: change some module parameters from int to bool
This is upwards compatible, except that integer values other than 0 or 1 are no longer accepted. But values like "Y", "N", "no", "nnoooh!" work now. Also, improve a comment on the serialize_io parameter and make the ORB_SET_EXCLUSIVE macro ultra-safe. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/ieee1394')
-rw-r--r--drivers/ieee1394/sbp2.c15
-rw-r--r--drivers/ieee1394/sbp2.h2
2 files changed, 8 insertions, 9 deletions
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c
index 3f873cc7e247..e0c385a3b450 100644
--- a/drivers/ieee1394/sbp2.c
+++ b/drivers/ieee1394/sbp2.c
@@ -118,14 +118,13 @@ MODULE_PARM_DESC(max_speed, "Force max speed "
118 "(3 = 800Mb/s, 2 = 400Mb/s, 1 = 200Mb/s, 0 = 100Mb/s)"); 118 "(3 = 800Mb/s, 2 = 400Mb/s, 1 = 200Mb/s, 0 = 100Mb/s)");
119 119
120/* 120/*
121 * Set serialize_io to 1 if you'd like only one scsi command sent 121 * Set serialize_io to 0 or N to use dynamically appended lists of command ORBs.
122 * down to us at a time (debugging). This might be necessary for very 122 * This is and always has been buggy in multiple subtle ways. See above TODOs.
123 * badly behaved sbp2 devices.
124 */ 123 */
125static int sbp2_serialize_io = 1; 124static int sbp2_serialize_io = 1;
126module_param_named(serialize_io, sbp2_serialize_io, int, 0444); 125module_param_named(serialize_io, sbp2_serialize_io, bool, 0444);
127MODULE_PARM_DESC(serialize_io, "Serialize I/O coming from scsi drivers " 126MODULE_PARM_DESC(serialize_io, "Serialize requests coming from SCSI drivers "
128 "(default = 1, faster = 0)"); 127 "(default = Y, faster but buggy = N)");
129 128
130/* 129/*
131 * Bump up max_sectors if you'd like to support very large sized 130 * Bump up max_sectors if you'd like to support very large sized
@@ -154,9 +153,9 @@ MODULE_PARM_DESC(max_sectors, "Change max sectors per I/O supported "
154 * are possible on OXFW911 and newer Oxsemi bridges. 153 * are possible on OXFW911 and newer Oxsemi bridges.
155 */ 154 */
156static int sbp2_exclusive_login = 1; 155static int sbp2_exclusive_login = 1;
157module_param_named(exclusive_login, sbp2_exclusive_login, int, 0644); 156module_param_named(exclusive_login, sbp2_exclusive_login, bool, 0644);
158MODULE_PARM_DESC(exclusive_login, "Exclusive login to sbp2 device " 157MODULE_PARM_DESC(exclusive_login, "Exclusive login to sbp2 device "
159 "(default = 1)"); 158 "(default = Y, use N for concurrent initiators)");
160 159
161/* 160/*
162 * If any of the following workarounds is required for your device to work, 161 * If any of the following workarounds is required for your device to work,
diff --git a/drivers/ieee1394/sbp2.h b/drivers/ieee1394/sbp2.h
index 44402b9d82a8..333a4bb76743 100644
--- a/drivers/ieee1394/sbp2.h
+++ b/drivers/ieee1394/sbp2.h
@@ -67,7 +67,7 @@ struct sbp2_command_orb {
67#define ORB_SET_LUN(v) ((v) & 0xffff) 67#define ORB_SET_LUN(v) ((v) & 0xffff)
68#define ORB_SET_FUNCTION(v) (((v) & 0xf) << 16) 68#define ORB_SET_FUNCTION(v) (((v) & 0xf) << 16)
69#define ORB_SET_RECONNECT(v) (((v) & 0xf) << 20) 69#define ORB_SET_RECONNECT(v) (((v) & 0xf) << 20)
70#define ORB_SET_EXCLUSIVE(v) (((v) & 0x1) << 28) 70#define ORB_SET_EXCLUSIVE(v) ((v) ? 1 << 28 : 0)
71#define ORB_SET_LOGIN_RESP_LENGTH(v) ((v) & 0xffff) 71#define ORB_SET_LOGIN_RESP_LENGTH(v) ((v) & 0xffff)
72#define ORB_SET_PASSWD_LENGTH(v) (((v) & 0xffff) << 16) 72#define ORB_SET_PASSWD_LENGTH(v) (((v) & 0xffff) << 16)
73 73