From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 676B83C73D7; Fri, 22 May 2026 10:39:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779446381; cv=none; b=FsX4J9NxqK/OZ/4dhsVLayhZFy3eTb4n9Wnzjwiqb6Tge8yh3Y381TTyymcvarI3FrfdXlX3bJ5s9lvEQeNas38XIvytg9z0QJunVtFVlaC1foyr68tu5xF5L6ozleRQLlBm0Ad3Yz9Z6jDbg2Ea4jRotTizGQ14veYdZbKnX0U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779446381; c=relaxed/simple; bh=3SS85W7AN4kgeLXRo41OHOunVnR7aevl5WaTAw9IfUM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=O8PQYK7jv3JedI6No9jcSeLv4E3uf/Z7op/hlv1MOowZsyOJ3HEeRMf1KqHVRI8BBwTEvVRIoUy8JHvpL9DgM27MTLDktwXYX0giEPDqZ9qMjPYJWNsi8BhYAptqoZUG4iETToc0PeyPlxmR+vQsO3l+LuFNmcdPS8GyIkgaMWM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=KuIODNQ6; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="KuIODNQ6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 88B0C1F000E9; Fri, 22 May 2026 10:39:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1779446380; bh=U31A1LWQEZQv+LXroB0X1eI2M0JFE0ukry7xzNzoeUg=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=KuIODNQ6OOHoGo0cYLFvHrt8YEexkoIAL1K0N6viXROOtJhO8a77nfiqROjVskwpL MnXLfvttc46h8p3cOWyNakyuhjw7emDfPeX1IFqIHwTOX6Rd6zfc58ZBpwLip643h9 FBbCsSuVqIdymM+Wfr5shwZ9OXXghUOYScMckaX0= Date: Fri, 22 May 2026 12:39:42 +0200 From: Greg Kroah-Hartman To: Paul Menzel Cc: Mathias Nyman , Mathias Nyman , George D Sworo , Matt DeVillier , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] xhci: check for a pending command completion during command timeout Message-ID: <2026052218-starboard-reach-5db4@gregkh> References: <20260522085828.24142-2-pmenzel@molgen.mpg.de> <20260522085828.24142-4-pmenzel@molgen.mpg.de> <2026052213-deserving-oppressor-bb81@gregkh> Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Fri, May 22, 2026 at 11:35:47AM +0200, Paul Menzel wrote: > Dear Greg, > > > Am 22.05.26 um 11:23 schrieb Greg Kroah-Hartman: > > On Fri, May 22, 2026 at 10:58:27AM +0200, Paul Menzel wrote: > > > From: Mathias Nyman > > > > > > It's possible a command times out even if xHC hardware already completed > > > the command. Driver is unaware of the command completion if interrupt > > > handler is blocked for a long time. > > > > > > Check if there is an unhandled command completion on the event ring during > > > command timeout. > > > > > > In this case just give the command additional time to complete. There's no > > > point in aborting the command ring to move past a stuck command. > > > > > > Signed-off-by: Mathias Nyman > > > Signed-off-by: George D Sworo > > > Link: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/478ab723af9414b0a2a2fbc59ac34f5d319a4fc3 > > > [pmenzel: one adaptation for mainline 7.1: next_trb() uses the > > > 2-argument form next_trb(&seg, &deq) — the mainline 7.1 signature > > > dropped the xhci and ring arguments present in the 6.12 source the > > > patch was ported from. xhci_pending_interrupt() is used directly as > > > it is now committed as the preceding prerequisite.] > > > Assisted-by: Claude Sonnet 4.6 > > > [pmenzel: No devices with the problem available, but no regressions on > > > Dell XPS 13 9360 and QEMU 7.2.0. > > > > > > qemu-system-x86_64 -enable-kvm -cpu host -m 3G -device qemu-xhci,id=xhci -device usb-storage,bus=xhci.0 > > > > > > xHCI host controller initialised cleanly, USB 3.0 SuperSpeed root > > > hubs and USB mass storage device enumerated without errors. > > > The specific race (command timeout with blocked interrupt handler) > > > cannot easily be forced in QEMU, but no regressions in the normal > > > command path were observed.] > > > > What are these additions from? Did you mean to send these out to the > > lists? > > Yes, they are authored by me and meant for the list. I wanted to document, > where I got the patch from and how I tested the change. Feel free to remove > them. These make no sense, please remove them yourself and resend. thanks, greg k-h