Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.179 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796108776; b=i1eBlUMvz7IyEDgM0eX0gizUax2w5qN1hZd3h9OOBHDyYVOLxFFSu2zc0cUK1cUZ1Ycu hRCzSJDOPNXJO3B/jEyr2LmnDs4xvTbkWGDVxnQFIL+7EtxUOXhpUFv5fIcl3tmjCOynu Ujki+Q18pvtB6YqzYuaDnTy3GI45pCOsF+XEZf01cIN7RYJ9Dm+zKYmkBI/IgUBQuY0GG iidla5NEEiYfEuLuaf1oX4F1Dh+LTKNxO8508MYnlYy1KsjvAQFBLBwy3KIo9oZZysVFU Br8CMJslIAA8uEbEE+GJohizWzuNXxYxwx/3d3jfKS6S8Wqzkazi52l417HakkDDRyw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796108776; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Content-Type:MIME-Version:Content-Transfer-Encoding:From:To:Cc: Subject:Date:Message-ID:In-Reply-To:References; bh=XzQ0Z1yegShDpTN1iMa0GXN8c1oa/qO6dnNNa0UiiCM=; b=EekRXtB5wgz0/u0XAeW+57BTWO/NsYOLGLssiVDst1xqa3uqu57lNg5UhncugYzHXbWX yhz8Y2MKXHjanPFg4kVvw1WulOX26v/oBc2wbGVqUrEKt7wjzDcVku0nP9BtkCH73nIYd sAGNenxeClTSSQJeT5ARO71YLMQRf6SV8fwbCH5vyoqGod18YP25pfdlLOyzevkjR5f7f lqQ9TzjMTCb3J+aXARlnHptFE4dhE5ou8t8XBDUrlSwYR937puXjIQ1WlP5U7xY5HCYXQ hPtacj8eWNuKsePcvya3Ao5kNV4FeQb1Pyd/wwYefHm1pOKnGGC+2j+/ELbvOybWGHA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=lXaSHaa+; arc=none smtp.remote-ip=74.125.82.179 Received: from mail-dy1-f179.google.com (mail-dy1-f179.google.com [74.125.82.179]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0CC74606A320 for ; Tue, 1 Dec 2026 07:06:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 0CC74606A320 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=lXaSHaa+ Received: by mail-dy1-f179.google.com with SMTP id 5a478bee46e88-385c497bf94so15636573eec.1 for ; Mon, 30 Nov 2026 23:06:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796108775; x=1796713575; darn=vger.kernel.org; h=references:in-reply-to:message-id:date:subject:cc:to:from :content-transfer-encoding:mime-version:content-type:from:to:cc :subject:date:message-id:reply-to:content-type; bh=XzQ0Z1yegShDpTN1iMa0GXN8c1oa/qO6dnNNa0UiiCM=; b=lXaSHaa+G2cLX2bDhcI71fn9onL2ofYQurmVqGqnzsmgdrd+ZMXYPBcD99ATlyreqH /AMohRpIf7LOjcQ6TODa5ctqH7Yx5m6Ga6C6dvRL7DfNNNEIH6o7JII0IhSqGjBqB9sb ZMvkYY6Sagu4JwVyUNc3WHNDH5lVZC8g5unB57RXa+6Vdw/xBCDroA0dxZZls+1UINRD 5zPj8SRoGvBd7gm6+B3O+XAD6dllXigj8yUMsDS5XuM5bXI/3Tzww+CGtCrc36zsH+Sk rIJkpEYp1OS6KTyEEkwjKKMGSmwlWcSLxCyNlqNT5xNycL8fOlKCZdwSwfbQK3E+hi8+ GoTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796108775; x=1796713575; h=references:in-reply-to:message-id:date:subject:cc:to:from :content-transfer-encoding:mime-version:content-type:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=XzQ0Z1yegShDpTN1iMa0GXN8c1oa/qO6dnNNa0UiiCM=; b=DGxi+QdsU24T26p7kV+u9u5c0qa3oIM3brVb/0y6dWf8KZvooVCjJzP1ltcvP71/fO 0y6fhPO0hSvj2TLakl4qbB5uqsrgyt18G29GKbj7uZxrNd4b+8/4oLfGs4W2oElVhll4 VRsDs/O2WrHITxlAmH2Ldieoy6ZSLVaxuxNYntyl8xvVCkY+mGN+znKWhBFKdgVhCTWQ js5patICBw0EHq6sGIAmC0Q3oXE87gJPV5KhgGZJztGddbMmCLGL1i+CXkBN0owiJYFm EtWjorMK9+NNgYc8/wK9dq/EhjbHBQxgqKwFlj6TfN4E1fLF5HwkzWLeSvmLGUEGZqn+ QMsw== X-Forwarded-Encrypted: i=1; AL+hErFFe6PBpIrs/4fV5c9StjKvGEvDrLCTItOTNHCB5em5QuRn1i7q/JMFvFTIJAbGaER3s5cZ8IkXo8IqSUUu@vger.kernel.org X-Gm-Message-State: APuU4Z/AFIcINvzHfJzaQXqjtDqe5Ncc7CoaU7R5ZZlEcfmGlsLGFyk5 GJHe7bhiXpXiavHtISCchKI4HQvRwAKNfundcUyxSbJU3Doir32iygnAV+4Q+xldPgg= X-Gm-Gg: AZFdTZf/K+oKp0y5r/lzXTbG6S+q05ny16M/OesMA8ge8sufuQTcTN3O/IM7LoEgOvh IWXa76xreYljxCT9h/aO2i6FmGF339lHBx9n/gEJff43ylXTYZhLe5Rxu5lcaXRxB+bzcYD2jBw zIsGW4m/GRYiFUNZYfGqmbwul/sbkvDbz/bcc5aSKLhojZ4gvrd/4f/BNa5bn/8TUFUQAxs9DDl cTElqsAg3HYn7x8KK5BO4PVpNpdpUr+p6geYxtO9W1WNtcfXVngrOvaKGw9BCbUnO85BjoyNXuZ Q2LPo6sp+9jfGLamD3nSquN+9t6oJsUTR36AxC/a8yRrKk8ynBjmTI8TUz03q90dd3dUEG0bjFO yRHcFeeAdhpKifmylogrzE75IpwghuI+t3bK6+EIA8OfFWQKUH13C4puIqUCfpthxqsLcZalHON Cy2pJhihu3/4qffM/SPBIHwhnTe0nj8iQOpttsfC8jxxHX+UuIzqCqL84nwNnObbr6Wbcb6zKTC jZkK4SmNp6G7yuvrZViVymToq+VYRJ6QH8tRKYhneAeRjK/PZ/jOJefeONm63bf+xEC9V9YsxlF TkYRwrs8k9b7Ry+W07U7DUNOOj5Ds4XBoH9QhYm8qAG7ecahYJ5yW9/YN6ASi2Ni0wS2OEadhHJ +0Z5j1RM2vRY+HUW7LqOHmUU= X-Received: by 2002:a05:693c:87cc:20b0:358:3426:d601 with SMTP id 5a478bee46e88-3856c0d0961mr35220032eec.2.1796108774789; Mon, 30 Nov 2026 23:06:14 -0800 (PST) Received: from [127.0.1.1] ([74.176.208.23]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-38566fdce48sm113188490eec.14.2026.11.30.23.06.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2026 23:06:14 -0800 (PST) Content-Type: text/plain; charset="us-ascii" X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Yaohan Li To: Jeff Hugo , Oded Gabbay Cc: Carl Vanderlip , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Jacek Lawrynowicz Subject: Re: [PATCH v2] accel/qaic: drain the control workqueue before the device is freed Date: Tue, 01 Dec 2026 15:06:09 +0800 Message-ID: <179610876957.3115730.6216059274582677194@gmail.com> In-Reply-To: <7c07a388-c58e-4d8e-8291-31b462d84d00@oss.qualcomm.com> References: <20261118072448.1259909-1-shunsheng1218@gmail.com> <20261119022919.1493567-1-shunsheng1218@gmail.com> <7c07a388-c58e-4d8e-8291-31b462d84d00@oss.qualcomm.com> Hi Jeff, Thanks for the review. I agree the MHI channel remove callback is a much better place to drain the control response work than the PCI remove path. Looking over the rest of the driver, I also missed two related workqueues in my original analysis: qts_wq and ssr_wq. Their MHI remove callbacks currently unprepare the channels without draining those workqueues, while the workers can still touch qdev and channel-related state, so those paths need to be checked as well. Rather than reworking workqueue ownership across the driver, I'd keep the existing DRM-managed allocation and synchronize the work at each channel's teardown. Before sending a revision, though, there is one ordering detail I need to sort out: qaic_dev_reset_clean_local_state() can run ahead of MHI channel removal and releases SSR-related state, so I want to make sure an SSR worker cannot race with that cleanup. I'll go through the producer shutdown and teardown ordering for all three queues and keep any follow-up narrowly scoped. I've only compile-tested the patch so far and don't have QAIC hardware, so I don't want to claim hardware validation. Thanks again for pointing this out, Yaohan