From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: Milan Oravec <migo.oravec@gmail.com>
Cc: Greg KH <gregkh@linuxfoundation.org>, linux-usb@vger.kernel.org
Subject: Re: Fwd: USB DBC hang during earlyprintk initialization
Date: Tue, 28 Oct 2025 12:13:25 +0200 [thread overview]
Message-ID: <ba3692e7-6818-41af-8748-71a91cb13db5@linux.intel.com> (raw)
In-Reply-To: <65b65e02-e51e-4e7e-ae9e-78d755eb8566@linux.intel.com>
On 10/27/25 11:34, Mathias Nyman wrote:
> On 10/24/25 21:48, Milan Oravec wrote:
>> Thank you, should try this patch against stable 6.17.5 or 6.18 branch?
>> It fails with 6.17.5
>>
>
> It was on top of 6.18-rc1, but should apply fine on 6.17.5
> Tried myself, saved the email as patch.eml and applied with patch:
>
List was accidentally dropped.
Milan got patch running, DbC tried ioremapping smaller and smaller size until it was successful.
DbC capability was within successfully mapped size, but DbC failed to start properly.
Log:
[ 0.000000] Linux version 6.17.5-dirty (migo@migoG17) (gcc (GCC)
...
[ 0.000000] xhci_dbc:early_xdbc_parse_parameter: dbgp_num: 1
[ 0.000000] ------------[ cut here ]------------
[ 0.000000] WARNING: CPU: 0 PID: 0 at mm/early_ioremap.c:139
__early_ioremap+0xae/0x190
[ 0.000000] Modules linked in:
[ 0.000000] RIP: __early_ioremap+0xae/0x190
...
[ 0.000000] xhci_dbc:xdbc_map_pci_mmio: Failed to ioremap xhci-dbc with size 0x100000
[ 0.000000] xhci_dbc:xdbc_map_pci_mmio: Retry xhci-dbc ioremap with reduced size 0x80000
[ 0.000000] ------------[ cut here ]------------
[ 0.000000] WARNING: CPU: 0 PID: 0 at mm/early_ioremap.c:139
__early_ioremap+0xae/0x190
[ 0.000000] Modules linked in:
[ 0.000000] Tainted: [W]=WARN
[ 0.000000] RIP: __early_ioremap+0xae/0x190
...
[ 0.000000] xhci_dbc:xdbc_map_pci_mmio: Failed to ioremap xhci-dbc with size 0x80000
[ 0.000000] xhci_dbc:xdbc_map_pci_mmio: Retry xhci-dbc ioremap with reduced size 0x40000
[ 0.000000] xhci_dbc:early_xdbc_parse_parameter: Looking for DbC capability at offset 0x480
[ 0.000000] xhci_dbc:early_xdbc_parse_parameter: Looking for DbC capability at offset 0x490
[ 0.000000] xhci_dbc:early_xdbc_parse_parameter: Looking for DbC capability at offset 0x4a0
[ 0.000000] xhci_dbc:early_xdbc_parse_parameter: Looking for DbC capability at offset 0x4c0
[ 0.000000] xhci_dbc:early_xdbc_parse_parameter: Looking for DbC capability at offset 0x4e0
[ 0.000000] xhci_dbc:early_xdbc_parse_parameter: DbC capability found at offset 0x4e0
...
[ 5.018291] xhci_dbc:early_xdbc_setup_hardware: failed to setup the connection to host
Milan, can you add more debugging into early dbc, showing in detail where it fails.
On top op previous patch:
diff --git a/drivers/usb/early/xhci-dbc.c b/drivers/usb/early/xhci-dbc.c
index 9a7f3f12f18f..dc372f028dc3 100644
--- a/drivers/usb/early/xhci-dbc.c
+++ b/drivers/usb/early/xhci-dbc.c
@@ -29,11 +29,7 @@
static struct xdbc_state xdbc;
static bool early_console_keep;
-#ifdef XDBC_TRACE
-#define xdbc_trace trace_printk
-#else
-static inline void xdbc_trace(const char *fmt, ...) { }
-#endif /* XDBC_TRACE */
+#define xdbc_trace pr_err
static void __iomem * __init xdbc_map_pci_mmio(u32 bus, u32 dev, u32 func)
{
@@ -568,35 +564,42 @@ static int __init xdbc_early_setup(void)
ret = handshake(&xdbc.xdbc_reg->control, CTRL_DBC_ENABLE, 0, 100000, 100);
if (ret)
return ret;
+ pr_notice("DCE successfully cleared");
/* Allocate the table page: */
xdbc.table_base = xdbc_get_page(&xdbc.table_dma);
if (!xdbc.table_base)
return -ENOMEM;
+ pr_notice("Successfully got xdbc table_dma page");
/* Get and store the transfer buffer: */
xdbc.out_buf = xdbc_get_page(&xdbc.out_dma);
if (!xdbc.out_buf)
return -ENOMEM;
+ pr_notice("Successfully got xdbc out_dma page");
/* Allocate the event ring: */
ret = xdbc_alloc_ring(&xdbc.evt_seg, &xdbc.evt_ring);
if (ret < 0)
return ret;
+ pr_notice("Successfully allocated event ring");
/* Allocate IN/OUT endpoint transfer rings: */
ret = xdbc_alloc_ring(&xdbc.in_seg, &xdbc.in_ring);
if (ret < 0)
return ret;
+ pr_notice("Successfully allocated in ring");
ret = xdbc_alloc_ring(&xdbc.out_seg, &xdbc.out_ring);
if (ret < 0)
return ret;
+ pr_notice("Successfully allocated out ring");
xdbc_mem_init();
ret = xdbc_start();
if (ret < 0) {
+ pr_notice("Failed to start xdbc ret: %d", ret);
writel(0, &xdbc.xdbc_reg->control);
return ret;
}
next prev parent reply other threads:[~2025-10-28 10:13 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAAcb1K_MJKWz+BYJmx0FDgrBOzzXm71-M7sgHDUOmBRppXWNzA@mail.gmail.com>
2025-10-15 7:43 ` Fwd: USB DBC hang during earlyprintk initialization Milan Oravec
2025-10-15 9:13 ` Greg KH
2025-10-15 19:11 ` Milan Oravec
2025-10-16 13:42 ` Mathias Nyman
2025-10-16 14:31 ` Milan Oravec
2025-10-16 20:49 ` Mathias Nyman
2025-10-20 6:43 ` Milan Oravec
2025-10-24 15:36 ` Mathias Nyman
2025-10-24 15:41 ` [RFT PATCH] usb: early: xhci-dbc: Try smaller early_ioremap size if original size fails Mathias Nyman
2025-10-26 2:32 ` kernel test robot
2025-10-24 18:48 ` Fwd: USB DBC hang during earlyprintk initialization Milan Oravec
2025-10-27 9:34 ` Mathias Nyman
2025-10-28 10:13 ` Mathias Nyman [this message]
2025-10-28 13:29 ` Milan Oravec
2025-10-28 17:19 ` Mathias Nyman
2025-10-28 18:10 ` Milan Oravec
2025-10-31 13:15 ` Milan Oravec
2025-12-04 20:46 ` Mathias Nyman
2025-12-05 7:18 ` Milan Oravec
2025-12-05 18:49 ` Milan Oravec
2025-12-17 9:20 ` Mathias Nyman
2025-12-18 20:03 ` Milan Oravec
2026-01-19 8:18 ` Milan Oravec
2026-01-19 11:01 ` Milan Oravec
2026-04-01 15:58 ` Milan Oravec
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=ba3692e7-6818-41af-8748-71a91cb13db5@linux.intel.com \
--to=mathias.nyman@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-usb@vger.kernel.org \
--cc=migo.oravec@gmail.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