diff options
Diffstat (limited to 'drivers/ieee1394/sbp2.c')
-rw-r--r-- | drivers/ieee1394/sbp2.c | 46 |
1 files changed, 36 insertions, 10 deletions
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c index ce86ff226a28..e882cb951b47 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 | */ |
125 | static int sbp2_serialize_io = 1; | 124 | static int sbp2_serialize_io = 1; |
126 | module_param_named(serialize_io, sbp2_serialize_io, int, 0444); | 125 | module_param_named(serialize_io, sbp2_serialize_io, bool, 0444); |
127 | MODULE_PARM_DESC(serialize_io, "Serialize I/O coming from scsi drivers " | 126 | MODULE_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 | */ |
156 | static int sbp2_exclusive_login = 1; | 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 | MODULE_PARM_DESC(exclusive_login, "Exclusive login to sbp2 device " | 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 | * 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, |
@@ -194,6 +193,27 @@ MODULE_PARM_DESC(workarounds, "Work around device bugs (default = 0" | |||
194 | ", override internal blacklist = " __stringify(SBP2_WORKAROUND_OVERRIDE) | 193 | ", override internal blacklist = " __stringify(SBP2_WORKAROUND_OVERRIDE) |
195 | ", or a combination)"); | 194 | ", or a combination)"); |
196 | 195 | ||
196 | /* | ||
197 | * This influences the format of the sysfs attribute | ||
198 | * /sys/bus/scsi/devices/.../ieee1394_id. | ||
199 | * | ||
200 | * The default format is like in older kernels: %016Lx:%d:%d | ||
201 | * It contains the target's EUI-64, a number given to the logical unit by | ||
202 | * the ieee1394 driver's nodemgr (starting at 0), and the LUN. | ||
203 | * | ||
204 | * The long format is: %016Lx:%06x:%04x | ||
205 | * It contains the target's EUI-64, the unit directory's directory_ID as per | ||
206 | * IEEE 1212 clause 7.7.19, and the LUN. This format comes closest to the | ||
207 | * format of SBP(-3) target port and logical unit identifier as per SAM (SCSI | ||
208 | * Architecture Model) rev.2 to 4 annex A. Therefore and because it is | ||
209 | * independent of the implementation of the ieee1394 nodemgr, the longer format | ||
210 | * is recommended for future use. | ||
211 | */ | ||
212 | static int sbp2_long_sysfs_ieee1394_id; | ||
213 | module_param_named(long_ieee1394_id, sbp2_long_sysfs_ieee1394_id, bool, 0644); | ||
214 | MODULE_PARM_DESC(long_ieee1394_id, "8+3+2 bytes format of ieee1394_id in sysfs " | ||
215 | "(default = backwards-compatible = N, SAM-conforming = Y)"); | ||
216 | |||
197 | 217 | ||
198 | #define SBP2_INFO(fmt, args...) HPSB_INFO("sbp2: "fmt, ## args) | 218 | #define SBP2_INFO(fmt, args...) HPSB_INFO("sbp2: "fmt, ## args) |
199 | #define SBP2_ERR(fmt, args...) HPSB_ERR("sbp2: "fmt, ## args) | 219 | #define SBP2_ERR(fmt, args...) HPSB_ERR("sbp2: "fmt, ## args) |
@@ -2033,8 +2053,14 @@ static ssize_t sbp2_sysfs_ieee1394_id_show(struct device *dev, | |||
2033 | if (!(lu = (struct sbp2_lu *)sdev->host->hostdata[0])) | 2053 | if (!(lu = (struct sbp2_lu *)sdev->host->hostdata[0])) |
2034 | return 0; | 2054 | return 0; |
2035 | 2055 | ||
2036 | return sprintf(buf, "%016Lx:%d:%d\n", (unsigned long long)lu->ne->guid, | 2056 | if (sbp2_long_sysfs_ieee1394_id) |
2037 | lu->ud->id, ORB_SET_LUN(lu->lun)); | 2057 | return sprintf(buf, "%016Lx:%06x:%04x\n", |
2058 | (unsigned long long)lu->ne->guid, | ||
2059 | lu->ud->directory_id, ORB_SET_LUN(lu->lun)); | ||
2060 | else | ||
2061 | return sprintf(buf, "%016Lx:%d:%d\n", | ||
2062 | (unsigned long long)lu->ne->guid, | ||
2063 | lu->ud->id, ORB_SET_LUN(lu->lun)); | ||
2038 | } | 2064 | } |
2039 | 2065 | ||
2040 | MODULE_AUTHOR("Ben Collins <bcollins@debian.org>"); | 2066 | MODULE_AUTHOR("Ben Collins <bcollins@debian.org>"); |