Message ID | 1455229475-3984-1-git-send-email-tyreld@linux.vnet.ibm.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
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>
>>>>> "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.
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)) {
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(-)