<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/gentle-introduction-xhci-debug-capabilities-g6z3dbekc" -->

---
title: Gentle introduction xHCI debug capabilities | daily.dev
description: A tutorial walks through the xHCI debug capability (DbC) feature of USB controllers, showing how to check for support via sysfs, enable it on a target device,...
canonical: https://daily.dev/posts/gentle-introduction-xhci-debug-capabilities-g6z3dbekc
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Gentle introduction xHCI debug capabilities | daily.dev
og:description: A tutorial walks through the xHCI debug capability (DbC) feature of USB controllers, showing how to check for support via sysfs, enable it on a target device,...
og:url: https://daily.dev/posts/gentle-introduction-xhci-debug-capabilities-g6z3dbekc
og:image: https://api.daily.dev/og/posts/G6Z3DbEKc.png
og:image:alt: Gentle introduction xHCI debug capabilities
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Gentle introduction xHCI debug capabilities

**[Planet Igalia](https://daily.dev/sources/planet-igalia)** · 5 min read · 0 upvotes · 0 comments

## Summary

A tutorial walks through the xHCI debug capability (DbC) feature of USB controllers, showing how to check for support via sysfs, enable it on a target device, and verify the connection from a host machine using a USB 3.1 SuperSpeed cable. It then covers configuring early kernel boot logging over xHCI debug (CONFIG_EARLY_PRINTK_USB_XDBC and earlyprintk=xdbc), and describes a real-world bug where devices with unusually large extended capability sizes overflow the fixed boot-time IO remap area (fixmaps), causing a kernel warning in early_ioremap(). A kernel patch addressing this issue is currently under review on the kernel mailing list.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://dev.uajain.com/blog/xhci-debug-capabilites>

## Questions this post answers

### Why does early_ioremap() fail with a WARNING in mm/early_ioremap.c when using xHCI early kernel debug (earlyprintk=xdbc)?

It fails when the xHCI controller's extended capabilities region is larger than the fixed boot-time mapping area (fixmaps), triggering a WARN_ON in early_ioremap.c because the required number of pages exceeds NR_FIX_BTMAPS. This occurs on newer hardware whose extended capability size has grown beyond what fixmaps were designed to handle, and a kernel patch is under review to address it.

_Developers debugging xHCI fixmap overflow issues can track kernel patch discussions like this on daily.dev._

### How do I check if my machine's xHCI controller supports the USB debug capability (DbC)?

Search the sysfs device tree for a file named dbc, for example with find /sys/devices -type f -name dbc. If the command returns a device path, the xHCI controller present supports debug capability and can be enabled by writing enable to that dbc file, after which dmesg on the target shows DbC connected and DbC configured messages.

_Engineers setting up USB debug consoles can find configuration details like this via daily.dev._

### What kconfig and kernel command line options enable early kernel boot logging over xHCI debug capability?

Enable CONFIG_EARLY_PRINTK_USB_XDBC in the kernel build configuration, then append earlyprintk=xdbc to the kernel command line. This routes early boot stage log output, generated right after the bootloader hands off control, through the xHCI debug capability interface for capture on a connected host machine.

_Kernel developers configuring early boot debugging can reference setups like this through daily.dev._

## Similar posts on daily.dev

- [Various USB Quirks Merged Ahead Of Linux 7.1-rc6](https://daily.dev/posts/various-usb-quirks-merged-ahead-of-linux-7-1-rc6-vbwpxa3oy) · Phoronix · 0 upvotes · 0 comments
- [Many USB Improvements & New Hardware Merged For Linux 7.1](https://daily.dev/posts/many-usb-improvements-new-hardware-merged-for-linux-7-1-l0wflpqfx) · Phoronix · 0 upvotes · 0 comments
- [USB for Software Developers](https://daily.dev/posts/usb-for-software-developers-4nurp8au8) · Hacker News · 3 upvotes · 0 comments
- [Thunderbolt Strikes Windows98](https://daily.dev/posts/thunderbolt-strikes-windows98-7qovqzgxc) · Hackaday · 0 upvotes · 0 comments
- [A New Linux Driver Could Make USB4 Cables a Blazing Fast Way to Move Data](https://daily.dev/posts/a-new-linux-driver-could-make-usb4-cables-a-blazing-fast-way-to-move-data-vmnsnowa3) · It's Foss · 7 upvotes · 0 comments

---

Tags: [#linux](https://daily.dev/tags/linux), [#hardware](https://daily.dev/tags/hardware)

[View this post on daily.dev](https://daily.dev/posts/gentle-introduction-xhci-debug-capabilities-g6z3dbekc)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Gentle introduction xHCI debug capabilities","url":"https://daily.dev/posts/gentle-introduction-xhci-debug-capabilities-g6z3dbekc","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/gentle-introduction-xhci-debug-capabilities-g6z3dbekc"},"datePublished":"2026-09-20T07:44:36.546Z","dateModified":"2026-09-20T07:50:33.700Z","description":"A tutorial walks through the xHCI debug capability (DbC) feature of USB controllers, showing how to check for support via sysfs, enable it on a target device,...","image":"https://media.daily.dev/image/upload/s--P4t4XyoV--/f_auto/v1722860399/public/Placeholder%2001","thumbnailUrl":"https://media.daily.dev/image/upload/s--P4t4XyoV--/f_auto/v1722860399/public/Placeholder%2001","isAccessibleForFree":true,"articleSection":"Planet Igalia","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Planet Igalia","logo":"https://media.daily.dev/image/upload/s--84VSWNwZ--/f_auto,q_auto/v1789890204/logos/planet-igalia?_a=BAMAMicg0","url":"https://daily.dev/sources/planet-igalia"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/gentle-introduction-xhci-debug-capabilities-g6z3dbekc","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"linux,hardware","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Planet Igalia","item":"https://daily.dev/sources/planet-igalia"},{"@type":"ListItem","position":3,"name":"Gentle introduction xHCI debug capabilities"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/gentle-introduction-xhci-debug-capabilities-g6z3dbekc#faq","mainEntity":[{"@type":"Question","name":"Why does early_ioremap() fail with a WARNING in mm/early_ioremap.c when using xHCI early kernel debug (earlyprintk=xdbc)?","acceptedAnswer":{"@type":"Answer","text":"It fails when the xHCI controller's extended capabilities region is larger than the fixed boot-time mapping area (fixmaps), triggering a WARN_ON in early_ioremap.c because the required number of pages exceeds NR_FIX_BTMAPS. This occurs on newer hardware whose extended capability size has grown beyond what fixmaps were designed to handle, and a kernel patch is under review to address it. Developers debugging xHCI fixmap overflow issues can track kernel patch discussions like this on daily.dev."}},{"@type":"Question","name":"How do I check if my machine's xHCI controller supports the USB debug capability (DbC)?","acceptedAnswer":{"@type":"Answer","text":"Search the sysfs device tree for a file named dbc, for example with find /sys/devices -type f -name dbc. If the command returns a device path, the xHCI controller present supports debug capability and can be enabled by writing enable to that dbc file, after which dmesg on the target shows DbC connected and DbC configured messages. Engineers setting up USB debug consoles can find configuration details like this via daily.dev."}},{"@type":"Question","name":"What kconfig and kernel command line options enable early kernel boot logging over xHCI debug capability?","acceptedAnswer":{"@type":"Answer","text":"Enable CONFIG_EARLY_PRINTK_USB_XDBC in the kernel build configuration, then append earlyprintk=xdbc to the kernel command line. This routes early boot stage log output, generated right after the bootloader hands off control, through the xHCI debug capability interface for capture on a connected host machine. Kernel developers configuring early boot debugging can reference setups like this through daily.dev."}}]}
```

