Message ID | 20240829-i3c_fix-v4-1-ebcbd5efceba@nxp.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show
Return-Path: <linux-i3c-bounces+linux-i3c=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1DA66CA0EC0 for <linux-i3c@archiver.kernel.org>; Thu, 29 Aug 2024 21:15:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To:In-Reply-To: References:Message-Id:Subject:Date:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=aEeQVO+RUtFV6vFZ+NU/xeaL7CVLZVV4yojKgIRjbLs=; b=wEB2R/mkJ6JojyquJqwna9NOlL rrCk/KlI3um4kRgVEuKrLsGXiD9Z3DUckEK03ltUW4d1/dbosoU/dFnWD9fyN2+wHQ9uZ16XsVa/P bAueh/gBDTMATgGBa2YpciTBhJXhexHLIRJL6V6Je8rmO54SxTaxcdW7tGsQzAu495n4/k5EuULli Kxs2sbz8IyBNf3jQ8C4ja9IvorDO8KZ6EJKAKXj+nq5OKoaBQhE1NSuNq4qFo1rNpDRYcfR4Px78+ k0Z4ZCJLfLA9z1xmcnJKVJH1l/sxglPf3TUFWl2G542Ao/gV1rHCx8KELd2Y2mSTk03IsTrNOTapO N12GOo5A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjmTu-00000003ep2-2vkt; Thu, 29 Aug 2024 21:15:02 +0000 Received: from mail-northeuropeazlp170110001.outbound.protection.outlook.com ([2a01:111:f403:c200::1] helo=DB3PR0202CU003.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjmTr-00000003en9-22Fr for linux-i3c@lists.infradead.org; Thu, 29 Aug 2024 21:15:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ERW9fo1YvgNIJyOrAbcuAIHX16Bz1v4Fx3dEuzFCSnjWe7V7umyzEpMgb/h94RwDZICDyzviv3cBzI46MHPclRz7ha+SL+LCmljnev9hzfzEluVgRK4daSbg17bo4YkDByG9/sKUiGLl6TE3CvV2CD7vnX+3wRhFjDs+MRFmIyRvgEPv9gAQtpZb93Yqu/rWLgjO8782MtwFwUwJFdhrR5rN5HeDi89RnKOhG+e63gsbCZf3fCFhpfRnKVlnBIwbXGcrvnHPb617pIXx33EgQs5wTwYEqj9Ko41oJJruWa988s7/6BlIP62Ek2yHUTgtXKhYK3Em8kq6VJHsvDtg2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=wsacC2sM6vudLiEelzwlwh0ehUTpf5ImMKYhC7eTeKY=; b=NfPwFdKrdIGLj6nf1TAo6smVCjYzLB0bw9iBxSu1EKiQRS+j4JP/tEaIfK3jvsWGU0iltvpnni2rokpakUz0qdZcSfIpnHBQkeWoMgr0xsk2/yFjG++TlTeiPRSOBrRoGDy4yXsR/x0bWlIZwevANxw8p7eu9GxHjJYQsA1vo5w2MuPyNBon2lzc6KdNUIw58palx7nzQAGWWso0pxhSa2nG2vUsbIyQwgOBQdjP5FpywgaFA2SYzQtWm+cF81GxJgXrLkwCDDB1LNhw8jVb+Mh0Z4+i8Nvhiu8ZrMhsaSLCGr3iHxinEFqaZlz07QJDCJNikMxVVcsEl7yi5+nE3A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wsacC2sM6vudLiEelzwlwh0ehUTpf5ImMKYhC7eTeKY=; b=LeROZesu+wfpI+EgPjDaKIqhQ91aMrKCTbt91YlCejRnWqA/uqBRyNAt84DtawzfH2Sg0l0FQzvAzxPdutnax0NYhwFlSPqvnayEBgq6+ttlDebhvOr7RNa4njEv5lwXF9//moAs+DRCWCjBcd9kW1Uq60zlJIcK8Y/1/ZEiqhmNL2Nzw8Kboq/ZToS0zcBaIvhkRuSM7HVK5pivbWYckFOcNzslLYV2oxWiM8oC6WlAsKfsjODBJkZkQJ7Y0Hvnd7IQmzetAzl0WkuStVUSaUO72vdEWWEJEDneyNbjZUnOxGiDOh4UhIP3+tK7EEXN8Cxo5ulDC6oB5QbbQoLRhw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by AS8PR04MB7560.eurprd04.prod.outlook.com (2603:10a6:20b:29d::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.28; Thu, 29 Aug 2024 21:14:49 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%4]) with mapi id 15.20.7897.027; Thu, 29 Aug 2024 21:14:49 +0000 From: Frank Li <Frank.Li@nxp.com> Date: Thu, 29 Aug 2024 17:13:58 -0400 Subject: [PATCH v4 01/11] i3c: master: Remove i3c_dev_disable_ibi_locked(olddev) on device hotjoin Message-Id: <20240829-i3c_fix-v4-1-ebcbd5efceba@nxp.com> References: <20240829-i3c_fix-v4-0-ebcbd5efceba@nxp.com> In-Reply-To: <20240829-i3c_fix-v4-0-ebcbd5efceba@nxp.com> To: Alexandre Belloni <alexandre.belloni@bootlin.com>, Boris Brezillon <boris.brezillon@collabora.com>, Parshuram Thombare <pthombar@cadence.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Boris Brezillon <bbrezillon@kernel.org>, Arnd Bergmann <arnd@arndb.de>, Miquel Raynal <miquel.raynal@bootlin.com>, Conor Culhane <conor.culhane@silvaco.com> Cc: linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, Frank Li <Frank.Li@nxp.com>, Ravindra Yashvant Shinde <ravindra.yashvant.shinde@nxp.com> X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1724966082; l=2753; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=f1WC+vskhA3R8JbdDiScsOFGTy5BtQ/6Qqg3RFmi3zw=; b=J8nMUXgzeslqh5WmJsxxzz0j288LGN5mX+W+tUM/6Crkahe2aycbREfYoE999yFKM+ZxRWOJS yyUmraSHnwCB74PaugzE5z61iE8pBeVIPdBkadPeKBNar0PvXSMUWMs X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: SJ0PR13CA0219.namprd13.prod.outlook.com (2603:10b6:a03:2c1::14) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|AS8PR04MB7560:EE_ X-MS-Office365-Filtering-Correlation-Id: d4796f60-dc79-4915-2e1c-08dcc86f9df1 X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014|52116014|7416014|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?G8fKwGtdaxzc0d0UaPfOeqTu5kjtc30?= =?utf-8?q?iVS8kNJoUCLU7A+Ref1MHnIynxCqRQRcSuu3aSXTlLSwG8B+6vYqc29c9tYZA7zpE?= =?utf-8?q?Tdmoi29TVt/YPumd8xYF+ymounExY9lLWPb1t2xHoq+JltzjnXfL9hdHwF4SrCWh/?= =?utf-8?q?jNxGr6xE/IR2D+8Ib2zw1vVrQM0YCCcJJSfE3kGnrM5H9H/b1E9DVqwErABHm69cY?= =?utf-8?q?9Kk0OYfQD1YeDQ0GuHI5vtLMRmUuWM1sAJ7Yf6+J7Im2eXk5jB82EYwLk6SQrD4EF?= =?utf-8?q?+BytMNamwv8xtBtyRpbls2ol01DANxMlHUR+VdSE7UPgN9GFTY4Abvcs553RvpLxv?= =?utf-8?q?i7EZF8HdJflPaOfSA2PAX+2e3NJira127l8VbAegBemfi6ylt3YbKPllplfsxekVd?= =?utf-8?q?FLuJgc0H2x+LccI5UhFePozfRgZ8GcieEMIvkhM8JAPCyWioVk/KR+Wr/bmCJ24Ra?= =?utf-8?q?IL9XRInTiArtkVr30PROaBIGvH9LtL2zSlxAysEzG7rhcQ4/E9jbDpMDn1+BcfarS?= =?utf-8?q?7WdehpC8pJPVSm7+44yvySUXR9HJJWPZBmlgvELoEHeOY4vJa5yupUvp/gYSEp5VG?= =?utf-8?q?gwnAiniEzJv+R/ZR9zbi/hu9CbyPWNN0INaErckxbDKGwDIas0AkRkT/zI3+KjfpF?= =?utf-8?q?7Ju7fM6Eq4Ru9sExNIOUfjV8U606aQjGiuk+LDs7IJEPAmRuLXoZ2RdFkFLnZavSb?= =?utf-8?q?NY/4hu2IG0cSussrjglT1Y+PU9HnlzNo1e3nODbYGS8Z3XOA9veyn4gyiwkPpKgdt?= =?utf-8?q?Jh7VPYNjR7Zpzjs/BDxhJiY96XHLw48oko7I/XR+XqtjOiGlaDd9zWktvkefKfkDu?= =?utf-8?q?0l/wKyh76hMkd8alv2S0xJdzGFL/4vDEq/j/YghgQH03ipV17RfFUI9T9Ti5hR44+?= =?utf-8?q?3IMbP/cfgDUrgvBLW2g7vLOolyO5BdrCMlu0EPdTy12CfVqgPt0L7d4uhw0WdRVCu?= =?utf-8?q?k6+/HZd253UWO77j22HA6R2DnNeWGaIkg3PaIhl6+IS2SNKQ2wyiKBg9I4VqZRGEc?= =?utf-8?q?/3M92HvbzjjiRkSaYtnFM5ajVwI+kcPs/BFe205NDkIAypskgi4ZOG11ypzTQUAVS?= =?utf-8?q?DE6BMQ32J1s+PzvThvToe8IRYOCHxnp+yqsQsuslyDlYZ3u7+1Kk4Ho+hKLaATgZM?= =?utf-8?q?UFFxG/PNptfcfyzk7D3Br6Kvc3Wn0rWAMYlNsDw0lFLwOuIQPFXcHFa1ibgVGTDhy?= =?utf-8?q?xtYCvJdagNDi32tskq/H8f6ThcJeyIu5SKzSutM2D1FH42b5u/+2uEewLtvAjWJQi?= =?utf-8?q?/nnbLFELzh/fyQJiBIzrggz4VrN6w2W2473jy4xNI5Iqvcry8ZTgx/VSaAANFK8O7?= =?utf-8?q?qRbeOQJ8onefNczDW+uHdClBtzyXMPtHUA=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014)(52116014)(7416014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =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ywFE+h/oNZ1xTJvUR65DiTf7iHVh4?= =?utf-8?q?MEFET5dw4TlTcoICAMINBTf8qHFlXECuR427QRP0Z04xen95qENAoNwM90V8uHlPe?= =?utf-8?q?oxrRgH1nnF1TJRm9y93XLGWjDuTHji40EsA2sXJpuYKeJL4qI5gIrfKYc57snGdem?= =?utf-8?q?rYB1WLkhFZR3JPIi/UQC/0hMl1NNOlmtebTog6djCeYA3ErB+TcPQa3FsoJI1Kuxd?= =?utf-8?q?AszgLZNRTho3HufNwnj82YDQw4CzsZ84vUlpe1Kq3QJmk5g+Pn4cCFOYFzNQ3pbs6?= =?utf-8?q?QYU8BFRkdMMX+fmz6KHuSpRKQIJ4DKFTCBu6UIhKsRTutQ3Ge7UBlmdMiCUkErrPT?= =?utf-8?q?HythHyBJquq0qFhqldKnBZ7L3OzbFLDz+TfuVzNCHpvNvVp4NbLtfSsU8c19GH7gS?= =?utf-8?q?ZdEeA52I+6I0e66of+W7dxkzNbXciLrgOgaMhqasMHqahzrH7F3EHSOOsVFRXXnTR?= =?utf-8?q?fCxYutUS783s1oMU1jb1MlQAsdJ2KIhO0n08W2YhtYp4QpDLPuTzJ0aF/TEBKN/fx?= =?utf-8?q?jFT9DfgPRaRRg9rzN8XJ3t+oC5VJqGKTKnfCKNFVwrlx6MXO3c08cXldVVYwW45hA?= =?utf-8?q?+36lO+UsgYMQK5NnO3BW0Mab9crg2v57v2ZWUF8+9/esACdxnxkazZ9P5c7dO3Epx?= =?utf-8?q?CdViLFSKX4tc?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d4796f60-dc79-4915-2e1c-08dcc86f9df1 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2024 21:14:49.7382 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: a3ATcurYXBxOpcPxb16DwgeNBzEBK8erKVBaTYGqX93CwYXU5OifKedr8qSvp4uUrLT0+bnzW+In9GUwUyYfbA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7560 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240829_141459_566148_66D2836F X-CRM114-Status: GOOD ( 13.67 ) X-BeenThere: linux-i3c@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-i3c.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-i3c>, <mailto:linux-i3c-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-i3c/> List-Post: <mailto:linux-i3c@lists.infradead.org> List-Help: <mailto:linux-i3c-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-i3c>, <mailto:linux-i3c-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-i3c" <linux-i3c-bounces@lists.infradead.org> Errors-To: linux-i3c-bounces+linux-i3c=archiver.kernel.org@lists.infradead.org |
Series |
i3c: master: some fix and improvemnt for hotjoin
|
expand
|
diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c index 7028f03c2c42e..82f031928e413 100644 --- a/drivers/i3c/master.c +++ b/drivers/i3c/master.c @@ -2039,11 +2039,16 @@ int i3c_master_add_i3c_dev_locked(struct i3c_master_controller *master, ibireq.max_payload_len = olddev->ibi->max_payload_len; ibireq.num_slots = olddev->ibi->num_slots; - if (olddev->ibi->enabled) { + if (olddev->ibi->enabled) enable_ibi = true; - i3c_dev_disable_ibi_locked(olddev); - } - + /* + * The olddev should not receive any commands on the + * i3c bus as it does not exist and has been assigned + * a new address. This will result in NACK or timeout. + * So, update the olddev->ibi->enabled flag to false + * to avoid DISEC with OldAddr. + */ + olddev->ibi->enabled = false; i3c_dev_free_ibi_locked(olddev); } mutex_unlock(&olddev->ibi_lock);