public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Michael Wileczka <mikewileczka@yahoo.com>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 001/001] USB: ftdi_sio: fix endianess of max packet size
Date: Thu, 19 Aug 2010 14:46:20 -0700	[thread overview]
Message-ID: <20100819144620.e078fbbe.akpm@linux-foundation.org> (raw)
In-Reply-To: <281434.37339.qm@web65616.mail.ac4.yahoo.com>

On Wed, 18 Aug 2010 07:14:37 -0700 (PDT)
Michael Wileczka <mikewileczka@yahoo.com> wrote:

> 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);
>  }

So I guess nobody noticed this because the driver deosn't get used on
big-endian machines a lot?

What are the user-visible effects of this bug?

  reply	other threads:[~2010-08-19 21:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-18 14:14 [PATCH 001/001] USB: ftdi_sio: fix endianess of max packet size Michael Wileczka
2010-08-19 21:46 ` Andrew Morton [this message]
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=20100819144620.e078fbbe.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mikewileczka@yahoo.com \
    /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