From: Sarah Sharp Date: Thu, 14 May 2009 18:44:26 +0000 (-0700) Subject: USB: xHCI: Fix interrupt moderation. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a4d88302268d1e458f7c6eb7855f1ba4b3a7cffc;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git USB: xHCI: Fix interrupt moderation. Mask off the lower 16 bits of the interrupt control register, instead of masking off the upper 16 bits. The interrupt moderation interval field is the lower 16 bytes, and is set to 0x4000 (1ms) by default. The previous code was adding 40 us to the default value, instead of setting it to 40 us. This makes performance really bad. Signed-off-by: Sarah Sharp Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/host/xhci-hcd.c b/drivers/usb/host/xhci-hcd.c index 59ee61d2a198..489657c853e7 100644 --- a/drivers/usb/host/xhci-hcd.c +++ b/drivers/usb/host/xhci-hcd.c @@ -384,7 +384,7 @@ int xhci_run(struct usb_hcd *hcd) xhci_dbg(xhci, "// Set the interrupt modulation register\n"); temp = xhci_readl(xhci, &xhci->ir_set->irq_control); - temp &= 0xffff; + temp &= ~ER_IRQ_INTERVAL_MASK; temp |= (u32) 160; xhci_writel(xhci, temp, &xhci->ir_set->irq_control);