summaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/hub.c
diff options
context:
space:
mode:
authorLan Tianyu2012-09-10 22:22:36 +0200
committerGreg Kroah-Hartman2012-09-11 00:27:37 +0200
commitca3c1539adfe9c1b86f16faf314b3bf54c3b5389 (patch)
tree0af08631247c7ed1910fddf3ed63f9e32f61a48f /drivers/usb/core/hub.c
parentusb : Add sysfs files to control port power. (diff)
downloadkernel-qcow2-linux-ca3c1539adfe9c1b86f16faf314b3bf54c3b5389.tar.gz
kernel-qcow2-linux-ca3c1539adfe9c1b86f16faf314b3bf54c3b5389.tar.xz
kernel-qcow2-linux-ca3c1539adfe9c1b86f16faf314b3bf54c3b5389.zip
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 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)))