mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Fabian van der Werf <fvanderwerf@gmail.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] usb: fix unaligned access
Date: Mon, 24 Oct 2011 20:37:52 +0200	[thread overview]
Message-ID: <CAJeSw6CfdF5UuN0fk=trKi-bJD009yDcasjkp_f2twR9giRaCw@mail.gmail.com> (raw)
In-Reply-To: <20111024170753.GN23421@pengutronix.de>

On Mon, Oct 24, 2011 at 7:07 PM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> On Mon, Oct 24, 2011 at 07:14:04PM +0400, Antony Pavlov wrote:
>> On 23 October 2011 13:29, Fabian van der Werf <fvanderwerf@gmail.com> wrote:
>> >>
>> >> Looks like a valid patch, I wonder that this never was a problem before.
>> >> ARM should break here aswell I think. What architecture are you using?
>> >>
>> >
>> > I am working with a pandaboard (arm cortex a9). The pandaboard has a
>> > usb ethernet controller, so I need usb to boot over tftp. I guess that
>> > most arm configurations don't need usb for booting, and in that case
>> > you won't run into this problem.
>>
>> I have DUB-E100 USB Ethernet (ID 2001:3c05) connected to Toshiba AC100
>> (NVidia Tegra2 --- Cortex A9); tftp works fine without usb unaligned
>> access patch.
>
> Works for me aswell, though the access definitely is unaligned.
>

Okay, I think it may be a compiler problem. The latest code sourcery
compiler builds a barebox that breaks on usb. 2009q1-203 builds fine,
however.

In the usb code the compiler should be able to figure out that the
access is unaligned from the packed structure. So I guess it should
split up the access in multiple loads/stores. I will look into the
binaries to confirm this. The latest compiler may be broken or maybe
the default behaviour has changed because armv7 actually supports
unaligned access.

Fabian


> Sascha
>
>
> --
> Pengutronix e.K.                           |                             |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
>

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2011-10-24 18:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-22 13:19 Fabian van der Werf
2011-10-22 20:20 ` Sascha Hauer
2011-10-23  9:29   ` Fabian van der Werf
2011-10-24 15:14     ` Antony Pavlov
2011-10-24 17:07       ` Sascha Hauer
2011-10-24 18:37         ` Fabian van der Werf [this message]
2011-10-24 19:02           ` Eric Bénard
2011-10-24 19:30             ` Sascha Hauer
2011-10-24 19:42               ` Eric Bénard
2011-10-25 18:36                 ` Fabian van der Werf

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='CAJeSw6CfdF5UuN0fk=trKi-bJD009yDcasjkp_f2twR9giRaCw@mail.gmail.com' \
    --to=fvanderwerf@gmail.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /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