Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932543AbbDHXgY (ORCPT ); Wed, 8 Apr 2015 19:36:24 -0400 Received: from cavan.codon.org.uk ([93.93.128.6]:56095 "EHLO cavan.codon.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932437AbbDHXgV (ORCPT ); Wed, 8 Apr 2015 19:36:21 -0400 From: Matthew Garrett To: gregkh@linuxfoundation.org Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Matthew Garrett Date: Wed, 8 Apr 2015 16:36:01 -0700 Message-Id: <1428536161-2978-2-git-send-email-mjg59@coreos.com> X-Mailer: git-send-email 2.3.4 In-Reply-To: <1428536161-2978-1-git-send-email-mjg59@coreos.com> References: <1428536161-2978-1-git-send-email-mjg59@coreos.com> X-cavan-blacklisted-at: zen.spamhaus.org X-SA-Do-Not-Run: Yes X-SA-Exim-Connect-IP: 67.169.119.23 X-SA-Exim-Mail-From: mjg59@coreos.com X-Spam-ASN: Subject: [PATCH 2/2] usb: Set unused ports to "fixed" rather than "unknown" X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:54:46 +0000) X-SA-Exim-Scanned: Yes (on cavan.codon.org.uk) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1019 Lines: 33 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 --- drivers/usb/core/hub.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index ac33fdd..8166bcc 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; } /* -- 2.3.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/