usb: xhci: borrow upstream TRB_FETCH quirk on VL805 hosts
authorJonathan Bell <jonathan@raspberrypi.com>
Thu, 13 Jul 2023 14:06:54 +0000 (15:06 +0100)
committerDom Cobley <popcornmix@gmail.com>
Mon, 19 Feb 2024 11:33:37 +0000 (11:33 +0000)
commitce46110d1b4fbd49a17ad58e273857d604f22811
tree54bc684ba4f47013c1c38979ee7a730f988f0aeb
parente6586d0675c1dcced5df9e6cd8ba22bf02dcd0a4
usb: xhci: borrow upstream TRB_FETCH quirk on VL805 hosts

This reimplements 5a57342 usb: xhci: add VLI_TRB_CACHE_BUG quirk

The downstream implementation required a fair bit of driver surgery to
allow for truncated ring segments, which needed to shrink by a small
amount to avoid the cache prefetcher from reading off the end of one
segment and into another.

An upstream implementation for a similar bug on a different controller
just doubles the size of the memory allocated for ring segments, which
is a bit more wasteful (+4K per allocation) but means less code churn.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
drivers/usb/host/xhci-pci.c