ACK: [PATCH Vivid SRU] UBUNTU: SAUCE: ipr: Byte swapping for device_id attribute in sysfs
Brad Figg
brad.figg at canonical.com
Thu Aug 27 15:20:33 UTC 2015
On Thu, Aug 27, 2015 at 08:53:07AM -0600, tim.gardner at canonical.com wrote:
> From: Wen Xiong <wenxiong at linux.vnet.ibm.com>
>
> BugLink: http://bugs.launchpad.net/bugs/1453892
>
> Upstream
>
> 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 at linux.vnet.ibm.com>
> Signed-off-by: Brian King <brking at linux.vnet.ibm.com>
> Signed-off-by: James Bottomley <JBottomley at Odin.com>
> (cherry picked from linux-next commit bb8647e86e769bd45d2d5e010b3af516210d5760)
> Signed-off-by: Tim Gardner <tim.gardner at canonical.com>
> ---
> drivers/scsi/ipr.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
> index 9219953..b8171cc 100644
> --- a/drivers/scsi/ipr.c
> +++ b/drivers/scsi/ipr.c
> @@ -4440,7 +4440,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);
>
> --
> 1.9.1
>
>
> --
> kernel-team mailing list
> kernel-team at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
Looks good.
--
Brad Figg brad.figg at canonical.com http://www.canonical.com
More information about the kernel-team
mailing list