aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/cdns3/cdns3-imx.c
diff options
context:
space:
mode:
authorMathias Nyman <[email protected]>2021-02-03 11:37:02 +0000
committerGreg Kroah-Hartman <[email protected]>2021-02-03 12:14:45 +0000
commitd4a610635400ccc382792f6be69427078541c678 (patch)
treec7a11e18f8862b084d6cf7e5761f1bc0e0d22ea7 /drivers/usb/cdns3/cdns3-imx.c
parentusb: host: xhci: mvebu: make USB 3.0 PHY optional for Armada 3720 (diff)
downloadkernel-d4a610635400ccc382792f6be69427078541c678.tar.gz
kernel-d4a610635400ccc382792f6be69427078541c678.zip
xhci: fix bounce buffer usage for non-sg list case
xhci driver may in some special cases need to copy small amounts of payload data to a bounce buffer in order to meet the boundary and alignment restrictions set by the xHCI specification. In the majority of these cases the data is in a sg list, and driver incorrectly assumed data is always in urb->sg when using the bounce buffer. If data instead is contiguous, and in urb->transfer_buffer, we may still need to bounce buffer a small part if data starts very close (less than packet size) to a 64k boundary. Check if sg list is used before copying data to/from it. Fixes: f9c589e142d0 ("xhci: TD-fragment, align the unsplittable case with a bounce buffer") Cc: [email protected] Reported-by: Andreas Hartmann <[email protected]> Tested-by: Andreas Hartmann <[email protected]> Signed-off-by: Mathias Nyman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-imx.c')
0 files changed, 0 insertions, 0 deletions