diff options
author | Mathias Nyman <mathias.nyman@linux.intel.com> | 2024-06-11 14:06:07 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-06-12 09:43:36 +0200 |
commit | f0260589b439e2637ad54a2b25f00a516ef28a57 (patch) | |
tree | 4d6ec429b14d857d8bd067b525aab6359f24f8ed /.gitattributes | |
parent | Merge tag 'thunderbolt-for-v6.10-rc3' of git://git.kernel.org/pub/scm/linux/k... (diff) | |
download | linux-f0260589b439e2637ad54a2b25f00a516ef28a57.tar.xz linux-f0260589b439e2637ad54a2b25f00a516ef28a57.zip |
xhci: Set correct transferred length for cancelled bulk transfers
The transferred length is set incorrectly for cancelled bulk
transfer TDs in case the bulk transfer ring stops on the last transfer
block with a 'Stop - Length Invalid' completion code.
length essentially ends up being set to the requested length:
urb->actual_length = urb->transfer_buffer_length
Length for 'Stop - Length Invalid' cases should be the sum of all
TRB transfer block lengths up to the one the ring stopped on,
_excluding_ the one stopped on.
Fix this by always summing up TRB lengths for 'Stop - Length Invalid'
bulk cases.
This issue was discovered by Alan Stern while debugging
https://bugzilla.kernel.org/show_bug.cgi?id=218890, but does not
solve that bug. Issue is older than 4.10 kernel but fix won't apply
to those due to major reworks in that area.
Tested-by: Pierre Tomon <pierretom+12@ik.me>
Cc: stable@vger.kernel.org # v4.10+
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20240611120610.3264502-2-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to '.gitattributes')
0 files changed, 0 insertions, 0 deletions