public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Michael Wileczka <mikewileczka@yahoo.com>
To: linux-usb@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 001/001] USB: ftdi_sio: fix endianess of max packet size
Date: Wed, 18 Aug 2010 07:14:37 -0700 (PDT)	[thread overview]
Message-ID: <281434.37339.qm@web65616.mail.ac4.yahoo.com> (raw)

From: Michael Wileczka <mikewileczka@yahoo.com>

The USB max packet size (always little-endian) was not being byte swapped on big-endian systems.
Created with 2.6.32.16
Applicable since [USB: ftdi_sio: fix hi-speed device packet size calculation] approx 2.6.31

Signed-off-by: Michael Wileczka <mikewileczka@yahoo.com>
---
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -1397,7 +1397,7 @@ static void ftdi_set_max_packet_size(str
 	}
 
 	/* 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);
 }




             reply	other threads:[~2010-08-18 14:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-18 14:14 Michael Wileczka [this message]
2010-08-19 21:46 ` [PATCH 001/001] USB: ftdi_sio: fix endianess of max packet size Andrew Morton
2010-08-19 23:01   ` Stephen Pape

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=281434.37339.qm@web65616.mail.ac4.yahoo.com \
    --to=mikewileczka@yahoo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox