Skip to contentSkip to conversation

usb: host: xhci-dbg: HCIVERSION should be a binary number

PATCH In review Peter Chen 2 participants 2 messages Mar 7, 2017

Subsystems (3)
lore
Share & tools
lore

Peter Chen

author
#0 lore raw

PATCH 1/1 usb: host: xhci-dbg: HCIVERSION should be a binary number

According to xHCI spec, HCIVERSION containing a BCD encoding of the xHCI specification revision number, 0100h corresponds to xHCI version 1.0. Change "100" as "0x100".

Cc Lu Baolu <[email protected]>
Cc stable <[email protected]>
Fixes 04abb6de2825 ("xhci: Read and parse new xhci

1.1 capability register")

---
 drivers/usb/host/xhci-dbg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/host/xhci-dbg.c +1 -1
index 363d125..2b4a00f 100644
@@ -109,7 +109,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
 	xhci_dbg(xhci, "RTSOFF 0x%x:\n", temp & RTSOFF_MASK);
 
 	/* xhci 1.1 controllers have the HCCPARAMS2 register */
-	if (hci_version > 100) {
+	if (hci_version > 0x100) {
 		temp = readl(&xhci->cap_regs->hcc_params2);
 		xhci_dbg(xhci, "HCC PARAMS2 0x%x:\n", (unsigned int) temp);
 		xhci_dbg(xhci, "  HC %s Force save context capability",
Signature · 1 line
2.7.4
#1 lore raw
Quoted 19 lines · Peter Chen

According to xHCI spec, HCIVERSION containing a BCD encoding of the xHCI specification revision number, 0100h corresponds to xHCI version 1.0. Change "100" as "0x100".

Cc Lu Baolu <[email protected]>
Cc stable <[email protected]>
Fixes 04abb6de2825 ("xhci: Read and parse new xhci

1.1 capability register")

---
  drivers/usb/host/xhci-dbg.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/host/xhci-dbg.c +0 -0
index 363d125..2b4a00f 100644

drivers/usb/host/xhci-dbg.c static void xhci_print_cap_regs(struct xhci_hcd *xhci) · line 115

Quoted 8 lines
drivers/usb/host/xhci-dbg.c +1 -1
@@ -109,7 +109,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
  	xhci_dbg(xhci, "RTSOFF 0x%x:\n", temp & RTSOFF_MASK);
 
  	/* xhci 1.1 controllers have the HCCPARAMS2 register */
-	if (hci_version > 100) {
+	if (hci_version > 0x100) {
  		temp = readl(&xhci->cap_regs->hcc_params2);
  		xhci_dbg(xhci, "HCC PARAMS2 0x%x:\n", (unsigned int) temp);
  		xhci_dbg(xhci, "  HC %s Force save context capability",

Thanks, queuing this

-Mathias