This is a note to let you know that I've just added the patch titled

    EHCI: only power off port if over-current is active

to the 2.6.32-longterm tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/longterm/longterm-queue-2.6.32.git;a=summary

The filename of the patch is:
     ehci-only-power-off-port-if-over-current-is-active.patch
and it can be found in the queue-2.6.32 subdirectory.

If you, or anyone else, feels it should not be added to the 2.6.32 longterm 
tree,
please let <[email protected]> know about it.


>From 81463c1d707186adbbe534016cd1249edeab0dac Mon Sep 17 00:00:00 2001
From: Sergei Shtylyov <[email protected]>
Date: Wed, 6 Jul 2011 23:19:38 +0400
Subject: EHCI: only power off port if over-current is active

From: Sergei Shtylyov <[email protected]>

commit 81463c1d707186adbbe534016cd1249edeab0dac upstream.

MAX4967 USB power supply chip we use on our boards signals over-current when
power is not enabled; once it's enabled, over-current signal returns to normal.
That unfortunately caused the endless stream of "over-current change on port"
messages. The EHCI root hub code reacts on every over-current signal change
with powering off the port -- such change event is generated the moment the
port power is enabled, so once enabled the power is immediately cut off.
I think we should only cut off power when we're seeing the active over-current
signal, so I'm adding such check to that code. I also think that the fact that
we've cut off the port power should be reflected in the result of GetPortStatus
request immediately, hence I'm adding a PORTSCn register readback after write...

Signed-off-by: Sergei Shtylyov <[email protected]>
Acked-by: Alan Stern <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/usb/host/ehci-hub.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/usb/host/ehci-hub.c
+++ b/drivers/usb/host/ehci-hub.c
@@ -758,10 +758,11 @@ static int ehci_hub_control (
                         * power switching; they're allowed to just limit the
                         * current.  khubd will turn the power back on.
                         */
-                       if (HCS_PPC (ehci->hcs_params)){
+                       if ((temp & PORT_OC) && HCS_PPC(ehci->hcs_params)) {
                                ehci_writel(ehci,
                                        temp & ~(PORT_RWC_BITS | PORT_POWER),
                                        status_reg);
+                               temp = ehci_readl(ehci, status_reg);
                        }
                }
 


Patches currently in longterm-queue-2.6.32 which might be from 
[email protected] are

/home/gregkh/linux/longterm/longterm-queue-2.6.32/queue-2.6.32/ehci-only-power-off-port-if-over-current-is-active.patch

_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to