[lkml]   [2011]   [Aug]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[37/50] EHCI: only power off port if over-current is active
    2.6.33-longterm review patch.  If anyone has any objections, please let us know.


    From: Sergei Shtylyov <>

    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 <>
    Acked-by: Alan Stern <>
    Signed-off-by: Greg Kroah-Hartman <>

    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
    @@ -760,10 +760,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)) {
    temp & ~(PORT_RWC_BITS | PORT_POWER),
    + temp = ehci_readl(ehci, status_reg);

     \ /
      Last update: 2011-08-06 02:45    [W:0.019 / U:3.024 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site