Re: [PATCH v2] PCI: endpoint: pci-epf-test: Handle endianness properly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 10, 2025 at 11:28:50AM +0100, Niklas Cassel wrote:
> On Mon, Jan 27, 2025 at 05:12:42PM +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 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 endpoint systems.
> > 
> > Fixes: 349e7a85b25f ("PCI: endpoint: functions: Add an EP function to test PCI")
> > Reviewed-by: Frank Li <Frank.Li@xxxxxxx>
> > Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
> > Signed-off-by: Niklas Cassel <cassel@xxxxxxxxxx>
> > ---
> 
> Hello PCI maintainers,
> 
> Could this patch please be picked up ASAP?
> 
> The reason is that all other patches for this driver will conflict with
> this change, e.g. Frank's series.
> 
> So in order to be nice to other people, so that they do not need to rebase
> their series more than necessary, it would be nice to merge this ASAP.
> 

I waited for Krzysztof, but ended up applying myself.

Applied to pci/endpoint!

- Mani

-- 
மணிவண்ணன் சதாசிவம்




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux