xhci: fix derivation of TRB's DMA address in xhci_log_event Trace Event Class
authorXenia Ragiadakou <burzalodowa@gmail.com>
Mon, 9 Sep 2013 18:03:11 +0000 (21:03 +0300)
committerSarah Sharp <sarah.a.sharp@linux.intel.com>
Mon, 2 Dec 2013 20:59:45 +0000 (12:59 -0800)
commitf00466963817c8a240f022af864cdc39d482cdb7
treec1a773add5db056c53e5d7e882faf7856d3d8f20
parent7e76ad431545d013911ddc744843118b43d01e89
xhci: fix derivation of TRB's DMA address in xhci_log_event Trace Event Class

This patch fixes the retrieval of the DMA address of the TRB that generated
the event by converting the field[0] (low address bits) and field[1] (high
address bits) to CPU byteorder and then typecasting field[1] to u64 so that
the bitshift will not lead to overflow.
In the original code, the typecasting of le32 to u64 was incorrect and the
subsequent conversion to le64 reverts the low and high address parts.
This bug was found using sparse.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
drivers/usb/host/xhci-trace.h