]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
usb: xhci: Improve Soft Retries after short transfers
authorMichal Pecio <michal.pecio@gmail.com>
Wed, 3 Jun 2026 09:11:23 +0000 (12:11 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Jun 2026 17:23:29 +0000 (19:23 +0200)
A short transfer is a successful one, so reset the error count.
Otherwise, endpoints which always complete short are limited to
three retries per endpoint life rather than per URB.

Signed-off-by: Michal Pecio <michal.pecio@gmail.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://patch.msgid.link/20260603091132.1110849-7-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-ring.c

index a5342d49a65b4f2d56ee003d42cdeb7eb4b06d46..608b6f3ec9f6305eb50667275460f7e01cf6bbd8 100644 (file)
@@ -2516,6 +2516,7 @@ static void process_bulk_intr_td(struct xhci_hcd *xhci, struct xhci_virt_ep *ep,
                td->status = 0;
                break;
        case COMP_SHORT_PACKET:
+               ep->err_count = 0;
                td->status = 0;
                break;
        case COMP_STOPPED_SHORT_PACKET: