[11/37] USB: OHCI: fix bug in controller resume

From: Greg KH
Date: Tue Apr 29 2008 - 13:24:02 EST


2.6.25-stable review patch. If anyone has any objections, please let us
know.

------------------
From: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>

commit: 0d22f65515307c878ddd20b1305cce925ca9516c

This patch (as1063) fixes a bug in the way ohci-hcd resumes its
controllers. It leaves the Master Interrupt Enable bit turned off.

If the root hub is resumed immediately this won't matter. But if the
root hub is suspended (say because no devices are plugged in), it won't
ever wake up by itself.

Signed-off-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>
CC: David Brownell <david-b@xxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

---
drivers/usb/host/ohci-pci.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

--- a/drivers/usb/host/ohci-pci.c
+++ b/drivers/usb/host/ohci-pci.c
@@ -312,11 +312,13 @@ static int ohci_pci_suspend (struct usb_

static int ohci_pci_resume (struct usb_hcd *hcd)
{
+ struct ohci_hcd *ohci = hcd_to_ohci(hcd);
+
set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);

/* FIXME: we should try to detect loss of VBUS power here */
prepare_for_handover(hcd);
-
+ ohci_writel(ohci, OHCI_INTR_MIE, &ohci->regs->intrenable);
return 0;
}


--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/