linux-stable/drivers/bus/mhi
Paul Davey 60b45fffbe bus: mhi: Fix MHI DMA structure endianness
commit ed2d980503 upstream.

The MHI driver does not work on big endian architectures.  The
controller never transitions into mission mode.  This appears to be due
to the modem device expecting the various contexts and transfer rings to
have fields in little endian order in memory, but the driver constructs
them in native endianness.

Fix MHI event, channel and command contexts and TRE handling macros to
use explicit conversion to little endian.  Mark fields in relevant
structures as little endian to document this requirement.

Fixes: a6e2e3522f ("bus: mhi: core: Add support for PM state transitions")
Fixes: 6cd330ae76 ("bus: mhi: core: Add support for ringing channel/event ring doorbells")
Cc: stable@vger.kernel.org
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Paul Davey <paul.davey@alliedtelesis.co.nz>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20220301160308.107452-4-manivannan.sadhasivam@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-08 13:57:14 +02:00
..
core bus: mhi: Fix MHI DMA structure endianness 2022-04-08 13:57:14 +02:00
Kconfig bus: mhi: Add MHI PCI support for WWAN modems 2020-11-18 15:20:34 +05:30
Makefile bus: mhi: Add MHI PCI support for WWAN modems 2020-11-18 15:20:34 +05:30
pci_generic.c bus: mhi: pci_generic: Add mru_default for Quectel EM1xx series 2022-04-08 13:57:14 +02:00