]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[usb] Do not attempt to disable USB3 hub ports
authorMichael Brown <mcb30@ipxe.org>
Thu, 2 Jul 2020 15:48:17 +0000 (16:48 +0100)
committerMichael Brown <mcb30@ipxe.org>
Thu, 2 Jul 2020 15:52:00 +0000 (16:52 +0100)
The USB3 specification removes PORT_ENABLE from the list of features
that may be cleared via a CLEAR_FEATURE request.  Experimentation
shows that omitting the attempt to clear PORT_ENABLE seems to result
in the correct hotplug behaviour.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/usb/usbhub.c

index cd7815834d81e3659a33058487cfd258081a7ac2..28d6cb33d8147ceb3544f750dbb37622ca6e55d1 100644 (file)
@@ -247,8 +247,10 @@ static int hub_disable ( struct usb_hub *hub, struct usb_port *port ) {
        int rc;
 
        /* Disable port */
-       if ( ( rc = usb_hub_clear_port_feature ( usb, port->address,
-                                                USB_HUB_PORT_ENABLE, 0 ) )!=0){
+       if ( ( hub->protocol < USB_PROTO_3_0 ) &&
+            ( ( rc = usb_hub_clear_port_feature ( usb, port->address,
+                                                  USB_HUB_PORT_ENABLE,
+                                                  0 ) ) != 0 ) ) {
                DBGC ( hubdev, "HUB %s port %d could not disable: %s\n",
                       hubdev->name, port->address, strerror ( rc ) );
                return rc;