I've been able to stop the disconnecting loop.

First I tried the usbcore.autosuspend=-1 guessing that an inactive period of time will send the device to some low power state, explaining the enumerating and disconnect loop with, but I had no luck.

Then I force using the device with an udev rule running

evtest --query $DEVNAME EV_KEY 0

and the disconnection disappears. Maybe it's an error in the tobis touchscreen controller code??

I would like to test if the behavior changes in full speed instead of high speed. Is there some way to downgrade the EHCI speed to full speed?

Thanks!

De: Greg KH <gregkh@linuxfoundation.org>
Enviado: martes, 20 de abril de 2021 10:52
Para: Jorge Fernandez Monteagudo <jorgefm@cirsa.com>
Cc: kernelnewbies@kernelnewbies.org <kernelnewbies@kernelnewbies.org>
Asunto: Re: USB resets
 
On Tue, Apr 20, 2021 at 07:41:14AM +0000, Jorge Fernandez Monteagudo wrote:
> >Bad hardware, the kernel can not cause a disconnect :(
> >
> >Do you have a flaky cable or underpowerd hub here?
> >
>
> How many retries before the kernel decides to send a reset to a USB device? After a reset, this device is ignored?

The hub itself disconnects the device electronically, the kernel does
not do that.  When the device comes back, then it is initialized by the
kernel, as the logs show, but then it is disconnected again.

This really looks like broken hardware or electronic noise on the
connection, the kernel can not cause electronic disconnects on a USB hub
like this.

good luck!

greg k-h