Skip to content

usb: xhci: expand mitigations for VLI_SS_BULK_OUT_BUG quirk - #5173

Merged
pelwell merged 1 commit into
raspberrypi:rpi-5.15.yfrom
P33M:vli_bulk_bursts_v2
Sep 13, 2022
Merged

pelwell merged 1 commit into
raspberrypi:rpi-5.15.yfrom
P33M:vli_bulk_bursts_v2

Conversation

@P33M

@P33M P33M commented Sep 13, 2022

Copy link
Copy Markdown
Contributor

After several months back-and-forth with VIA, we have a candidate root-cause for #4844 and a suggested fix. My known-bad pendrive now gets written to endlessly without suffering data corruption.

Comment thread drivers/usb/host/xhci-mem.c Resolved
The VL805 can cause data corruption if a SS Bulk OUT endpoint enters a
flow-control condition and there are TRBs in the transfer ring that are
not an integral size of wMaxPacket and the endpoint is behind one or more
hubs.

This is frequently the case encountered when FAT32 filesystems are
present on mass-storage devices with cluster sizes of 1 sector, and the
filesystem is being written to with an aggregate of small files.

The initial implementation of this quirk separated TRBs that didn't
adhere to this limitation into two - the first a multiple of wMaxPacket
and the second the 512-byte remainder - in an attempt to force TD
fragments to align with packet boundaries. This reduced the incidence
rate of data corruption but did not resolve it.

The fix as recommended by VIA is to disable bursts if this sequence of
TRBs can occur.

Limit turning off bursts to just USB mass-storage devices by searching
the device's configuration for an interface with a class type of
USB_CLASS_MASS_STORAGE.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
@P33M
P33M force-pushed the vli_bulk_bursts_v2 branch from 556cd3e to c9e051a Compare September 13, 2022 14:09
@pelwell
pelwell merged commit 3157603 into raspberrypi:rpi-5.15.y Sep 13, 2022
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Sep 13, 2022
popcornmix added a commit to raspberrypi/rpi-firmware that referenced this pull request Sep 13, 2022
@P33M
P33M deleted the vli_bulk_bursts_v2 branch September 14, 2022 19:05
Comment thread drivers/usb/host/xhci-mem.c Resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants