[PATCH] usb: xhci: Improve Soft Retries after short transfers

Michal Pecio posted 1 patch 1 week, 3 days ago
drivers/usb/host/xhci-ring.c | 1 +
1 file changed, 1 insertion(+)
[PATCH] usb: xhci: Improve Soft Retries after short transfers
Posted by Michal Pecio 1 week, 3 days ago
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>
---
 drivers/usb/host/xhci-ring.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index f0f66e18f174..a067e56d720d 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -2544,6 +2544,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:
-- 
2.48.1
Re: [PATCH] usb: xhci: Improve Soft Retries after short transfers
Posted by Mathias Nyman 6 days, 23 hours ago
On 5/29/26 12:20, Michal Pecio wrote:
> 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>

Added, Thanks

-Mathias