Add 'this_id' host attribute
PATCH 1/1 Add 'this_id' host attribute
To be able to calculate the TransportID for SPI we need to detect the SCSI ID of the initiator. The 'this_id' field of the scsi host structure carries this information, so we should export it via sysfs.
Signed-off-by Hannes Reinecke <[email protected]>
--- drivers/scsi/scsi_sysfs.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/scsi/scsi_sysfs.c +2 -0
@@ -245,6 +245,7 @@ show_shost_active_mode(struct device *dev, static DEVICE_ATTR(active_mode, S_IRUGO | S_IWUSR, show_shost_active_mode, NULL);shost_rd_attr (unique_id,"%u\n" ); +shost_rd_attr (this_id,"%u\n" );shost_rd_attr (host_busy,"%hu\n" );shost_rd_attr (cmd_per_lun,"%hd\n" );shost_rd_attr (can_queue,"%hd\n" );
@@ -256,6 +257,7 @@ shost_rd_attr2(proc_name, hostt->proc_name, "%s\n");static struct attribute *scsi_sysfs_shost_attrs[] = { &dev_attr_unique_id.attr, + &dev_attr_this_id.attr, &dev_attr_host_busy.attr, &dev_attr_cmd_per_lun.attr, &dev_attr_can_queue.attr,
Signature · 1 line
1.5.3.2