ibmvfc: byteswap scsi_id, wwpn, and node_name prior to logging
authorTyrel Datwyler <tyreld@linux.vnet.ibm.com>
Thu, 11 Feb 2016 22:24:35 +0000 (16:24 -0600)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 24 Feb 2016 02:27:02 +0000 (21:27 -0500)
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>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ibmvscsi/ibmvfc.c

index 6aa317c303e2dced686c76cc1102e563b4f058b1..fc523c3e50191a428d0125d948d9e2447ce6e53f 100644 (file)
@@ -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)) {