Commit 77d9c334 authored by Alan Stern's avatar Alan Stern Committed by Deepak Saxena

[PATCH] USB: Mask "HC Halted" bit in the UHCI status register

Contrary to the UHCI specification document, in real controllers the "HC
Halted" bit in the status register cannot be cleared by writing a 1.  It
will persist for as long as the controller is halted.  Hence the bit needs
to be masked away before checking whether or not the controller initiated
an interrupt.

Without this patch, other devices sharing the same IRQ line might not get
serviced while the host controller is suspended, because the always-on
status bit would cause the UHCI driver to report that it had handled the
interrupt.
parent fec5dce2
......@@ -1880,10 +1880,11 @@ static irqreturn_t uhci_irq(struct usb_hcd *hcd, struct pt_regs *regs)
/*
* Read the interrupt status, and write it back to clear the
* interrupt cause
* interrupt cause. Contrary to the UHCI specification, the
* "HC Halted" status bit is persistent: it is RO, not R/WC.
*/
status = inw(io_addr + USBSTS);
if (!status) /* shared interrupt, not mine */
if (!(status & ~USBSTS_HCH)) /* shared interrupt, not mine */
return IRQ_NONE;
outw(status, io_addr + USBSTS); /* Clear it */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment