Re: Ответ: Unaligned acces s in EHCI driver

David Brownell <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
On Friday 02 March 2007 7:38 am, Alan Stern wrote:
> On Fri, 2 Mar 2007, Max Dmitrichenko wrote:
> 
> > > > > Strange ... but, ACK.
> > > >
> > > > It would be a good idea to track this down a little further.  The comment
> > > > in the code _should_ be correct.  If it isn't, then something funny is
> > > > going on.
> > 
> > Why then the OHCI driver (ohci-hub.c) in the same function does have
> > explicit put_unaligned()?
> 
> I don't know.  Probably there was no particular reason; the two routines 
> were written at different times and done in different ways.  Look in 
> uhci-hub.c for yet a third variation; it uses two aligned 16-bit writes.

Dave Miller added an OHCI patch for SPARC at some point, but not EHCI.

Relying on that buffer to be aligned was always a bit of a hack, but I
think that code was written for OHCI back in 2.2.early days, which may
have preceded the unaligned accessors ... then copied into EHCI.

- Dave

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.