From: Oliver Neukum <oneukum@suse.de>
To: Sam Lewis <sam.vr.lewis@gmail.com>, linux-usb@vger.kernel.org
Subject: Re: USB hub driver over-current behavior
Date: Mon, 10 Feb 2020 11:29:29 +0100 [thread overview]
Message-ID: <1581330569.26936.5.camel@suse.de> (raw)
In-Reply-To: <CA+ZLECurtq1X-4XtMSqsdSfaw=RrNyY94cz+8CZ06HJ8Pw28Ng@mail.gmail.com>
Am Montag, den 10.02.2020, 17:03 +1100 schrieb Sam Lewis:
> Hi,
>
> I have a LAN9514 (rebranded SMSC9514) USB hub which has per port
> over-current protection.
>
> I'm using this hub within my embedded device, and I would like the hub
> to continue working if any single port experiences an over-current or
> short condition.
>
> In testing this behavior by shorting out a port, I've noticed that the
> Linux USB driver continually fights against the protection in the hub
> and attempts to repower the shorted port.
>
> Looking through the hub driver and tracing the execution flow, as far
> as I can tell, this is the list of events that seem to be occurring:
>
> 1. I short out a single port
> 2. The hub (through a power switch) detects the short and disables the port
> 3. The hub sends an over-current event to the driver
> 4. The driver gets the event in the `port_event` function
> 5. The driver then sleeps for 100ms (for 'cool down'?) before powering
> the port back on
> 6. Repeat from top, until the short is removed
Hi,
error handling at this level has gotten little love.
The basic problem is that we have no good way to switch a portback on
after we have given up on it. Feel free to propose a patch to the
kernel and a tool to use it and we can discuss them.
Regards
Oliver
next prev parent reply other threads:[~2020-02-10 10:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-10 6:03 USB hub driver over-current behavior Sam Lewis
2020-02-10 9:53 ` Oliver Neukum
2020-02-10 10:29 ` Oliver Neukum [this message]
2020-02-10 14:53 ` Alan Stern
2020-02-13 5:41 ` Sam Lewis
2020-02-13 14:49 ` Alan Stern
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1581330569.26936.5.camel@suse.de \
--to=oneukum@suse.de \
--cc=linux-usb@vger.kernel.org \
--cc=sam.vr.lewis@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.