]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: pci-bridge-emul: Fix big-endian support
authorGrzegorz Jaszczyk <jaz@semihalf.com>
Tue, 16 Jul 2019 12:13:46 +0000 (14:13 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 26 Sep 2021 12:07:04 +0000 (14:07 +0200)
commitfb05b359b1f64387350bb6f1f9302d192c160c6c
tree2acdda195a93f126a41d894416b4a44bd45d35d9
parent366d0d52c06f757d3de7e45567221568d8fa8a5e
PCI: pci-bridge-emul: Fix big-endian support

commit e0d9d30b73548fbfe5c024ed630169bdc9a08aee upstream.

Perform conversion to little-endian before every write to configuration
space and convert it back to CPU endianness on reads.

Additionally, initialise every multiple byte field of config space with
the cpu_to_le* macro, which is required since the structure describing
config space of emulated bridge assumes little-endian convention.

Signed-off-by: Grzegorz Jaszczyk <jaz@semihalf.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pci/pci-bridge-emul.c
drivers/pci/pci-bridge-emul.h