Re: [PATCH] USB: EHCI: don't reread PORTSC after disabling port power

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 20 Oct 2017, Uwe [iso-8859-1] Kleine-K� wrote:

> Hey Fabio,
> 
> On Fri, Oct 20, 2017 at 05:27:09PM -0200, Fabio Estevam wrote:
> > On Fri, Oct 20, 2017 at 5:20 PM, Uwe Kleine-K�
> > <u.kleine-koenig@xxxxxxxxxxxxxx> wrote:
> > 
> > > It also works. However I wonder if it's right that I'm spammed by
> > > over-current messages now (independent of which fix I choose) as long as
> > > there is something connected to the port that draws too much power:
> > >
> > >         [   53.406833] usb usb1-port1: over-current condition
> > >         [   53.631749] usb usb1-port1: over-current condition
> > >         [   53.856720] usb usb1-port1: over-current condition
> > >         [   54.081732] usb usb1-port1: over-current condition
> > >         [   54.306727] usb usb1-port1: over-current condition
> > >         [   54.531722] usb usb1-port1: over-current condition
> > >         [   54.756722] usb usb1-port1: over-current condition
> > >
> > > It seems to be intended or am I missing something?

Well, it does report a potentially hardware-damaging condition.  But 
you are right that excessive repetition doesn't do any good.

> > Does it help if you pass 'disable-over-current' property?
> 
> I assume it does, but that's not the point. It seems to work just fine,
> because the messages come in iff there is an over-current condition on
> that port.
> 
> I guess what is really wanted here is that the loop
> 
>    start:
> 	printk(overcurrent-event)
> 	disable port power
> 	sleep
> 	enable port power
> 	goto start
> 
> gets a bit smarter to not print the message even if the port signals a
> new overcurrent event after power was reset.

Maybe we should keep track of the time interval between overcurrent
events on each port.  If we see more than one event in a 10-second
window, leave the port permanently powered-off.  (But then how would we
recover?)

On the other hand, how often do people encounter overcurrent 
situations?  If the hardware is working properly, not very often.

I'm open to suggestions...

Alan Stern

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



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux