From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796270699; b=t2+9aRJC/okG8HFAdXLXSoHnvLcHujZL7SeNnbHPUXA5OJwjOoLyCBktkMGNUX5yBPkt XMdVxGw4YFxzNSUEj+N6ghPveKNznTGa84bPH8fxkrp1qzTB9whcu9cUf1CMLYckpqFeo +Ehln8xtGmhXiZoUJfWNs6jBDGD692fyErDSloRQjXle9i6U+UdaZB+uPll1MtJI9SkVk nLGuE4LCe6END9PTAUGc3dQShuH/SUtxUd5RoyMtlfEPgFWzK3dqmX2lk31ZX2HPjJ5pq X7dPMHb6iDERYoyW6gP5DcEEuRjTZTS+5PCD8XZHeHhtnQGwjHRgwyyhq+RPfsjcqwQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796270699; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=PwQmsvlh4NgbAhbBUSwaQ0DeiPC8PEkhksmwp/nAAWw=; b=uxJO44l9kyGoTuO1juyBnEqQXwXhW5UtGkjgoaw86v2JVBbw6Q4Ci3ViwEhh1Pxz2evp L7XqYf3YUxdYBw6Hl3Mb+zZvNk3DabVMyxk8J86bbFznaPDm2e28bi9rJpXwT78szPnlJ bOqIzs57996OyiJ7VhdgXZZQwvVFU0UhgylQ/BYS1zRb3Uyg6oSVeMteII1UCjR1dA1/2 z54km3rWUa/ACxiCKpOfhgC+aRkcSSptivfB9kGQ3bbQqNQNeQ5yHFvwDDzJ/+/kmK5eW +f4NvI8zPHcbJ718rnjqUELEysZqDA6eVU5LwdKnAyltc+adcISByP1Y24mUcNaMLNQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=WnhG8MsB; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 008CC606A334; Thu, 3 Dec 2026 04:04:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=WnhG8MsB Received: by smtp.kernel.org (Postfix) with ESMTPSA id 508F11F000C1; Thu, 3 Dec 2026 04:04:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796270698; bh=PwQmsvlh4NgbAhbBUSwaQ0DeiPC8PEkhksmwp/nAAWw=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=WnhG8MsBaGbHdfCehjWLVoj6wTrxzwa7ALT90LaXvAvAWlkL1FXoBzoaRJz1uu735 XApPe1E4Ss23KqnB1e3W323pmBtDLCk958g8cP2NixdbEm4VvIBPjaPnaLAiRawhU3 LBhIhEMwmU0eIM4JiQvr+XQAw7pXgwnTHUGFyZM8= Date: Thu, 3 Dec 2026 04:52:49 +0100 From: Greg Kroah-Hartman To: matthew Boyle Cc: Mathias Nyman , Niklas Neronin , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Michal Pecio Subject: Re: Fwd: [PATCH] usb: xhci: dbc: advance transfer ring dequeue pointer on completion Message-ID: <2026120334-overbill-energy-e4c7@gregkh> References: X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Wed, Dec 02, 2026 at 11:32:19AM -0500, matthew Boyle wrote: > Good Morning, > Commit 7ee645963075 ("usb: xhci: remove legacy 'num_trbs_free' > tracking") removed ring->num_trbs_free and switched > xhci_dbc_queue_bulk_tx() to xhci_num_trbs_free(ring), which computes > free space from ring->enqueue and ring->dequeue. > > However, DbC transfer rings never updated ring->dequeue on transfer > completion; previously only ring->num_trbs_free was incremented in > dbc_handle_xfer_event(). As a result, ring->dequeue remains stuck at > the start of the single-segment ring while ring->enqueue advances. > After exactly 254 TRBs (254 * 1024 B = 260,096 B on a 256-TRB segment > with one link TRB and the xhci_num_trbs_free(ring) <= num_trbs guard), > xhci_num_trbs_free() drops to 1 and every subsequent bulk transfer > fails permanently with -EBUSY ("failed to queue trbs"). > > Add a dbc_inc_deq() helper mirroring xhci_dbc_queue_trb()'s link-TRB > wraparound and call it in dbc_handle_xfer_event() before giving back > completed and stale stalled requests (while dbc->lock is still held, > before completion callbacks can re-queue new TRBs). > > Fixes: 7ee645963075 ("usb: xhci: remove legacy 'num_trbs_free' tracking") > Closes: https://bugzilla.kernel.org/show_bug.cgi?id=222348 > Cc: stable@vger.kernel.org > Signed-off-by: Matthew Boyle > --- > (Note: sent via Gmail web; the clean git format-patch file with > preserved tabs is also attached as > 0001-usb-xhci-dbc-advance-transfer-ring-dequeue-pointer-o.patch.) > > drivers/usb/host/xhci-dbgcap.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > Hi, This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to these common problems, but in order to save his sanity (he kept writing the same thing over and over, yet to different people), I was created. Hopefully you will not take offence and will fix the problem in your patch and resubmit it so that it can be accepted into the Linux kernel tree. You are receiving this message because of the following common error(s) as indicated below: - Your patch is malformed (tabs converted to spaces, linewrapped, etc.) and can not be applied. Please read the file, Documentation/process/email-clients.rst in order to fix this. - Your patch was attached, please place it inline so that it can be applied directly from the email message itself. If you wish to discuss this problem further, or you have questions about how to resolve this issue, please feel free to respond to this email and Greg will reply once he has dug out from the pending patches received from other developers. thanks, greg k-h's patch email bot