xhci: Clean up cycle bit math used during stalls.
commitba0a4d9aaae789a6a632968b27c21d49b858b13a
authorSarah Sharp <sarah.a.sharp@linux.intel.com>
Thu, 24 Feb 2011 02:13:43 +0000 (23 18:13 -0800)
committerSarah Sharp <sarah.a.sharp@linux.intel.com>
Mon, 14 Mar 2011 01:23:56 +0000 (13 18:23 -0700)
tree22e76438fe70720fa89d683586009cc028bceb0e
parent01a1fdb9a7afa5e3c14c9316d6f380732750b4e4
xhci: Clean up cycle bit math used during stalls.

Use XOR to invert the cycle bit, instead of a more complicated
calculation.  Eliminate a check for the link TRB type in find_trb_seg().
We know that there will always be a link TRB at the end of a segment, so
xhci_segment->trbs[TRBS_PER_SEGMENT - 1] will always have a link TRB type.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Tested-by: Takashi Iwai <tiwai@suse.de>
drivers/usb/host/xhci-ring.c