All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ibmvfc: byteswap scsi_id, wwpn, and node_name prior to logging
@ 2016-02-11 22:24 Tyrel Datwyler
  2016-02-12  8:19   ` Johannes Thumshirn
  2016-02-17 23:30 ` Martin K. Petersen
  0 siblings, 2 replies; 4+ messages in thread
From: Tyrel Datwyler @ 2016-02-11 22:24 UTC (permalink / raw)
  To: james.bottomley
  Cc: martin.petersen, linux-scsi, linuxppc-dev, brking, nfont, Tyrel Datwyler

When logging async events the scsi_id, wwpn, and node_name values
are used directly from the CRQ struct which are of type __be64. This
can be confusing to someone looking through the log on a LE system.
Instead byteswap these values to host endian prior to logging.

Signed-off-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
---
 drivers/scsi/ibmvscsi/ibmvfc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c
index 6aa317c..fc523c3 100644
--- a/drivers/scsi/ibmvscsi/ibmvfc.c
+++ b/drivers/scsi/ibmvscsi/ibmvfc.c
@@ -2636,7 +2636,8 @@ static void ibmvfc_handle_async(struct ibmvfc_async_crq *crq,
 	struct ibmvfc_target *tgt;
 
 	ibmvfc_log(vhost, desc->log_level, "%s event received. scsi_id: %llx, wwpn: %llx,"
-		   " node_name: %llx%s\n", desc->desc, crq->scsi_id, crq->wwpn, crq->node_name,
+		   " node_name: %llx%s\n", desc->desc, be64_to_cpu(crq->scsi_id),
+		   be64_to_cpu(crq->wwpn), be64_to_cpu(crq->node_name),
 		   ibmvfc_get_link_state(crq->link_state));
 
 	switch (be64_to_cpu(crq->event)) {
-- 
2.5.0


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

* Re: [PATCH] ibmvfc: byteswap scsi_id, wwpn, and node_name prior to logging
  2016-02-11 22:24 [PATCH] ibmvfc: byteswap scsi_id, wwpn, and node_name prior to logging Tyrel Datwyler
@ 2016-02-12  8:19   ` Johannes Thumshirn
  2016-02-17 23:30 ` Martin K. Petersen
  1 sibling, 0 replies; 4+ messages in thread
From: Johannes Thumshirn @ 2016-02-12  8:19 UTC (permalink / raw)
  To: Tyrel Datwyler
  Cc: james.bottomley, martin.petersen, linux-scsi, linuxppc-dev,
	brking, nfont

On Thu, Feb 11, 2016 at 04:24:35PM -0600, Tyrel Datwyler wrote:
> When logging async events the scsi_id, wwpn, and node_name values
> are used directly from the CRQ struct which are of type __be64. This
> can be confusing to someone looking through the log on a LE system.
> Instead byteswap these values to host endian prior to logging.
> 
> Signed-off-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.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: [PATCH] ibmvfc: byteswap scsi_id, wwpn, and node_name prior to logging
@ 2016-02-12  8:19   ` Johannes Thumshirn
  0 siblings, 0 replies; 4+ messages in thread
From: Johannes Thumshirn @ 2016-02-12  8:19 UTC (permalink / raw)
  To: Tyrel Datwyler
  Cc: james.bottomley, martin.petersen, linux-scsi, linuxppc-dev,
	brking, nfont

On Thu, Feb 11, 2016 at 04:24:35PM -0600, Tyrel Datwyler wrote:
> When logging async events the scsi_id, wwpn, and node_name values
> are used directly from the CRQ struct which are of type __be64. This
> can be confusing to someone looking through the log on a LE system.
> Instead byteswap these values to host endian prior to logging.
> 
> Signed-off-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.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

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

* Re: [PATCH] ibmvfc: byteswap scsi_id, wwpn, and node_name prior to logging
  2016-02-11 22:24 [PATCH] ibmvfc: byteswap scsi_id, wwpn, and node_name prior to logging Tyrel Datwyler
  2016-02-12  8:19   ` Johannes Thumshirn
@ 2016-02-17 23:30 ` Martin K. Petersen
  1 sibling, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2016-02-17 23:30 UTC (permalink / raw)
  To: Tyrel Datwyler
  Cc: james.bottomley, martin.petersen, linux-scsi, linuxppc-dev,
	brking, nfont

>>>>> "Tyrel" == Tyrel Datwyler <tyreld@linux.vnet.ibm.com> writes:

Tyrel> When logging async events the scsi_id, wwpn, and node_name values
Tyrel> are used directly from the CRQ struct which are of type
Tyrel> __be64. This can be confusing to someone looking through the log
Tyrel> on a LE system.  Instead byteswap these values to host endian
Tyrel> prior to logging.

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-02-17 23:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-11 22:24 [PATCH] ibmvfc: byteswap scsi_id, wwpn, and node_name prior to logging Tyrel Datwyler
2016-02-12  8:19 ` Johannes Thumshirn
2016-02-12  8:19   ` Johannes Thumshirn
2016-02-17 23:30 ` 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.