mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matthew Garrett <mjg59@coreos.com>
To: gregkh@linuxfoundation.org
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Matthew Garrett <mjg59@coreos.com>
Subject: [PATCH 2/2] usb: Set unused ports to "fixed" rather than "unknown"
Date: Wed,  8 Apr 2015 16:36:01 -0700	[thread overview]
Message-ID: <1428536161-2978-2-git-send-email-mjg59@coreos.com> (raw)
In-Reply-To: <1428536161-2978-1-git-send-email-mjg59@coreos.com>

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>
---
 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


  reply	other threads:[~2015-04-08 23:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-08 23:36 [PATCH 1/2] usb: Prefer firmware values when determining whether a port is removable Matthew Garrett
2015-04-08 23:36 ` Matthew Garrett [this message]
2015-04-09  9:31 ` Greg KH
2015-04-09 17:19   ` Matthew Garrett

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1428536161-2978-2-git-send-email-mjg59@coreos.com \
    --to=mjg59@coreos.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome