DMA Address Printing: All DMA address printing is now standardized using the "%pad" specifier. This guarantees correct address formatting regardless of the kernel's architecture, whether 32-bit or 64-bit. Address Formatting: Printed hexadecimal values can be ambiguous, making it tricky to distinguish between values and addresses. To enhance clarity, all trusted DMA addresses are now prefixed with the '@' symbol, ensuring immediate recognition as addresses. However, the printk() specifier '%p' has had its '@' prefix removed. This is because it hashes the address before printing, effectively turning it into an address ID. The hashing process does not preserve any relation between addresses; for instance, if two addresses are X bytes apart, their hashed counterparts will not reflect this distinction. Read 64-bit register printing: Debug messages that print an entire register value containing a DMA address have been improved. The register fields are now split and printed separately, making it easier for users to interpret the information. These changes collectively improve the readability and consistency of address printing in the xHCI driver, making it easier for developers and maintainers to interpret log outputs accurately. === Alternative approach === An argument can be made for switching from representing a TRB by its DMA address to using an index, as most printed DMA addresses are TRB addresses. While this approach offers potential benefits, it also presents challenges. Calculating the TRB index is straightforward when the segment and TRB are known. However, when printing TRB addresses read from xHCI registers, determining the TRB index becomes complex, increasing the risk of producing incorrect debug messages. Due to these complexities, I have decided not to switch to TRB indexes (yet). Niklas Neronin (7): usb: xhci-dbgcap: correct DMA address handling usb: xhci: use '%pad' specifier for DMA address printing usb: xhci: improve Stream Context register debugging usb: xhci: improve Endpoint Context register debugging usb: xhci: improve Command Ring Control register debugging usb: xhci: improve Event Ring Dequeue Pointer Register debugging usb: xhci: standardize address format drivers/usb/host/xhci-dbgcap.c | 11 +++++---- drivers/usb/host/xhci-debugfs.c | 22 ++++++++++------- drivers/usb/host/xhci-mem.c | 13 +++++----- drivers/usb/host/xhci-ring.c | 42 ++++++++++++++++----------------- drivers/usb/host/xhci-trace.h | 37 +++++++++++++++-------------- drivers/usb/host/xhci.c | 37 +++++++++++++++-------------- drivers/usb/host/xhci.h | 4 ++-- 7 files changed, 86 insertions(+), 80 deletions(-) -- 2.50.1