* [PATCHv2] scsi_transport_sas: add 'scsi_target_id' sysfs attribute
@ 2016-03-14 9:43 Hannes Reinecke
2016-03-14 9:46 ` Johannes Thumshirn
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Hannes Reinecke @ 2016-03-14 9:43 UTC (permalink / raw)
To: Martin K. Petersen
Cc: Christoph Hellwig, Manoj Kumar, James Bottomley, linux-scsi,
Hannes Reinecke, Hannes Reinecke
There is no way to detect the scsi_target_id for any given SAS
remote port, so add a new sysfs attribute 'scsi_target_id'.
Signed-off-by: Hannes Reinecke <hare@suse.com>
---
drivers/scsi/scsi_sas_internal.h | 2 +-
drivers/scsi/scsi_transport_sas.c | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/scsi_sas_internal.h b/drivers/scsi/scsi_sas_internal.h
index 6266a5d..e659912 100644
--- a/drivers/scsi/scsi_sas_internal.h
+++ b/drivers/scsi/scsi_sas_internal.h
@@ -4,7 +4,7 @@
#define SAS_HOST_ATTRS 0
#define SAS_PHY_ATTRS 17
#define SAS_PORT_ATTRS 1
-#define SAS_RPORT_ATTRS 7
+#define SAS_RPORT_ATTRS 8
#define SAS_END_DEV_ATTRS 5
#define SAS_EXPANDER_ATTRS 7
diff --git a/drivers/scsi/scsi_transport_sas.c b/drivers/scsi/scsi_transport_sas.c
index 80520e2..b6f958193 100644
--- a/drivers/scsi/scsi_transport_sas.c
+++ b/drivers/scsi/scsi_transport_sas.c
@@ -1286,6 +1286,7 @@ sas_rphy_protocol_attr(identify.target_port_protocols, target_port_protocols);
sas_rphy_simple_attr(identify.sas_address, sas_address, "0x%016llx\n",
unsigned long long);
sas_rphy_simple_attr(identify.phy_identifier, phy_identifier, "%d\n", u8);
+sas_rphy_simple_attr(scsi_target_id, scsi_target_id, "%d\n", u32);
/* only need 8 bytes of data plus header (4 or 8) */
#define BUF_SIZE 64
@@ -1886,6 +1887,7 @@ sas_attach_transport(struct sas_function_template *ft)
SETUP_RPORT_ATTRIBUTE(rphy_device_type);
SETUP_RPORT_ATTRIBUTE(rphy_sas_address);
SETUP_RPORT_ATTRIBUTE(rphy_phy_identifier);
+ SETUP_RPORT_ATTRIBUTE(rphy_scsi_target_id);
SETUP_OPTIONAL_RPORT_ATTRIBUTE(rphy_enclosure_identifier,
get_enclosure_identifier);
SETUP_OPTIONAL_RPORT_ATTRIBUTE(rphy_bay_identifier,
--
1.8.5.6
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCHv2] scsi_transport_sas: add 'scsi_target_id' sysfs attribute
2016-03-14 9:43 [PATCHv2] scsi_transport_sas: add 'scsi_target_id' sysfs attribute Hannes Reinecke
@ 2016-03-14 9:46 ` Johannes Thumshirn
2016-03-14 13:44 ` Manoj Kumar
2016-03-14 20:16 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Johannes Thumshirn @ 2016-03-14 9:46 UTC (permalink / raw)
To: Hannes Reinecke
Cc: Martin K. Petersen, Christoph Hellwig, Manoj Kumar,
James Bottomley, linux-scsi, Hannes Reinecke
On Mon, Mar 14, 2016 at 10:43:08AM +0100, Hannes Reinecke wrote:
> There is no way to detect the scsi_target_id for any given SAS
> remote port, so add a new sysfs attribute 'scsi_target_id'.
>
> Signed-off-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
--
Johannes Thumshirn Storage
jthumshirn@suse.de +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCHv2] scsi_transport_sas: add 'scsi_target_id' sysfs attribute
2016-03-14 9:43 [PATCHv2] scsi_transport_sas: add 'scsi_target_id' sysfs attribute Hannes Reinecke
2016-03-14 9:46 ` Johannes Thumshirn
@ 2016-03-14 13:44 ` Manoj Kumar
2016-03-14 20:16 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Manoj Kumar @ 2016-03-14 13:44 UTC (permalink / raw)
To: Hannes Reinecke, Martin K. Petersen
Cc: Christoph Hellwig, James Bottomley, linux-scsi, Hannes Reinecke
Hannes:
Thanks for correcting the last argument.
Reviewed-by: Manoj Kumar <manoj@linux.vnet.ibm.com>
---
Manoj Kumar
On 3/14/2016 4:43 AM, Hannes Reinecke wrote:
> There is no way to detect the scsi_target_id for any given SAS
> remote port, so add a new sysfs attribute 'scsi_target_id'.
>
> Signed-off-by: Hannes Reinecke <hare@suse.com>
> ---
> drivers/scsi/scsi_sas_internal.h | 2 +-
> drivers/scsi/scsi_transport_sas.c | 2 ++
> 2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/scsi_sas_internal.h b/drivers/scsi/scsi_sas_internal.h
> index 6266a5d..e659912 100644
> --- a/drivers/scsi/scsi_sas_internal.h
> +++ b/drivers/scsi/scsi_sas_internal.h
> @@ -4,7 +4,7 @@
> #define SAS_HOST_ATTRS 0
> #define SAS_PHY_ATTRS 17
> #define SAS_PORT_ATTRS 1
> -#define SAS_RPORT_ATTRS 7
> +#define SAS_RPORT_ATTRS 8
> #define SAS_END_DEV_ATTRS 5
> #define SAS_EXPANDER_ATTRS 7
>
> diff --git a/drivers/scsi/scsi_transport_sas.c b/drivers/scsi/scsi_transport_sas.c
> index 80520e2..b6f958193 100644
> --- a/drivers/scsi/scsi_transport_sas.c
> +++ b/drivers/scsi/scsi_transport_sas.c
> @@ -1286,6 +1286,7 @@ sas_rphy_protocol_attr(identify.target_port_protocols, target_port_protocols);
> sas_rphy_simple_attr(identify.sas_address, sas_address, "0x%016llx\n",
> unsigned long long);
> sas_rphy_simple_attr(identify.phy_identifier, phy_identifier, "%d\n", u8);
> +sas_rphy_simple_attr(scsi_target_id, scsi_target_id, "%d\n", u32);
>
> /* only need 8 bytes of data plus header (4 or 8) */
> #define BUF_SIZE 64
> @@ -1886,6 +1887,7 @@ sas_attach_transport(struct sas_function_template *ft)
> SETUP_RPORT_ATTRIBUTE(rphy_device_type);
> SETUP_RPORT_ATTRIBUTE(rphy_sas_address);
> SETUP_RPORT_ATTRIBUTE(rphy_phy_identifier);
> + SETUP_RPORT_ATTRIBUTE(rphy_scsi_target_id);
> SETUP_OPTIONAL_RPORT_ATTRIBUTE(rphy_enclosure_identifier,
> get_enclosure_identifier);
> SETUP_OPTIONAL_RPORT_ATTRIBUTE(rphy_bay_identifier,
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCHv2] scsi_transport_sas: add 'scsi_target_id' sysfs attribute
2016-03-14 9:43 [PATCHv2] scsi_transport_sas: add 'scsi_target_id' sysfs attribute Hannes Reinecke
2016-03-14 9:46 ` Johannes Thumshirn
2016-03-14 13:44 ` Manoj Kumar
@ 2016-03-14 20:16 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2016-03-14 20:16 UTC (permalink / raw)
To: Hannes Reinecke
Cc: Martin K. Petersen, Christoph Hellwig, Manoj Kumar,
James Bottomley, linux-scsi, Hannes Reinecke
>>>>> "Hannes" == Hannes Reinecke <hare@suse.de> writes:
Hannes> There is no way to detect the scsi_target_id for any given SAS
Hannes> remote port, so add a new sysfs attribute 'scsi_target_id'.
Applied to 4.6/scsi-queue.
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-03-14 20:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-14 9:43 [PATCHv2] scsi_transport_sas: add 'scsi_target_id' sysfs attribute Hannes Reinecke
2016-03-14 9:46 ` Johannes Thumshirn
2016-03-14 13:44 ` Manoj Kumar
2016-03-14 20:16 ` Martin K. Petersen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.