linux/drivers/usb/cdns3
Pawel Laszczak 555fc6824e usb: cdnsp: fix incorrect endian conversions for APB timeout register
commit 50b303f3d0 upstream.

readl() already returns a CPU-endian value. Passing its return value to
le32_to_cpu() is therefore redundant and causes an incorrect double byte
swap on big-endian systems.

Similarly, writel() expects a CPU-endian value, so passing the result of
cpu_to_le32() is incorrect.

Remove the unnecessary conversions and operate on the MMIO register value
as a CPU-endian u32.

Fixes: 241e2ce88e ("usb: cdnsp: Fix issue with resuming from L1")
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Cc: stable <stable@kernel.org>
Signed-off-by: Pawel Laszczak <pawell@cadence.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://patch.msgid.link/20260720-endian-fix-v1-v1-1-b5681fa1ea9f@cadence.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2026-08-19 17:14:15 +02:00
..
cdns3-debug.h usb: cdns3: Change file names for cdns3 driver. 2020-12-29 12:36:13 +08:00
cdns3-ep0.c usb: cdns3: Fixed incorrect gadget state 2021-07-29 14:13:02 +08:00
cdns3-gadget.c usb: cdns3: gadget: fix request skipping after clearing halt 2026-06-19 13:33:27 +02:00
cdns3-gadget.h usb: cdns3: fix iso transfer error when mult is not zero 2024-01-25 14:52:47 -08:00
cdns3-imx.c usb: cdns3: cdns3-imx: File headers are not good candidates for kernel-doc 2021-05-27 09:43:44 +02:00
cdns3-pci-wrap.c usb: cdns3: Fix double resource release in cdns3_pci_probe 2025-12-07 06:09:35 +09:00
cdns3-plat.c usb: cdns3: plat: fix leaked usb2_phy initialization on usb3_phy acquisition failure 2026-06-19 13:33:47 +02:00
cdns3-ti.c usb: cdns3: cdns3-ti: File headers are not good candidates for kernel-doc 2021-05-27 09:43:44 +02:00
cdns3-trace.c usb: cdns3: Change file names for cdns3 driver. 2020-12-29 12:36:13 +08:00
cdns3-trace.h usb: cdns3: trace: delete the trace parameter for request->trb 2021-04-12 20:19:21 +08:00
cdnsp-debug.h usb: cdnsp: Fix issue with CV Bad Descriptor test 2025-07-17 18:30:51 +02:00
cdnsp-ep0.c usb: cdnsp: Fix issue with CV Bad Descriptor test 2025-07-17 18:30:51 +02:00
cdnsp-gadget.c usb: cdnsp: fix incorrect endian conversions for APB timeout register 2026-08-19 17:14:15 +02:00
cdnsp-gadget.h usb: cdnsp: Fix issue with CV Bad Descriptor test 2025-07-17 18:30:51 +02:00
cdnsp-mem.c usb: cdnsp: fix stream context array leak in cdnsp_alloc_stream_info() 2026-07-24 15:51:22 +02:00
cdnsp-pci.c usb: cdns3: cdnsp-pci: remove redundant pci_disable_device() call 2025-10-19 16:21:39 +02:00
cdnsp-ring.c usb: cdnsp: Fix issue with CV Bad Descriptor test 2025-07-17 18:30:51 +02:00
cdnsp-trace.c usb: cdnsp: Add tracepoints for CDNSP driver 2020-12-29 12:36:13 +08:00
cdnsp-trace.h usb: cdnsp: Fix issue in cdnsp_log_ep trace event 2021-12-22 09:32:46 +01:00
core.c usb: cdns3: fix role switching during resume 2026-04-18 10:33:07 +02:00
core.h usb: cdnsp: Fix issue with resuming from L1 2025-05-18 08:20:37 +02:00
drd.c usb: cdns3: Add quirk flag to enable suspend residency 2025-01-09 13:28:29 +01:00
drd.h usb: cdns3: Add quirk flag to enable suspend residency 2025-01-09 13:28:29 +01:00
gadget-export.h usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver 2020-12-29 12:36:13 +08:00
host-export.h usb: cdns3: Removes xhci_cdns3_suspend_quirk from host-export.h 2020-12-29 12:36:13 +08:00
host.c usb: xhci: fix loss of data on Cadence xHC 2024-10-17 15:11:17 +02:00
Kconfig usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver 2020-12-29 12:36:13 +08:00
Makefile usb: cdnsp: fixes undefined reference to cdns_remove 2021-01-14 09:02:00 +08:00