Commit 77bba7aea7dc833caa34761fa7ce081a40a14493
1 parent
93f2e0259a
Exists in
master
and in
7 other branches
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>
Showing 2 changed files with 8 additions and 9 deletions Side-by-side Diff
drivers/ieee1394/sbp2.c
... | ... | @@ -118,14 +118,13 @@ |
118 | 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 | |
122 | - * down to us at a time (debugging). This might be necessary for very | |
123 | - * badly behaved sbp2 devices. | |
121 | + * Set serialize_io to 0 or N to use dynamically appended lists of command ORBs. | |
122 | + * This is and always has been buggy in multiple subtle ways. See above TODOs. | |
124 | 123 | */ |
125 | 124 | static int sbp2_serialize_io = 1; |
126 | -module_param_named(serialize_io, sbp2_serialize_io, int, 0444); | |
127 | -MODULE_PARM_DESC(serialize_io, "Serialize I/O coming from scsi drivers " | |
128 | - "(default = 1, faster = 0)"); | |
125 | +module_param_named(serialize_io, sbp2_serialize_io, bool, 0444); | |
126 | +MODULE_PARM_DESC(serialize_io, "Serialize requests coming from SCSI drivers " | |
127 | + "(default = Y, faster but buggy = N)"); | |
129 | 128 | |
130 | 129 | /* |
131 | 130 | * Bump up max_sectors if you'd like to support very large sized |
132 | 131 | |
... | ... | @@ -154,9 +153,9 @@ |
154 | 153 | * are possible on OXFW911 and newer Oxsemi bridges. |
155 | 154 | */ |
156 | 155 | static int sbp2_exclusive_login = 1; |
157 | -module_param_named(exclusive_login, sbp2_exclusive_login, int, 0644); | |
156 | +module_param_named(exclusive_login, sbp2_exclusive_login, bool, 0644); | |
158 | 157 | MODULE_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 | 161 | * If any of the following workarounds is required for your device to work, |
drivers/ieee1394/sbp2.h
... | ... | @@ -67,7 +67,7 @@ |
67 | 67 | #define ORB_SET_LUN(v) ((v) & 0xffff) |
68 | 68 | #define ORB_SET_FUNCTION(v) (((v) & 0xf) << 16) |
69 | 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 | 71 | #define ORB_SET_LOGIN_RESP_LENGTH(v) ((v) & 0xffff) |
72 | 72 | #define ORB_SET_PASSWD_LENGTH(v) (((v) & 0xffff) << 16) |
73 | 73 |