Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=23.83.212.17 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796226287; b=gke+sASebUT1wxx1TAKqNVSHu457BQ91nYxskb6ziCeR5rl9V3D+eESDKTSZeoukUA1H h1BwN5Y4XfefboG1rFrmTbliwRWIV4j6uTWWrK1K1OXrXRs3da5Dz5T5ZdeeCgxt0u2oM cP4eaTnGUwI0LO0yPRzBbedBgvI9/ys5zTVRbzC0uCuur1uM9C6kAPFrRIuEN9vNVrkJt 2bNV605cJ/XrEhsbtgK4CNx3CQtkb46AGJi2rFc045+iwOus7SfoyIXogig0C8wrXgxbM Mwz//li8oPDTavpm4C0lT3VxnC9Fxa5QjHjmViN0PmAKczqDJZR2yM+zBFpK9X45tog== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796226287; h=DMARC-Filter:X-Sender-Id:Received:Received:X-Sender-Id:X-MC-Relay: X-MailChannels-SenderId:X-MailChannels-Auth-Id:X-Keen-Desert: X-MC-Loop-Signature:X-MC-Ingress-Time:Received:Received: DKIM-Signature:From:To:Cc:Subject:Date:Message-Id:X-Mailer: In-Reply-To:References:MIME-Version:Content-Transfer-Encoding; bh=c0aqjhJBRIJReB9Qz5YU+X2PyGk/5mp/EnsO3tpIFFE=; b=JpA4C3uStCOdy6YqllkYw/ufwtPqvZR3oDeiTAFPrRZya5A3cW3gsSXT/ZzgzFqkurfj 2NcIFQXNde/huZ4jSWuyfD9ThWyQ3vj5dX01NjHL+G5pWR7TVttFYpbUC7aa3264tuzf2 J/m5G6sXo0sl3H5jYQ3huCCiC0NPM2/nSI944QjK664snxrr54y66bV3zkW36xGhrmU8T UsIPenXFqrxK8q1vEgmwknDqHVAXSJklB+sQ7n3hJBQ8FnaeScTrtXbahA+ccOxKmeBpb t8RYKVmALY0+E6bkWFhplpEZyPjpW6lP4am+fc9AcrKy+cr/vKFIyx4OZ4xqbFz6FpQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=stgolabs.net; spf=fail smtp.mailfrom=stgolabs.net; dkim=pass header.d=stgolabs.net header.i=@stgolabs.net header.a=rsa-sha256 header.s=dreamhost header.b=pu4sx24s; arc=none smtp.remote-ip=23.83.212.17 Received: from bird.elm.relay.mailchannels.net (bird.elm.relay.mailchannels.net [23.83.212.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 855C1606A333 for ; Wed, 2 Dec 2026 15:44:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 855C1606A333 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=stgolabs.net Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=stgolabs.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=stgolabs.net header.i=@stgolabs.net header.a=rsa-sha256 header.s=dreamhost header.b=pu4sx24s X-Sender-Id: dreamhost|x-authsender|dave@stgolabs.net Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 7CF8B4C15A4; Wed, 02 Dec 2026 15:44:40 +0000 (UTC) Received: from pdx1-sub0-mail-a229.dreamhost.com (100-96-7-102.trex-nlb.outbound.svc.cluster.local [100.96.7.102]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 4E7B34C349A; Wed, 02 Dec 2026 15:44:40 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|dave@stgolabs.net X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|dave@stgolabs.net X-MailChannels-Auth-Id: dreamhost X-Keen-Desert: 3bbea2e37b0e7bd4_1796226280417_3428388425 X-MC-Loop-Signature: 1796226280417:1909151344 X-MC-Ingress-Time: 1796226280416 Received: from pdx1-sub0-mail-a229.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.96.7.102 (trex/8.0.2); Wed, 02 Dec 2026 15:44:40 +0000 Received: from offworld.tailf5af7a.ts.net (unknown [76.167.199.67]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: dave@stgolabs.net) by pdx1-sub0-mail-a229.dreamhost.com (Postfix) with ESMTPSA id 4jfhs33X5yzTC; Wed, 2 Dec 2026 07:44:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stgolabs.net; s=dreamhost; t=1796226280; bh=c0aqjhJBRIJReB9Qz5YU+X2PyGk/5mp/EnsO3tpIFFE=; h=From:To:Cc:Subject:Date:Content-Transfer-Encoding; b=pu4sx24siMl4sLJo2kggD77pU6rcGELuLsqFTfb67+9chHf4k/Zx3K0I9VYh6aqQp horAr6UyqvPE0mlQt7Ddlt3rE+pyg+DbjdQPi2c2jBpcXqFjSgqUYg0PxbGl6A2qku UXvbFGoxSEWprjismYoDTk5bATRLiL9XfWKEqyM+03OJ3Oaoejjt0zHyev/+6+QrI8 bX3+4LZ/x8/1ijEMvVCic13z50gtA8AWmmj+CNz6oSfSEZ6vXDJcIbqHsDpHkIl++S Dzm2ZomB90tlnVCJqiIGgqTj6PeBify2AmYayXWpcloumRamCalfc5uQK6GX0DVtOm ujzk5OMmOvaNA== From: Davidlohr Bueso To: dave.jiang@intel.com Cc: jic23@kernel.org, alison.schofield@intel.com, ming.li@zohomail.com, icheng@nvidia.com, benjamin.cheatham@amd.com, unsung0317@gmail.com, linux-cxl@vger.kernel.org, dave@stgolabs.net Subject: [PATCH v2 09/10] cxl/mbox: Shout upon async bgcmd race Date: Wed, 2 Dec 2026 07:44:03 -0800 Message-Id: <20261202154404.4016305-10-dave@stgolabs.net> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20261202154404.4016305-1-dave@stgolabs.net> References: <20261202154404.4016305-1-dave@stgolabs.net> X-Mailing-List: linux-cxl@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit By the time a command answers Background Command Started, any operation the driver was tracking has been ended, either by the poller or by cxl_try_to_cancel_background() on behalf of the new command. Finding one still tracked means the driver's view of the background operation no longer matches what hardware is running. This is not expected to happen. Make the condition a warning instead of quietly returning an error, as it is the kind of thing that is harder to debug further down the line. Signed-off-by: Davidlohr Bueso --- drivers/cxl/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cxl/pci.c b/drivers/cxl/pci.c index 1cacc9e90a31..a036f327ec7d 100644 --- a/drivers/cxl/pci.c +++ b/drivers/cxl/pci.c @@ -344,7 +344,7 @@ static int __cxl_pci_mbox_send_cmd(struct cxl_mailbox *cxl_mbox, mbox_cmd->user) { int timeout; - if (mds->bg.opcode) + if (WARN_ON_ONCE(mds->bg.opcode)) return -EBUSY; /* give first timeout a second */ -- 2.39.5