On Sun, 2016-03-20 at 18:09 +0100, Guido Trentalancia wrote: > Hello. > > Considering that EM interference can last for a while (generally up to > seconds), I am currently testing the following patch for module usbcore > so that it is possible to specify an amount of time to wait before > trying to re-enable a port that has been previously disabled by the hub > (supposedly because of EM interference). > > Hopefully, setting the right positive value (for example, 2000 > milliseconds) would help overcome situations such as the following: > The idea seems sound to me, but the implementation is problematic. > @@ -4960,6 +4967,7 @@ static void port_event(struct usb_hub *h > if (!(portstatus & USB_PORT_STAT_ENABLE) > && !connect_change && udev) { > dev_err(&port_dev->dev, "disabled by hub (EMI?), re-enabling...\n"); > + msleep(emi_recover_timer); You cannot just stall here for seconds. Regards Oliver -- 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