Skip to content

Commit

Permalink
USB: ftdi_sio: fix endianess of max packet size
Browse files Browse the repository at this point in the history
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>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Michael Wileczka authored and Greg Kroah-Hartman committed Aug 24, 2010
1 parent 7291679 commit d1ab903
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/serial/ftdi_sio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1376,7 +1376,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);
}
Expand Down

0 comments on commit d1ab903

Please sign in to comment.