[PATCH 2/2] USB: avoid OHCI autosuspend on some boxes

From: Greg KH
Date: Thu Dec 16 2004 - 18:42:47 EST


Don't try autosuspend if we think the hardware won't resume correctly
from the OHCI suspend state. This makes the RWC bit serve double duty,
but that appears to work OK, and the only penalty is increased power
consumption (from OHCI clocks) on boards/chips that don't work right.

For example, the amd756 erratum 4 workaround needs this logic; and at
least one ServerWorks box issues spurious resume IRQs (~3x/second!)
in the suspend state.

Signed-off-by: David Brownell <dbrownell@xxxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <greg@xxxxxxxxx>

diff -Nru a/drivers/usb/host/ohci-hub.c b/drivers/usb/host/ohci-hub.c
--- a/drivers/usb/host/ohci-hub.c 2004-12-16 15:36:00 -08:00
+++ b/drivers/usb/host/ohci-hub.c 2004-12-16 15:36:00 -08:00
@@ -305,7 +305,7 @@
{
struct ohci_hcd *ohci = hcd_to_ohci (hcd);
int ports, i, changed = 0, length = 1;
- int can_suspend = 1;
+ int can_suspend = hcd->can_wakeup;
unsigned long flags;

spin_lock_irqsave (&ohci->lock, flags);
-
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/