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 10/20/2017 09:47 PM, Alan Stern wrote:
>> 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�nig
>>> <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...

One of our $CUSTOMERS has the requirement to keep the USB turned off
after an OC event occurred.

regards,
Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |

Attachment: signature.asc
Description: OpenPGP digital signature


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

  Powered by Linux