From bfd75397bc488fd8a7bc3ddcc6dbd3eda233df97 Mon Sep 17 00:00:00 2001 From: Wu Zhangjin Date: Mon, 4 Jan 2010 11:33:02 +0800 Subject: USB: Fix the mouse problem when copying large amounts of data When copying large amounts of data between the USB storage devices and the hard disk, the USB mouse will not work, this patch fixes it. [NOTE: This problem have been found in the Loongson family machines, not sure whether it is producible on other platforms] Signed-off-by: Hu Hongbing Signed-off-by: Wu Zhangjin diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index 604cad1..b691278 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c @@ -874,9 +874,13 @@ static irqreturn_t ohci_irq (struct usb_hcd *hcd) } if (ints & OHCI_INTR_WDH) { - spin_lock (&ohci->lock); - dl_done_list (ohci); - spin_unlock (&ohci->lock); + if (ohci->hcca->done_head == 0) { + ints &= ~OHCI_INTR_WDH; + } else { + spin_lock (&ohci->lock); + dl_done_list (ohci); + spin_unlock (&ohci->lock); + } } if (quirk_zfmicro(ohci) && (ints & OHCI_INTR_SF)) { -- cgit v0.10.2