From: Michael Ellerman <patch-notifications@ellerman•id.au>
To: Greg Kurz <groug@kaod•org>, linuxppc-dev@lists•ozlabs.org
Cc: Andrew Donnellan <andrew.donnellan@au1•ibm.com>,
Frederic Barrat <fbarrat@linux•vnet.ibm.com>,
Christophe Lombard <clombard@linux•vnet.ibm.com>,
stable@vger•kernel.org, Vaibhav Jain <vaibhav@linux•vnet.ibm.com>
Subject: Re: [v2] ocxl: Fix endiannes bug in read_afu_name()
Date: Mon, 24 Dec 2018 00:28:01 +1100 (AEDT) [thread overview]
Message-ID: <43N38K5zbLz9sNm@ozlabs.org> (raw)
In-Reply-To: <154455110114.974105.12136076223072629095.stgit@bahia.lan>
On Tue, 2018-12-11 at 17:58:21 UTC, Greg Kurz wrote:
> The AFU Descriptor Template in the PCI config space has a Name Space
> field which is a 24 Byte ASCII character string of descriptive name
> space for the AFU. The OCXL driver read the string four characters at
> a time with pci_read_config_dword().
>
> This optimization is valid on a little-endian system since this is PCI,
> but a big-endian system ends up with each subset of four characters in
> reverse order.
>
> This could be fixed by switching to read characters one by one. Another
> option is to swap the bytes if we're big-endian.
>
> Go for the latter with le32_to_cpu().
>
> Cc: stable@vger•kernel.org # v4.16
> Signed-off-by: Greg Kurz <groug@kaod•org>
> Acked-by: Frederic Barrat <fbarrat@linux•ibm.com>
> Acked-by: Andrew Donnellan <andrew.donnellan@au1•ibm.com>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/2f07229f02d4c55affccd11a61af4f
cheers
prev parent reply other threads:[~2018-12-23 13:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-11 17:58 [PATCH v2] ocxl: Fix endiannes bug in read_afu_name() Greg Kurz
2018-12-12 2:26 ` Andrew Donnellan
2018-12-20 14:53 ` Greg Kurz
2018-12-23 13:28 ` Michael Ellerman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43N38K5zbLz9sNm@ozlabs.org \
--to=patch-notifications@ellerman$(echo .)id.au \
--cc=andrew.donnellan@au1$(echo .)ibm.com \
--cc=clombard@linux$(echo .)vnet.ibm.com \
--cc=fbarrat@linux$(echo .)vnet.ibm.com \
--cc=groug@kaod$(echo .)org \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=stable@vger$(echo .)kernel.org \
--cc=vaibhav@linux$(echo .)vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox