Re: [PATCH 1/2] EHCI big endian data structures support (for 440EPx) 2nd try

David Brownell <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
On Wednesday 02 May 2007, Vladimir A. Barinov wrote:

> I confirm that these patch works fine with my BE h/w (IXP4XX) and also 
> I've tested it with LE h/w (mips based board with LE on-SoC usb) in 
> 2.6.21-rc4.

Great, thanks!

 
> But I would like to post a minor comments:
>
> > The guts of the patch are to introduce the hc32 type and change all
> > references from le32 to hc32.  All access routines are converted from
> > cpu_to_le32(...) to cpu_to_hc32(ehci, ...) and similar for the other
> > "direction".  (This is the same approach used with OHCI.)
>    
> To be more close to OHCI approach we should add some additional Kconfig 
> rules to avoid run-time endianness checking for pure BE case (when MMIO
> and DESC have the same endianness).

The "approach" uses hc32 etc.  Agreed that it could be tweaked
more in that direction, for systems with BE silicon and no PCI.


> > +#ifdef CONFIG_USB_EHCI_BIG_ENDIAN_DESC
> > +typedef __u32 __bitwise __hc32;
> > +typedef __u16 __bitwise __hc16;
> > +#else
> > +#define __hc32	__le32
> > +#define __hc16	__le16
> > +#endif
> >   
> __hc16 is useless for EHCI. This just provide a mess.

In both cases, feel free to provide a patch.

My review isn't expected to cover all potential issues.

- Dave


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
[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.