Linux USB
 help / color / mirror / Atom feed
From: Rosen Penev <rosenp@gmail.com>
To: linux-usb@vger.kernel.org
Cc: Mathias Nyman <mathias.nyman@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	Gregory CLEMENT <gregory.clement@bootlin.com>
Subject: [PATCH] usb: xhci-plat: mvebu: restore MBus windows on resume
Date: Wed,  2 Dec 2026 21:36:51 -0800	[thread overview]
Message-ID: <20261203053651.928611-1-rosenp@gmail.com> (raw)

The Armada 375/38x xHCI reaches DRAM through MBus decoding windows in
its second register block. They are only programmed from ->init_quirk()
at probe time. On boards that lose SoC power in suspend-to-RAM, the
windows read back as zero on resume, so the controller has no path to
memory and its DMA fails.

The AHCI and mvneta drivers on the same SoCs already reprogram their
windows on resume. Do the same here by using the existing MBus setup
as ->resume_quirk(), which xhci_plat_resume_common() calls before
xhci_resume(). Reprogramming is idempotent, so it is also safe when
power was kept.

Fixes: 973747928514 ("usb: host: xhci-plat: add support for the Armada 375/38x XHCI controllers")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 drivers/usb/host/xhci-plat.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
index 6fd595f81a30..94ab45c10c16 100644
--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
@@ -114,6 +114,7 @@ static int xhci_plat_start(struct usb_hcd *hcd)
 #ifdef CONFIG_OF
 static const struct xhci_plat_priv xhci_plat_marvell_armada = {
 	.init_quirk = xhci_mvebu_mbus_init_quirk,
+	.resume_quirk = xhci_mvebu_mbus_init_quirk,
 };
 
 static const struct xhci_plat_priv xhci_plat_marvell_armada3700 = {
-- 
2.56.1


             reply	other threads:[~2026-12-03  5:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03  5:36 Rosen Penev [this message]
2026-12-03  5:46 ` [PATCH] usb: xhci-plat: mvebu: restore MBus windows on resume sashiko-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261203053651.928611-1-rosenp@gmail.com \
    --to=rosenp@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=gregory.clement@bootlin.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=thomas.petazzoni@free-electrons.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox