NetBSD Problem Report #58139
From www@netbsd.org Thu Apr 11 14:03:11 2024
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 3D8171A9239
for <gnats-bugs@gnats.NetBSD.org>; Thu, 11 Apr 2024 14:03:11 +0000 (UTC)
Message-Id: <20240411140309.DA07E1A923A@mollari.NetBSD.org>
Date: Thu, 11 Apr 2024 14:03:09 +0000 (UTC)
From: thorpej@me.com
Reply-To: thorpej@me.com
To: gnats-bugs@NetBSD.org
Subject: xhci controller data toggle can get out of sync with device resulting in stalled transfers
X-Send-Pr-Version: www-1.0
>Number: 58139
>Category: kern
>Synopsis: xhci controller data toggle can get out of sync with device resulting in stalled transfers
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Apr 11 14:05:00 +0000 2024
>Originator: Jason Thorpe
>Release: NetBSD 10 and 10.99.x (and earlier as well)
>Organization:
United Federation of GAL Programmers
>Environment:
NetBSD the-ripe-vessel 10.99.10 NetBSD 10.99.10 (GENERIC) #68: Fri Nov 17 14:40:27 PST 2023 thorpej@the-ripe-vessel:/space/src/sys/arch/amd64/compile/GENERIC amd64
>Description:
It is possible for the data toggle (i.e. which data PID is expected next during a transfer) to get out of sync between the xhci controller and a device, resulting in a stalled transfer. The issue is described in a 2018 issue report for libusb:
https://github.com/libusb/libusb/issues/399
This can be easily reproduced using the "minipro" program with a TL866II+ programmer; running "minipro" (to e.g. query the programmer) the first time succeeds, but running it a second time stalls until the device is disconnected and reconnected.
The solution is to issue a CONFIGURE_ENDPOINT with both a DROP and an ADD of the endpoint in question at the correct time. The discussion in the libusb issue above references the change to the Linux xhci driver that addresses the problem.
>How-To-Repeat:
See above.
>Fix:
See above. Someone who groks the xhci driver should be able to make heads-or-tails of it.
(Contact us)
$NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.