aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/hub.c
diff options
context:
space:
mode:
authorLan Tianyu <tianyu.lan@intel.com>2012-09-11 04:22:36 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-10 15:27:37 -0700
commitca3c1539adfe9c1b86f16faf314b3bf54c3b5389 (patch)
tree0af08631247c7ed1910fddf3ed63f9e32f61a48f /drivers/usb/core/hub.c
parentca9c9d0c922e4f1dac80699ebab1269d6dbaff85 (diff)
usb: add little-endian transform for DeviceRemovable of usb3.0 hub
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/core/hub.c')
-rw-r--r--drivers/usb/core/hub.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 3def91eecaa..aa45e43e0ca 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -2190,7 +2190,8 @@ static void set_usb_port_removable(struct usb_device *udev)
return;
if (hub_is_superspeed(hdev)) {
- if (hub->descriptor->u.ss.DeviceRemovable & (1 << port))
+ if (le16_to_cpu(hub->descriptor->u.ss.DeviceRemovable)
+ & (1 << port))
removable = false;
} else {
if (hub->descriptor->u.hs.DeviceRemovable[port / 8] & (1 << (port % 8)))