aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ipr.c
diff options
context:
space:
mode:
authorWen Xiong <wenxiong@linux.vnet.ibm.com>2015-06-11 20:45:18 -0500
committerJames Bottomley <JBottomley@Odin.com>2015-07-30 12:39:39 -0700
commitbb8647e86e769bd45d2d5e010b3af516210d5760 (patch)
treeabe2f51baed5656b33d1a4fc121bef4e06286439 /drivers/scsi/ipr.c
parentscsi: retry MODE SENSE on unit attention (diff)
downloadlinux-dev-bb8647e86e769bd45d2d5e010b3af516210d5760.tar.xz
linux-dev-bb8647e86e769bd45d2d5e010b3af516210d5760.zip
ipr: Byte swapping for device_id attribute in sysfs
On LE system, users see the wrong device_id attribute. This patch does necessary byte swapping for device_id attribute and works on both of LE and BE systems. Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com> Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Diffstat (limited to 'drivers/scsi/ipr.c')
-rw-r--r--drivers/scsi/ipr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index a9aa38903efe..15da7544177c 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -4455,7 +4455,7 @@ static ssize_t ipr_show_device_id(struct device *dev, struct device_attribute *a
spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags);
res = (struct ipr_resource_entry *)sdev->hostdata;
if (res && ioa_cfg->sis64)
- len = snprintf(buf, PAGE_SIZE, "0x%llx\n", res->dev_id);
+ len = snprintf(buf, PAGE_SIZE, "0x%llx\n", be64_to_cpu(res->dev_id));
else if (res)
len = snprintf(buf, PAGE_SIZE, "0x%llx\n", res->lun_wwn);