summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorNiklas Cassel <cassel@kernel.org>2025-01-27 17:12:42 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-04-10 14:44:19 +0200
commit1a5add27dc16d5ee2b95655023c89a3d9fa04c08 (patch)
tree0bbcd2564efa9c01ba15d8a258aa994b266c8167 /arch
parentad59a93b8e35dce1c9f0af6ef011d066c3f1709d (diff)
downloadlinux-1a5add27dc16d5ee2b95655023c89a3d9fa04c08.tar.gz
linux-1a5add27dc16d5ee2b95655023c89a3d9fa04c08.tar.bz2
linux-1a5add27dc16d5ee2b95655023c89a3d9fa04c08.zip
PCI: endpoint: pci-epf-test: Handle endianness properly
[ Upstream commit 3c936e0ec0e412a3ce6072883da8682fb723d573 ] 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@nxp.com> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Niklas Cassel <cassel@kernel.org> Link: https://lore.kernel.org/r/20250127161242.104651-2-cassel@kernel.org Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Krzysztof WilczyƄski <kwilczynski@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions