mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 20:32:04 +09:00
USB: ftdi_sio: fix endianess of max packet size
commit d1ab903d25 upstream.
The USB max packet size (always little-endian) was not being byte
swapped on big-endian systems.
Applicable since [USB: ftdi_sio: fix hi-speed device packet size calculation] approx 2.6.31
Signed-off-by: Michael Wileczka <mikewileczka@yahoo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
c4f36c926f
commit
c913aa0958
@@ -1410,7 +1410,7 @@ static void ftdi_set_max_packet_size(struct usb_serial_port *port)
|
||||
}
|
||||
|
||||
/* set max packet size based on descriptor */
|
||||
priv->max_packet_size = ep_desc->wMaxPacketSize;
|
||||
priv->max_packet_size = le16_to_cpu(ep_desc->wMaxPacketSize);
|
||||
|
||||
dev_info(&udev->dev, "Setting MaxPacketSize %d\n", priv->max_packet_size);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user