]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
usb: Set unused ports to "fixed" rather than "unknown"
authorMatthew Garrett <mjg59@coreos.com>
Wed, 8 Apr 2015 23:36:01 +0000 (16:36 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 7 May 2015 23:43:43 +0000 (01:43 +0200)
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>
drivers/usb/core/hub.c

index 2df229cb3dc6c07f174cdba385377d21e70d3bd2..95041b66b912dd3430a65f9aa84e29934cb71f3c 100644 (file)
@@ -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;
        }
 
        /*