On Mon, Jul 15, 2019 at 04:16:17PM +0200, Grzegorz Jaszczyk wrote: > Perform conversion to little-endian before every write to configuration > space and converse back to cpu endianness during read. Additionally > initialise every not-byte wide fields of config space with proper > cpu_to_le* macro. > > This is required since the structure describing config space of emulated > bridge assumes little-endian convention. This is insufficient - pci-bridge-emul.h needs to be fixed up to use __le32 and __le16. It is a good idea to check such changes with sparse - a tool originally written by Linus, which is able to detect incorrect endian accesses (iow, access to LE members without using a LE accessor.) Such checks rely on using the right types. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up According to speedtest.net: 11.9Mbps down 500kbps up