xhci: prevent double-fetch of transfer and transfer event TRBs
authorMathias Nyman <mathias.nyman@linux.intel.com>
Tue, 6 Apr 2021 07:02:08 +0000 (10:02 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 6 Apr 2021 09:16:56 +0000 (11:16 +0200)
commite9fcb07704fcef6fa6d0333fd2b3a62442eaf45b
treee22063c74163a077eb35edeaa2555dc1515134e7
parent286fd02fd54b6acab65809549cf5fb3f2a886696
xhci: prevent double-fetch of transfer and transfer event TRBs

The same values are parsed several times from transfer and event
TRBs by different functions in the same call path, all while processing
one transfer event.

As the TRBs are in DMA memory and can be accessed by the xHC host we want
to avoid this to prevent double-fetch issues.

To resolve this pass the already parsed values to the different functions
in the path of parsing a transfer event

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20210406070208.3406266-5-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-ring.c