summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLan Tianyu <tianyu.lan@intel.com>2012-09-11 00:22:36 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-11 02:27:37 +0400
commitca3c1539adfe9c1b86f16faf314b3bf54c3b5389 (patch)
tree0af08631247c7ed1910fddf3ed63f9e32f61a48f /drivers
parentca9c9d0c922e4f1dac80699ebab1269d6dbaff85 (diff)
downloadlinux-ca3c1539adfe9c1b86f16faf314b3bf54c3b5389.tar.xz
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')
-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 3def91eecaad..aa45e43e0ca9 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)))