Skip to contentSkip to conversation

USB: xhci: fix OS want to own HC

PATCH In review JiSheng Zhang 3 participants 3 messages Jul 16, 2011 – Jul 19, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 USB: xhci: fix OS want to own HC

Software should set XHCI_HC_OS_OWNED bit to request ownership of xHC

---
 drivers/usb/host/pci-quirks.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/usb/host/pci-quirks.c +1 -1
index fd93061..1a73004 100644
@@ -775,7 +775,7 @@ static void __devinit quirk_usb_handoff_xhci(struct pci_dev *pdev)
 
 	/* If the BIOS owns the HC, signal that the OS wants it, and wait */
 	if (val & XHCI_HC_BIOS_OWNED) {
-		writel(val & XHCI_HC_OS_OWNED, base + ext_cap_offset);
+		writel(val | XHCI_HC_OS_OWNED, base + ext_cap_offset);
 
 		/* Wait for 5 seconds with 10 microsecond polling interval */
 		timeout = handshake(base + ext_cap_offset, XHCI_HC_BIOS_OWNED,
Signature · 1 line
1.7.5.4
#1 lore raw
Quoted 1 line · JiSheng Zhang

Software should set XHCI_HC_OS_OWNED bit to request ownership of xHC

Good catch! I'll queue this up to my for-usb-linus branch and send it out to Greg later today.

Greg, do you think it's too late to get this into 3.0? Shall I just add it to usb-next and mark it for stable?

Sarah Sharp

Quoted 21 lines
---
 drivers/usb/host/pci-quirks.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/usb/host/pci-quirks.c +1 -1
index fd93061..1a73004 100644
@@ -775,7 +775,7 @@ static void __devinit quirk_usb_handoff_xhci(struct pci_dev *pdev)
 
 	/* If the BIOS owns the HC, signal that the OS wants it, and wait */
 	if (val & XHCI_HC_BIOS_OWNED) {
-		writel(val & XHCI_HC_OS_OWNED, base + ext_cap_offset);
+		writel(val | XHCI_HC_OS_OWNED, base + ext_cap_offset);
 
 		/* Wait for 5 seconds with 10 microsecond polling interval */
 		timeout = handshake(base + ext_cap_offset, XHCI_HC_BIOS_OWNED,
Signature · 1 line
1.7.5.4
#2 lore raw
Quoted 7 lines · Sarah Sharp
Quoted 1 line · JiSheng Zhang

Software should set XHCI_HC_OS_OWNED bit to request ownership of xHC

Good catch! I'll queue this up to my for-usb-linus branch and send it out to Greg later today.

Greg, do you think it's too late to get this into 3.0?

Yes.

Quoted 1 line

Shall I just add it to usb-next and mark it for stable?

Yes.

thanks,

greg k-h