mirror of
https://github.com/ipxe/ipxe
synced 2025-12-09 02:40:27 +03:00
[usb] Leave port enabled after a failed device registration
A failure in device registration (e.g. due to a device with malformed descriptors) will currently result in the port being disabled as part of the error path. This in turn causes the hardware to detect the device as newly connected, leading to an endless loop of failed device registrations. Fix by leaving the port enabled in the case of a registration failure. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -1615,7 +1615,9 @@ static int register_usb ( struct usb_device *usb ) {
|
||||
usb->host->close ( usb );
|
||||
err_open:
|
||||
err_speed:
|
||||
hub->driver->disable ( hub, port );
|
||||
/* Leave port enabled on failure, to avoid an endless loop of
|
||||
* failed device registrations.
|
||||
*/
|
||||
err_enable:
|
||||
list_del ( &usb->list );
|
||||
port->usb = NULL;
|
||||
|
||||
Reference in New Issue
Block a user