aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2020-07-02 16:48:17 +0100
committerMichael Brown <mcb30@ipxe.org>2020-07-02 16:52:00 +0100
commit761ed4365a64ac34443a3de4c0e81e4b9491b33e (patch)
treebb923eaf0c1afde9adb5b328473a028521391963
parent8ff5babb47ff593088583c4e0872785ebcc87ade (diff)
downloadipxe-761ed4365a64ac34443a3de4c0e81e4b9491b33e.zip
ipxe-761ed4365a64ac34443a3de4c0e81e4b9491b33e.tar.gz
ipxe-761ed4365a64ac34443a3de4c0e81e4b9491b33e.tar.bz2
[usb] Do not attempt to disable USB3 hub ports
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>
-rw-r--r--src/drivers/usb/usbhub.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/drivers/usb/usbhub.c b/src/drivers/usb/usbhub.c
index cd78158..28d6cb3 100644
--- a/src/drivers/usb/usbhub.c
+++ b/src/drivers/usb/usbhub.c
@@ -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;