From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=192.198.163.10 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796124234; b=dpEoffTsUC921TrTXkR7i6Ky1t5IhhX01QU41W8bOi9RlV0q6vIsDXINuYrcLp+gaY0t 2cPnhm3OoC1tFcy4w+4JSygbi6/wNYHfyaAX/ueHZ5/1GIkh+bce4iaqveVtDj2PB+zDm x+hvGRtfTFaRxPB5JD3urqqxEMg4lTX1Yaz4k7Ivbpr/JEgRFjpQQmm4V6tV0XYFMVSOe tpSNEdnKisJUN0yzZHB08LDw75vM6/x/SoeUgWHlEm9pMwnjqOHCM5sBwDhsefHSCadgx p5hSqpkGslWEU7BsvJsGLeXmw6sOzvsTmZ5lZZIArkvfOUbt0LCz498OJoR2+r0yUXQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796124234; 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=QNLGvCdCGaSGm9F943PeGT4U05HR/VUzwcTCybMHMR8=; b=VneMSCbN6kz9xYXtHX3eXktq335mQZq/wEggXSG8VgXWmxtxhb0eu6bkpaXJPB5eFGod AspWAJnqdh/jhVCd5Er1ZIsACGMvF4i0+G98ugRh8ayEif/Lmz3VNThs2bfgPDFKDM/6z ESWueEP+0IrOd/Qd3YIZ0V+Wrk4Kuc5/ToJbpnu2d6s+J7w08bxNun7KS9NPt/8+1nxoN UgXz8/S5bw0TjOmjaDsucQZmK78HMCuBbv3Qwny3LnQbKlJx34wcz/oKpFhyqUVC6YtGY GBVLBibOMO4xzCmnswk0cJOo9oV/sm22/gsl3FGagRDJAd+Wge4fRy2y67v/HNfV4xw== 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=KIHe7kDU; arc=none smtp.remote-ip=192.198.163.10 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) (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 D9B7C606A31A for ; Tue, 1 Dec 2026 11:23:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D9B7C606A31A 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=KIHe7kDU DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796124234; x=1827660234; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=QNLGvCdCGaSGm9F943PeGT4U05HR/VUzwcTCybMHMR8=; b=KIHe7kDUFO4Tw85/4ivZnxfje+i4UF2lHV5JqMMYCpLNrysUriZ0ngRj Z+inKH0cNkPZS5YbJnJKHDE82L6b7KeiK411ydfYCLqgFtQ94Q3JZiQEg 8AU2kCPb/TKp9jsPjVbbvMvKOlvUk7H7spV6ULQjGjaVoUhNC7OQfDDQO nWfZCDGBtM9/tOLg/VYKjNZp/uyZf6KVTHeQlD5AZVxSBX4s9aZOFuhNz jDjyMizHW15X/O2T5F8D5CoVYvq12Be9MF9ZJ2HcfU5uVx5IU+gCk8Q6G XAJRHfRV1IKuQmT+HHVq3ef+g3OQcV6FLH8MwkL0Y+OHQEHCYhuRn5084 A==; X-CSE-ConnectionGUID: xTkswBqBSsesbM10k3mNEQ== X-CSE-MsgGUID: 0HmspwE+TTCVXULNVRdrGw== X-IronPort-AV: E=McAfee;i="6800,10657,11982"; a="4880708" X-IronPort-AV: E=Sophos;i="6.27,244,1787036400"; d="scan'208";a="4880708" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Dec 2026 03:23:53 -0800 X-CSE-ConnectionGUID: m87jEMc5SNiOEA6+Vs0RmA== X-CSE-MsgGUID: GUccULKrSZ6JiJi75S5v2g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,244,1787036400"; d="scan'208";a="13375440" Received: from amilburn-desk.amilburn-desk (HELO [10.245.244.253]) ([10.245.244.253]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Dec 2026 03:23:51 -0800 Message-ID: Date: Tue, 1 Dec 2026 13:23:48 +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 02/10] xhci: check for halted host before accessing virt devices in xhci_check_args() To: Michal Pecio Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, Wesley Cheng References: <20261127121755.281420-1-mathias.nyman@linux.intel.com> <20261127121755.281420-3-mathias.nyman@linux.intel.com> <20261130100829.6eab5258.michal.pecio@gmail.com> Content-Language: en-US From: Mathias Nyman In-Reply-To: <20261130100829.6eab5258.michal.pecio@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 11/30/26 11:08, Michal Pecio wrote: > On Fri, 27 Nov 2026 14:17:47 +0200, Mathias Nyman wrote: >> xhci_resume() may halt and reset xHC. It then frees all virt devices >> without holding xhci->lock, before the host is reinitialized and >> started again. > > It seems it could take this lock, if debugfs_remove() is factored out. > It could maybe right now, but longterm plan is to split vdev freeing into a locked vdev 'unlink' that removes it from xhci->devs array, and maybe clears some other things like slot_id, and, a separate unlocked free part to do the actual memory freeing and dma unmapping. This would allow the qcom sideband to allocate and free the the ring buffer using dma_alloc_coherent() and dma_free_coherent(), needed to fix their page size issues. Thanks Mathias