USB: Set usb port's DeviceRemovable according acpi information
authorLan Tianyu <tianyu.lan@intel.com>
Mon, 21 Jan 2013 14:18:00 +0000 (22:18 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Jan 2013 21:22:03 +0000 (13:22 -0800)
commitd2123fd9e1a56b8006986ed37e0aaf93ef0dd978
tree2c48de8b3450bda69a6926e9e7e53b551a74a1b4
parent5c6e9bf011bca072648017477b0fe36402be1415
USB: Set usb port's DeviceRemovable according acpi information

ACPI provide "_PLD" and "_UPC" aml methods to describe usb port
visibility and connectability. This patch is to add usb_hub_adjust_DeviceRemovable()
to adjust usb hub port's DeviceRemovable according ACPI information and invoke it in
the rh_call_control(). When hub descriptor request is issued at first time,
usb port device isn't created and usb port is not bound with acpi. So first
hub descriptor request is not changed based on ACPI information. After usb
port devices being created, call usb_hub_adjust_DeviceRemovable in the hub_configure()
and then set hub port's DeviceRemovable according ACPI information and this also works
for non-root hub.

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/hcd.c
drivers/usb/core/hub.c
drivers/usb/core/usb.h