public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 10/20] lpfc: Fix provide host name and OS name in RSNN-NN FC-GS command
@ 2015-04-07 19:07 James Smart
  2015-04-14 22:02 ` Sebastian Herbszt
  0 siblings, 1 reply; 5+ messages in thread
From: James Smart @ 2015-04-07 19:07 UTC (permalink / raw)
  To: linux-scsi


Fix provide host name and OS name in RSNN-NN FC-GS command

Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
---
 drivers/scsi/lpfc/lpfc_ct.c | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_ct.c b/drivers/scsi/lpfc/lpfc_ct.c
index 61a32cd..5fb431a 100644
--- a/drivers/scsi/lpfc/lpfc_ct.c
+++ b/drivers/scsi/lpfc/lpfc_ct.c
@@ -1074,8 +1074,25 @@ lpfc_vport_symbolic_node_name(struct lpfc_vport *vport, char *symbol,
 
 	lpfc_decode_firmware_rev(vport->phba, fwrev, 0);
 
-	n = snprintf(symbol, size, "Emulex %s FV%s DV%s",
-		vport->phba->ModelName, fwrev, lpfc_release_version);
+	n = snprintf(symbol, size, "Emulex %s", vport->phba->ModelName);
+
+	if (size < n)
+		return n;
+	n += snprintf(symbol + n, size - n, " FV%s", fwrev);
+
+	if (size < n)
+		return n;
+	n += snprintf(symbol + n, size - n, " DV%s", lpfc_release_version);
+
+	if (size < n)
+		return n;
+	n += snprintf(symbol + n, size - n, " HN:%s", init_utsname()->nodename);
+
+	/* Note :- OS name is "Linux" */
+	if (size < n)
+		return n;
+	n += snprintf(symbol + n, size - n, " OS:%s", init_utsname()->sysname);
+
 	return n;
 }
 
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v3 10/20] lpfc: Fix provide host name and OS name in RSNN-NN FC-GS command
  2015-04-07 19:07 [PATCH v3 10/20] lpfc: Fix provide host name and OS name in RSNN-NN FC-GS command James Smart
@ 2015-04-14 22:02 ` Sebastian Herbszt
  2015-04-18 15:40   ` James Smart
  0 siblings, 1 reply; 5+ messages in thread
From: Sebastian Herbszt @ 2015-04-14 22:02 UTC (permalink / raw)
  To: James Smart; +Cc: linux-scsi, Sebastian Herbszt

James Smart wrote:
> 
> Fix provide host name and OS name in RSNN-NN FC-GS command
> 
> Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com>
> Signed-off-by: James Smart <james.smart@emulex.com>
> ---
>  drivers/scsi/lpfc/lpfc_ct.c | 21 +++++++++++++++++++--
>  1 file changed, 19 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/lpfc/lpfc_ct.c b/drivers/scsi/lpfc/lpfc_ct.c
> index 61a32cd..5fb431a 100644
> --- a/drivers/scsi/lpfc/lpfc_ct.c
> +++ b/drivers/scsi/lpfc/lpfc_ct.c
> @@ -1074,8 +1074,25 @@ lpfc_vport_symbolic_node_name(struct lpfc_vport *vport, char *symbol,
>  
>  	lpfc_decode_firmware_rev(vport->phba, fwrev, 0);
>  
> -	n = snprintf(symbol, size, "Emulex %s FV%s DV%s",
> -		vport->phba->ModelName, fwrev, lpfc_release_version);
> +	n = snprintf(symbol, size, "Emulex %s", vport->phba->ModelName);
> +
> +	if (size < n)
> +		return n;
> +	n += snprintf(symbol + n, size - n, " FV%s", fwrev);
> +
> +	if (size < n)
> +		return n;
> +	n += snprintf(symbol + n, size - n, " DV%s", lpfc_release_version);
> +
> +	if (size < n)
> +		return n;
> +	n += snprintf(symbol + n, size - n, " HN:%s", init_utsname()->nodename);
> +
> +	/* Note :- OS name is "Linux" */
> +	if (size < n)
> +		return n;
> +	n += snprintf(symbol + n, size - n, " OS:%s", init_utsname()->sysname);
> +
>  	return n;
>  }

Does this actually "fix" anything? If not maybe drop "fix" from the
patch subject and description.

Sebastian

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v3 10/20] lpfc: Fix provide host name and OS name in RSNN-NN FC-GS command
  2015-04-14 22:02 ` Sebastian Herbszt
@ 2015-04-18 15:40   ` James Smart
  2015-04-21 23:15     ` Sebastian Herbszt
  0 siblings, 1 reply; 5+ messages in thread
From: James Smart @ 2015-04-18 15:40 UTC (permalink / raw)
  To: Sebastian Herbszt; +Cc: linux-scsi

Fixes those things that parse the result of what data is registered with 
the fabric.

-- james


On 4/14/2015 6:02 PM, Sebastian Herbszt wrote:
> James Smart wrote:
>> Fix provide host name and OS name in RSNN-NN FC-GS command
>>
>> Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com>
>> Signed-off-by: James Smart <james.smart@emulex.com>
>> ---
>>   drivers/scsi/lpfc/lpfc_ct.c | 21 +++++++++++++++++++--
>>   1 file changed, 19 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/scsi/lpfc/lpfc_ct.c b/drivers/scsi/lpfc/lpfc_ct.c
>> index 61a32cd..5fb431a 100644
>> --- a/drivers/scsi/lpfc/lpfc_ct.c
>> +++ b/drivers/scsi/lpfc/lpfc_ct.c
>> @@ -1074,8 +1074,25 @@ lpfc_vport_symbolic_node_name(struct lpfc_vport *vport, char *symbol,
>>   
>>   	lpfc_decode_firmware_rev(vport->phba, fwrev, 0);
>>   
>> -	n = snprintf(symbol, size, "Emulex %s FV%s DV%s",
>> -		vport->phba->ModelName, fwrev, lpfc_release_version);
>> +	n = snprintf(symbol, size, "Emulex %s", vport->phba->ModelName);
>> +
>> +	if (size < n)
>> +		return n;
>> +	n += snprintf(symbol + n, size - n, " FV%s", fwrev);
>> +
>> +	if (size < n)
>> +		return n;
>> +	n += snprintf(symbol + n, size - n, " DV%s", lpfc_release_version);
>> +
>> +	if (size < n)
>> +		return n;
>> +	n += snprintf(symbol + n, size - n, " HN:%s", init_utsname()->nodename);
>> +
>> +	/* Note :- OS name is "Linux" */
>> +	if (size < n)
>> +		return n;
>> +	n += snprintf(symbol + n, size - n, " OS:%s", init_utsname()->sysname);
>> +
>>   	return n;
>>   }
> Does this actually "fix" anything? If not maybe drop "fix" from the
> patch subject and description.
>
> Sebastian
>
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v3 10/20] lpfc: Fix provide host name and OS name in RSNN-NN FC-GS command
  2015-04-18 15:40   ` James Smart
@ 2015-04-21 23:15     ` Sebastian Herbszt
  2015-04-22  0:40       ` James Smart
  0 siblings, 1 reply; 5+ messages in thread
From: Sebastian Herbszt @ 2015-04-21 23:15 UTC (permalink / raw)
  To: james.smart; +Cc: linux-scsi, Sebastian Herbszt

James Smart wrote:
> Fixes those things that parse the result of what data is registered with 
> the fabric.
> 
> -- james

Any particular "thing" you got on your mind?
qla2xxx does not provide this information (yet).

Sebastian

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH v3 10/20] lpfc: Fix provide host name and OS name in RSNN-NN FC-GS command
  2015-04-21 23:15     ` Sebastian Herbszt
@ 2015-04-22  0:40       ` James Smart
  0 siblings, 0 replies; 5+ messages in thread
From: James Smart @ 2015-04-22  0:40 UTC (permalink / raw)
  To: Sebastian Herbszt; +Cc: linux-scsi@vger.kernel.org

Primarily emulex applications that display san connectivity.  There are also some Switch mgmt suites that at least display this information. Not sure how much they act on it.

-- james s


________________________________________
From: Sebastian Herbszt [herbszt@gmx.de]
Sent: Tuesday, April 21, 2015 7:15 PM
To: James Smart
Cc: linux-scsi@vger.kernel.org; Sebastian Herbszt
Subject: Re: [PATCH v3 10/20] lpfc: Fix provide host name and OS name in RSNN-NN FC-GS command

James Smart wrote:
> Fixes those things that parse the result of what data is registered with
> the fabric.
>
> -- james

Any particular "thing" you got on your mind?
qla2xxx does not provide this information (yet).

Sebastian

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-04-22  0:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-07 19:07 [PATCH v3 10/20] lpfc: Fix provide host name and OS name in RSNN-NN FC-GS command James Smart
2015-04-14 22:02 ` Sebastian Herbszt
2015-04-18 15:40   ` James Smart
2015-04-21 23:15     ` Sebastian Herbszt
2015-04-22  0:40       ` James Smart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox