]> 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)
commit422eb28f5c0fc8df0f802ab60d39383a2f4a79e4
tree2acdda195a93f126a41d894416b4a44bd45d35d9
parent975cdda559045efb6fe2c006f874b98fae8c9987
PCI: pci-bridge-emul: Fix big-endian support

commit c6a366aa0ca167e99a3968e86029897c75a2f2e4 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