提交 77bba7ae 编写于 作者: S Stefan Richter

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: NStefan Richter <stefanr@s5r6.in-berlin.de>
上级 93f2e025
...@@ -118,14 +118,13 @@ MODULE_PARM_DESC(max_speed, "Force max speed " ...@@ -118,14 +118,13 @@ MODULE_PARM_DESC(max_speed, "Force max speed "
"(3 = 800Mb/s, 2 = 400Mb/s, 1 = 200Mb/s, 0 = 100Mb/s)"); "(3 = 800Mb/s, 2 = 400Mb/s, 1 = 200Mb/s, 0 = 100Mb/s)");
/* /*
* Set serialize_io to 1 if you'd like only one scsi command sent * Set serialize_io to 0 or N to use dynamically appended lists of command ORBs.
* down to us at a time (debugging). This might be necessary for very * This is and always has been buggy in multiple subtle ways. See above TODOs.
* badly behaved sbp2 devices.
*/ */
static int sbp2_serialize_io = 1; static int sbp2_serialize_io = 1;
module_param_named(serialize_io, sbp2_serialize_io, int, 0444); module_param_named(serialize_io, sbp2_serialize_io, bool, 0444);
MODULE_PARM_DESC(serialize_io, "Serialize I/O coming from scsi drivers " MODULE_PARM_DESC(serialize_io, "Serialize requests coming from SCSI drivers "
"(default = 1, faster = 0)"); "(default = Y, faster but buggy = N)");
/* /*
* Bump up max_sectors if you'd like to support very large sized * 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,9 +153,9 @@ MODULE_PARM_DESC(max_sectors, "Change max sectors per I/O supported "
* are possible on OXFW911 and newer Oxsemi bridges. * are possible on OXFW911 and newer Oxsemi bridges.
*/ */
static int sbp2_exclusive_login = 1; static int sbp2_exclusive_login = 1;
module_param_named(exclusive_login, sbp2_exclusive_login, int, 0644); module_param_named(exclusive_login, sbp2_exclusive_login, bool, 0644);
MODULE_PARM_DESC(exclusive_login, "Exclusive login to sbp2 device " MODULE_PARM_DESC(exclusive_login, "Exclusive login to sbp2 device "
"(default = 1)"); "(default = Y, use N for concurrent initiators)");
/* /*
* If any of the following workarounds is required for your device to work, * If any of the following workarounds is required for your device to work,
......
...@@ -67,7 +67,7 @@ struct sbp2_command_orb { ...@@ -67,7 +67,7 @@ struct sbp2_command_orb {
#define ORB_SET_LUN(v) ((v) & 0xffff) #define ORB_SET_LUN(v) ((v) & 0xffff)
#define ORB_SET_FUNCTION(v) (((v) & 0xf) << 16) #define ORB_SET_FUNCTION(v) (((v) & 0xf) << 16)
#define ORB_SET_RECONNECT(v) (((v) & 0xf) << 20) #define ORB_SET_RECONNECT(v) (((v) & 0xf) << 20)
#define ORB_SET_EXCLUSIVE(v) (((v) & 0x1) << 28) #define ORB_SET_EXCLUSIVE(v) ((v) ? 1 << 28 : 0)
#define ORB_SET_LOGIN_RESP_LENGTH(v) ((v) & 0xffff) #define ORB_SET_LOGIN_RESP_LENGTH(v) ((v) & 0xffff)
#define ORB_SET_PASSWD_LENGTH(v) (((v) & 0xffff) << 16) #define ORB_SET_PASSWD_LENGTH(v) (((v) & 0xffff) << 16)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册