From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=192.198.163.14 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796299408; b=mU1Y3+SiO7fE7k1PnRf9MJtuA1menydA4900iod+gOLODy6OYmSTXaDsha4oZtL39g1R U4+Qgv5kMZWkqnkNbeIYYTIc3xeDSsWcIGStieWXUXbXPpuDQt0fKK7njZs7pL5KcqMaW KMsz8YQkREQZecfn8hP1Gp22dCOh156yrMuBws+XeAixJN+eP/oGO0NViFkqvk5s8GhML NuM1/s6L0ZfgPfVrMqL3zLfUsw9SVuYxW/m+cNYEcJZvA6zgoQlRu4RzVREJuaxeD9Kw2 D3B2E1zwxqxAVxLpqQ4ErpHbVd2vU1v0y0kMXHswMHoFuNqMOL5w8zA262ZgclUbGhQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796299408; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:X-IronPort-AV:Received:X-CSE-ConnectionGUID: X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:Received:Message-ID:Date: MIME-Version:User-Agent:Subject:To:Cc:References:Content-Language: From:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=jtIWJfTBrIUDMvHJcQj6FW9ft4n46eweYZK/0PFxLhM=; b=DLH0TsQ+SNNy6YBWLo3fjdGAldFflJfZjv0GAyYiJ0b/qKUI3eq9kln1kZiwtSgYtLc6 ff5C0qFnBo/wwKa+g1/flk+CbxFmWyuY4MatVhDKHtbRHPlauTbH5LwYNzGvCZdMXsawg 3Hafi9GGdqDVjR+0qSlXLuFSF+2eiw85zz1K3KgLIoCRG/a0Ix9fm4ITKTSDQNF8Huqhl pvIYzMoG3rHirJo6UwU/h9eALhRxFLZ1zQ8jC9Jybow5hPFKqPRMNWZW4/lq0fhPEBY1p dtbqBBHcGfuB63AS5aqf4Wjqn5EZMZ5crkmE0GlpYsCcXSnwcHCySwTF1b6qrQSxAYA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=Jq4tomgm; arc=none smtp.remote-ip=192.198.163.14 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AE79D606A322 for ; Thu, 3 Dec 2026 12:03:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org AE79D606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=Jq4tomgm DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796299407; x=1827835407; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=jtIWJfTBrIUDMvHJcQj6FW9ft4n46eweYZK/0PFxLhM=; b=Jq4tomgm7P5Qiz6fQVnU6fe3o5CCjhKVTjhuPZ/utiDlwaoC5btCRuE/ OKHSHxSntr1NX9gmy82En/fXUwTsnANb9o36LN8m9QWDfn/ue5jTBi9BO aCmT2GCXcoE6IEWVRVJeHCBrorNh3WBVqgKGpgS5Yi9HnDd2fMgXa5KG1 3XEsCdgftnMClELP/ABvAurpwp9zRPWfkK+HPSjhst3oUWjAmsjovpXzF krOhYZXpkAdLdqlyH4c9x85AiT18n+zWxXwBnE4+1KM13AeIMnD3bn1AT MO6pW8oS1PwiIaSfOYQjqTta3MpeLc132pLuo3f+OjvEUwyQttL8iRP3u g==; X-CSE-ConnectionGUID: 7VWAL820R0aBWn4u6DAheQ== X-CSE-MsgGUID: ZjrDKNcpQUaB+sIm9nsQVw== X-IronPort-AV: E=McAfee;i="6800,10657,11984"; a="5229201" X-IronPort-AV: E=Sophos;i="6.27,248,1787036400"; d="scan'208";a="5229201" Received: from fmviesa013.fm.intel.com ([10.60.135.153]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2026 04:03:19 -0800 X-CSE-ConnectionGUID: 1DPZFkgPTJuVc4KD3CIrog== X-CSE-MsgGUID: gNrLdwxkR92cgDRow7hJGw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,248,1787036400"; d="scan'208";a="15766921" Received: from nneronin-mobl1.ger.corp.intel.com (HELO [10.94.250.215]) ([10.94.250.215]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2026 04:03:18 -0800 Message-ID: <9cfb3c17-1ab1-4950-b405-b6674e40a702@linux.intel.com> Date: Thu, 3 Dec 2026 14:03:10 +0200 X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 0/7] usb: xhci: command queueing cleanups To: Oliver Neukum , mathias.nyman@linux.intel.com Cc: linux-usb@vger.kernel.org References: <20261201194134.265480-1-niklas.neronin@linux.intel.com> <8a699e57-f1ce-4de3-9813-66f4848231f3@suse.com> Content-Language: en-US From: "Neronin, Niklas" In-Reply-To: <8a699e57-f1ce-4de3-9813-66f4848231f3@suse.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 02/12/2026 11.45, Oliver Neukum wrote: > > > On 01.12.26 20:41, Niklas Neronin wrote: >> This series cleans up xHCI command construction and queueing, removes >> some command-specific special cases, and simplifies the Configure >> Endpoint / Evaluate Context paths. >> >> The final patch removes the command ring reservation for so-called >> "must succeed" commands. There does not appear to be a documented >> requirement for reserving command ring space for these commands, and a >> full command ring already prevents further command progress. Removing >> the reservation also eliminates the stream allocation limit that >> depended on it. > UAS uses this in the block error handling path. What happens if > we reset a device with streams still active? > It is handled, the reset frees them. uas_free_streams() ignores the return value. After a failed free, 'ep->streams' stays set and the xhci endpoint keeps EP_HAS_STREAMS. Every path that follows tears the endpoints down anyway: Reset: usb_reset_and_verify_device() hub_port_reset() xhci_discover_or_reset_device() xhci_free_stream_info() Alt setting change: usb_set_interface() usb_hcd_alloc_bandwidth() xhci_check_bandwidth() xhci_check_bw_drop_ep_streams() xhci_free_stream_info() Unbind: usb_unbind_interface() usb_free_streams() usb_set_interface() Disconnect: usb_disconnect() xhci_free_dev() xhci_free_virt_device() xhci_free_stream_info() xhci prints a warning in the reset and alt setting cases, but the streams are freed. As far as I can tell, the only way the streams survive until disconnect is if the command ring is stuck and no commands are completed, reservation would not change that. Thanks, Niklas