ChangeSet 1.1557.49.9, 2004/02/17 16:22:07-08:00, stern@rowland.harvard.edu [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. drivers/usb/host/uhci-hcd.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff -Nru a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c --- a/drivers/usb/host/uhci-hcd.c Thu Feb 19 17:22:22 2004 +++ b/drivers/usb/host/uhci-hcd.c Thu Feb 19 17:22:22 2004 @@ -1880,10 +1880,11 @@ /* * 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 */