summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Garrett <mjg59@coreos.com>2015-04-08 16:36:01 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-05-08 01:43:43 +0200
commit58339c2e8b6181e6ffb2ef0dccc4d010b8acd013 (patch)
tree9abe5aac63d0067431a98c54a8ef6518cbe4426d
parent92bfbf71350b320f718a35446f017fbefd51d850 (diff)
downloadop-kernel-dev-58339c2e8b6181e6ffb2ef0dccc4d010b8acd013.zip
op-kernel-dev-58339c2e8b6181e6ffb2ef0dccc4d010b8acd013.tar.gz
usb: Set unused ports to "fixed" rather than "unknown"
The Microsoft document "Using ACPI to Configure USB Ports on a Computer" makes it clear that the removable flag will be cleared on ports that are marked as unused by the firmware. Handle this case to match. Signed-off-by: Matthew Garrett <mjg59@coreos.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/core/hub.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 2df229c..95041b6 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -2359,8 +2359,11 @@ static void set_usb_port_removable(struct usb_device *udev)
udev->removable = USB_DEVICE_REMOVABLE;
return;
case USB_PORT_CONNECT_TYPE_HARD_WIRED:
+ case USB_PORT_NOT_USED:
udev->removable = USB_DEVICE_FIXED;
return;
+ default:
+ break;
}
/*
OpenPOWER on IntegriCloud