diff options
Diffstat (limited to 'drivers/ieee1394/sbp2.c')
| -rw-r--r-- | drivers/ieee1394/sbp2.c | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c index 875eadd5e8f5..3f873cc7e247 100644 --- a/drivers/ieee1394/sbp2.c +++ b/drivers/ieee1394/sbp2.c | |||
| @@ -194,6 +194,27 @@ MODULE_PARM_DESC(workarounds, "Work around device bugs (default = 0" | |||
| 194 | ", override internal blacklist = " __stringify(SBP2_WORKAROUND_OVERRIDE) | 194 | ", override internal blacklist = " __stringify(SBP2_WORKAROUND_OVERRIDE) |
| 195 | ", or a combination)"); | 195 | ", or a combination)"); |
| 196 | 196 | ||
| 197 | /* | ||
| 198 | * This influences the format of the sysfs attribute | ||
| 199 | * /sys/bus/scsi/devices/.../ieee1394_id. | ||
| 200 | * | ||
| 201 | * The default format is like in older kernels: %016Lx:%d:%d | ||
| 202 | * It contains the target's EUI-64, a number given to the logical unit by | ||
| 203 | * the ieee1394 driver's nodemgr (starting at 0), and the LUN. | ||
| 204 | * | ||
| 205 | * The long format is: %016Lx:%06x:%04x | ||
| 206 | * It contains the target's EUI-64, the unit directory's directory_ID as per | ||
| 207 | * IEEE 1212 clause 7.7.19, and the LUN. This format comes closest to the | ||
| 208 | * format of SBP(-3) target port and logical unit identifier as per SAM (SCSI | ||
| 209 | * Architecture Model) rev.2 to 4 annex A. Therefore and because it is | ||
| 210 | * independent of the implementation of the ieee1394 nodemgr, the longer format | ||
| 211 | * is recommended for future use. | ||
| 212 | */ | ||
| 213 | static int sbp2_long_sysfs_ieee1394_id; | ||
| 214 | module_param_named(long_ieee1394_id, sbp2_long_sysfs_ieee1394_id, bool, 0644); | ||
| 215 | MODULE_PARM_DESC(long_ieee1394_id, "8+3+2 bytes format of ieee1394_id in sysfs " | ||
| 216 | "(default = backwards-compatible = N, SAM-conforming = Y)"); | ||
| 217 | |||
| 197 | 218 | ||
| 198 | #define SBP2_INFO(fmt, args...) HPSB_INFO("sbp2: "fmt, ## args) | 219 | #define SBP2_INFO(fmt, args...) HPSB_INFO("sbp2: "fmt, ## args) |
| 199 | #define SBP2_ERR(fmt, args...) HPSB_ERR("sbp2: "fmt, ## args) | 220 | #define SBP2_ERR(fmt, args...) HPSB_ERR("sbp2: "fmt, ## args) |
| @@ -2100,8 +2121,14 @@ static ssize_t sbp2_sysfs_ieee1394_id_show(struct device *dev, | |||
| 2100 | if (!(lu = (struct sbp2_lu *)sdev->host->hostdata[0])) | 2121 | if (!(lu = (struct sbp2_lu *)sdev->host->hostdata[0])) |
| 2101 | return 0; | 2122 | return 0; |
| 2102 | 2123 | ||
| 2103 | return sprintf(buf, "%016Lx:%d:%d\n", (unsigned long long)lu->ne->guid, | 2124 | if (sbp2_long_sysfs_ieee1394_id) |
| 2104 | lu->ud->id, ORB_SET_LUN(lu->lun)); | 2125 | return sprintf(buf, "%016Lx:%06x:%04x\n", |
| 2126 | (unsigned long long)lu->ne->guid, | ||
| 2127 | lu->ud->directory_id, ORB_SET_LUN(lu->lun)); | ||
| 2128 | else | ||
| 2129 | return sprintf(buf, "%016Lx:%d:%d\n", | ||
| 2130 | (unsigned long long)lu->ne->guid, | ||
| 2131 | lu->ud->id, ORB_SET_LUN(lu->lun)); | ||
| 2105 | } | 2132 | } |
| 2106 | 2133 | ||
| 2107 | MODULE_AUTHOR("Ben Collins <bcollins@debian.org>"); | 2134 | MODULE_AUTHOR("Ben Collins <bcollins@debian.org>"); |
