scsi: ibmvfc: Byte swap login_buf.resp values in attribute show functions
authorTyrel Datwyler <tyreld@linux.ibm.com>
Tue, 17 Nov 2020 18:50:29 +0000 (12:50 -0600)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 20 Nov 2020 03:04:12 +0000 (22:04 -0500)
commit61bdb4eec8d1efc0dc3259d8392e43e20a01deae
tree839e3f7025696a2da733458773cd9dc4e07de212
parent3754cde8df9106bda396b2956ea6f9758e26b25e
scsi: ibmvfc: Byte swap login_buf.resp values in attribute show functions

Both ibmvfc_show_host_(capabilities|npiv_version) functions retrieve values
from vhost->login_buf.resp buffer. This is the MAD response buffer from the
VIOS and as such any multi-byte non-string values are in big endian format.

Byte swap these values to host CPU endian format for better human
readability.

Link: https://lore.kernel.org/r/20201117185031.129939-1-tyreld@linux.ibm.com
Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ibmvscsi/ibmvfc.c