Skip to contentSkip to conversation

usb: Remove OHCI useless masking/unmasking of WDH interrupt

PATCH In review Benjamin Herrenschmidt 2 participants 2 messages Nov 25, 2007 – Dec 6, 2007

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

PATCH 2/2 usb: Remove OHCI useless masking/unmasking of WDH interrupt

The OHCI driver's IRQ handler, while processing a WDH interrupt, masks and unmasks it. I believe this is both broken (no dealign with write posting) and totally useless as the IRQ cannot re-occur while we are in the handler anyway.

---

It might be a leftover related to the bogus optmisation that I've removed in a separate patch. Anyway, I don't think it's any use so let's remove to useless MMIO writes.

 drivers/usb/host/ohci-hcd.c |    4 ----
 1 file changed, 4 deletions(-)
drivers/usb/host/ohci-hcd.c +0 -4
Index: linux-work/drivers/usb/host/ohci-hcd.c
===================================================================
@@ -807,13 +807,9 @@ static irqreturn_t ohci_irq (struct usb_
 	}
 
 	if (ints & OHCI_INTR_WDH) {
-		if (HC_IS_RUNNING(hcd->state))
-			ohci_writel (ohci, OHCI_INTR_WDH, &regs->intrdisable);
 		spin_lock (&ohci->lock);
 		dl_done_list (ohci);
 		spin_unlock (&ohci->lock);
-		if (HC_IS_RUNNING(hcd->state))
-			ohci_writel (ohci, OHCI_INTR_WDH, &regs->intrenable);
 	}
 
 	if (quirk_zfmicro(ohci) && (ints & OHCI_INTR_SF)) {
#1 lore raw

From: Benjamin Herrenschmidt <[email protected]>
Subject: [PATCH 2/2] usb: Remove OHCI useless masking/unmasking of WDH interrupt

The OHCI driver's IRQ handler, while processing a WDH interrupt, masks and unmasks it. I believe this is both broken (the write may still be posted during the donelist processing it's trying to safeguard) and useless as this IRQ may not be reissued until it's acked (unless this legacy code is an uncommented workaround for some chip erratum).

---
Worth IMO holding till 2.6.25-early.

drivers/usb/host/ohci-hcd.c +0 -4
@@ -807,13 +807,9 @@ static irqreturn_t ohci_irq (struct usb_
 	}
 
 	if (ints & OHCI_INTR_WDH) {
-		if (HC_IS_RUNNING(hcd->state))
-			ohci_writel (ohci, OHCI_INTR_WDH, &regs->intrdisable);
 		spin_lock (&ohci->lock);
 		dl_done_list (ohci);
 		spin_unlock (&ohci->lock);
-		if (HC_IS_RUNNING(hcd->state))
-			ohci_writel (ohci, OHCI_INTR_WDH, &regs->intrenable);
 	}
 
 	if (quirk_zfmicro(ohci) && (ints & OHCI_INTR_SF)) {