From: Niklas Cassel <cassel@kernel.org>
To: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Cc: "Krzysztof Wilczyński" <kw@linux.com>,
"Kishon Vijay Abraham I" <kishon@kernel.org>,
"Bjorn Helgaas" <bhelgaas@google.com>,
linux-pci@vger.kernel.org
Subject: Re: [PATCH] PCI: endpoint: pci-epf-test: Handle endianness properly
Date: Mon, 27 Jan 2025 16:55:44 +0100 [thread overview]
Message-ID: <Z5esgJXMAvORNA1N@ryzen> (raw)
In-Reply-To: <20250127062647.ehadg6ji53hkbsbf@thinkpad>
On Mon, Jan 27, 2025 at 11:56:47AM +0530, Manivannan Sadhasivam wrote:
> On Mon, Jan 20, 2025 at 12:50:10PM +0100, Niklas Cassel wrote:
> > The struct pci_epf_test_reg is the actual data in pci-epf-test's test_reg
> > BAR (usually BAR0), which the host uses to send commands (etc.), and which
> > pci-epf-test uses to send back status codes.
> >
> > pci-epf-test currently reads and writes this data without any endianness
> > conversion functions, which means that pci-epf-test is completely broken
> > on big-endian systems.
>
> Not a big deal, but I'd like to mention 'big-endian endpoint systems' to clarify
> the fact that the endianess issue is with the endpoint systems.
>
> >
> > PCI devices are inherently little-endian, and the data stored in the PCI
> > BARs should be in little-endian.
> >
> > Use endianness conversion functions when reading and writing data to
> > struct pci_epf_test_reg so that pci-epf-test will behave correctly on
> > big-endian systems.
> >
>
> Same here.
>
> > Signed-off-by: Niklas Cassel <cassel@kernel.org>
>
> Fixes: 349e7a85b25f ("PCI: endpoint: functions: Add an EP function to test PCI")
> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
>
> No need to respin, these can be ammended while applying.
Thank you for the review and review comments.
I'll send a V2 regardless, to make the life easier for the PCI maintainers.
(And update V1 as superseeded in patchwork.)
Kind regards,
Niklas
prev parent reply other threads:[~2025-01-27 15:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-20 11:50 [PATCH] PCI: endpoint: pci-epf-test: Handle endianness properly Niklas Cassel
2025-01-20 17:01 ` Frank Li
2025-01-27 6:26 ` Manivannan Sadhasivam
2025-01-27 15:55 ` Niklas Cassel [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=Z5esgJXMAvORNA1N@ryzen \
--to=cassel@kernel.org \
--cc=bhelgaas@google.com \
--cc=kishon@kernel.org \
--cc=kw@linux.com \
--cc=linux-pci@vger.kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.