aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394/nodemgr.c
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2007-05-27 07:17:15 -0400
committerStefan Richter <stefanr@s5r6.in-berlin.de>2007-05-31 15:40:13 -0400
commitd7794c86686a05276de42f145e485099426aca68 (patch)
treeb62da0b0424914f84f851887eec48ad8dfbf0421 /drivers/ieee1394/nodemgr.c
parenta52938f3e2e7c1dd2f00775016703991b7809c42 (diff)
ieee1394: sbp2: offer SAM-conforming target port ID in sysfs
With "modprobe sbp2 long_ieee1394_id=y", the format of /sys/bus/scsi/devices/*:*:*:*/ieee1394_id is changed from e.g. 0001041010004beb:0:0 to 0001041010004beb:00042c:0000. The longer format fully conforms to object identifier sizes as per SAM(-2...4) and reflects what the SAM target port identifier is meant to contain: A Discovery ID allegedly specified by ISO/IEC 13213:1994 --- however there is no such thing; the authors of SAM probably meant Directory ID). Especially target nodes with multiple dynamically added targets may use Directory IDs to persistently identify target ports. The new format is independent of implementation details of nodemgr. Thus the same ieee1394_id attribute format can be implemented in the new firewire stack. The ieee1394_id is typically used to create persistently named links in /dev/disk/by-id. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/ieee1394/nodemgr.c')
-rw-r--r--drivers/ieee1394/nodemgr.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c
index c291602a12d7..81b3864d2ba7 100644
--- a/drivers/ieee1394/nodemgr.c
+++ b/drivers/ieee1394/nodemgr.c
@@ -977,6 +977,7 @@ static struct unit_directory *nodemgr_process_unit_directory
977 ud->ne = ne; 977 ud->ne = ne;
978 ud->ignore_driver = ignore_drivers; 978 ud->ignore_driver = ignore_drivers;
979 ud->address = ud_kv->offset + CSR1212_REGISTER_SPACE_BASE; 979 ud->address = ud_kv->offset + CSR1212_REGISTER_SPACE_BASE;
980 ud->directory_id = ud->address & 0xffffff;
980 ud->ud_kv = ud_kv; 981 ud->ud_kv = ud_kv;
981 ud->id = (*id)++; 982 ud->id = (*id)++;
982 983
@@ -1085,6 +1086,10 @@ static struct unit_directory *nodemgr_process_unit_directory
1085 1086
1086 break; 1087 break;
1087 1088
1089 case CSR1212_KV_ID_DIRECTORY_ID:
1090 ud->directory_id = kv->value.immediate;
1091 break;
1092
1088 default: 1093 default:
1089 break; 1094 break;
1090 } 1095 }