Browse Source

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>
Lan Tianyu 13 years ago
parent
commit
ca3c1539ad
1 changed files with 2 additions and 1 deletions
  1. 2 1
      drivers/usb/core/hub.c

+ 2 - 1
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)))