On Mon, 9 May 2011, Jan Andersson wrote: > This patch adds support for universal host controllers that use > big endian descriptors. Support for BE descriptors requires a non-PCI > host controller. For kernels with PCI-only UHCI there should be no > change in behaviour. > > This patch tries to replicate the technique used to support BE descriptors > in the EHCI HCD. Parts added to uhci-hcd.h are basically copy'n'paste from > ehci.h. ... > +/* cpu to uhci */ > +static inline __hc32 cpu_to_hc32(const struct uhci_hcd *uhci, const u32 x) > +{ > + return uhci_big_endian_desc(uhci) > + ? (__force __hc32)cpu_to_be32(x) > + : (__force __hc32)cpu_to_le32(x); > +} > + > +/* uhci to cpu */ > +static inline u32 hc32_to_cpu(const struct uhci_hcd *uhci, const __hc32 x) > +{ > + return uhci_big_endian_desc(uhci) > + ? be32_to_cpu((__force __be32)x) > + : le32_to_cpu((__force __le32)x); > +} > + > +static inline u32 hc32_to_cpup(const struct uhci_hcd *uhci, const __hc32 *x) > +{ > + return uhci_big_endian_desc(uhci) > + ? be32_to_cpup((__force __be32 *)x) > + : le32_to_cpup((__force __le32 *)x); > +} These *_cpup() routines aren't used anywhere. You might as well leave them out. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html