xhci: Make xHCI driver endian-safe
authorMatt Evans <matt@ozlabs.org>
Tue, 29 Mar 2011 02:40:46 +0000 (13:40 +1100)
committerSarah Sharp <sarah.a.sharp@linux.intel.com>
Mon, 2 May 2011 23:42:49 +0000 (16:42 -0700)
commit28ccd2962c66556d7037b2d9f1c11cdcd3b805d5
tree02bf9319e60c43c655a97aedeb76ec5171459508
parent7fc2a61638ef78cdf8d65d5934782963a6e0fc66
xhci: Make xHCI driver endian-safe

This patch changes the struct members defining access to xHCI device-visible
memory to use __le32/__le64 where appropriate, and then adds swaps where
required.  Checked with sparse that all accesses are correct.

MMIO accesses use readl/writel so already are performed LE, but prototypes
now reflect this with __le*.

There were a couple of (debug) instances of DMA pointers being truncated to
32bits which have been fixed too.

Signed-off-by: Matt Evans <matt@ozlabs.org>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
drivers/usb/host/xhci-dbg.c
drivers/usb/host/xhci-hub.c
drivers/usb/host/xhci-mem.c
drivers/usb/host/xhci-ring.c
drivers/usb/host/xhci.c
drivers/usb/host/xhci.h