Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

usb: dwc3: dwc3_power_off_all_roothub_ports: Use ioremap_np when required

On Apple Silicon machines we can't use ioremap() / Device-nGnRE to map most
regions but must use ioremap_np() / Device-nGnRnE whenever
IORESOURCE_MEM_NONPOSTED is set. Make sure this is also done inside
dwc3_power_off_all_roothub_ports to prevent SErrors.

Fixes: 2d2a3349521d ("usb: dwc3: Add workaround for host mode VBUS glitch when boot")
Cc: stable@kernel.org
Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Signed-off-by: Sven Peter <sven@kernel.org>
Link: https://patch.msgid.link/20251015-b4-aplpe-dwc3-v2-2-cbd65a2d511a@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Sven Peter and committed by
Greg Kroah-Hartman
5ed9cc71 71e13cc1

+4 -1
+4 -1
drivers/usb/dwc3/host.c
··· 37 37 38 38 /* xhci regs are not mapped yet, do it temporarily here */ 39 39 if (dwc->xhci_resources[0].start) { 40 - xhci_regs = ioremap(dwc->xhci_resources[0].start, DWC3_XHCI_REGS_END); 40 + if (dwc->xhci_resources[0].flags & IORESOURCE_MEM_NONPOSTED) 41 + xhci_regs = ioremap_np(dwc->xhci_resources[0].start, DWC3_XHCI_REGS_END); 42 + else 43 + xhci_regs = ioremap(dwc->xhci_resources[0].start, DWC3_XHCI_REGS_END); 41 44 if (!xhci_regs) { 42 45 dev_err(dwc->dev, "Failed to ioremap xhci_regs\n"); 43 46 return;