Message ID | 20240724-i3c_fix-v1-1-bfa500b023d6@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 93BF7C3DA63 for <linux-i3c@archiver.kernel.org>; Wed, 24 Jul 2024 15:46:17 +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=3RN4WrYZZ/5gnhfzgisHCv9OXUxSXCz6XRA09a3moec=; b=JArHG7B2NzJGGHS7saqoc6w/nw xAKNQ02vMYS5I96KdOBQPt4raeX409mEzxYQXNOe9Up7lUgbEv7B604z4GDIsjYDwd4UH1AkvQbwn kdkIrW4qC2mrY1Yq1ljc62xMC6lfP3/oxNKY5c+1U+tScFQe8xolMviS9ax0Qml4uAUTVj5a0M6Kk q92KcfN3+fljGYuegptBe9q0g5MW+djiy7NthCZooDPp5RVuGVfhS+GwYgPnsbvD6vHcUmpzFFFjM TWk0/Tk76Zhgg8JJ/wuvO80ghp97oD/2/hp26m8qbZa6pmfQXWIC+4hxu/1/9I02Y3c0S57TwVU+M F02ib4cw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sWeC1-0000000Fou4-1IVX; Wed, 24 Jul 2024 15:46:17 +0000 Received: from mail-db8eur05on20601.outbound.protection.outlook.com ([2a01:111:f400:7e1a::601] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sWeBx-0000000FosN-1tIU for linux-i3c@lists.infradead.org; Wed, 24 Jul 2024 15:46:14 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=UL/Q7HnL5kAoc3JStDozAoCPI170iu81xwYIytYfspGKQpcFzdCZ3nx/51c6k5cn2wg80oR36UZasNVOv4jHaAoyKRXUpIaDnk3mL6ZV9G8OcvkggCbmdtoP0CxGbS7XerPiAsDtObEEcwcOb974f9+VExL312XGv2UOuDVmsOr8AgiK8OvuDl7nLzxDVCiXUnDrLHl3wK7Zwh4LsCaolZo4Xkba6IyWjQ28tIRgxd9rNDzGXf0ti97wjSbbRaGonod4fJkE8eCVuvjXbcvffqTkYji+LLmMF+paes/pYc+xuORx75jGPv+N47VqZChgdOhozAvaDrTdplk/ZiCXlQ== 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=iEH3AqOKfHzxwLjQgVs3Ok5rqhSw+ALKLhi5IuDAIjI=; b=msO/EdVkx2mV9sT0i1lpSL3vgzOXI3/slTEqwN0P8jFNSGsZW2aJDS9Zk/hoe3IVQtIukF3HqtB9kPRg3OKtguZEP6Qi9AEUdJvUbuM0pFRygUl0aBZPifBRhn9JT+uDGNu+ogwrxaFQWEYWOJaAFaKf6FSbnbn4SwPoMyeIf6eK6PpMKAAYLJsdYxOkhM/Z1podt3nmDFJOArRpUwdleVKWY9Nt5AV0Gewxaf6sOr4nYIGuwJWzp0dGzeDmRQ9Lig7WyTB5s0oEyveJw6XmjGoJNgrT4Ls2B9G6zNulGyw1CrilRMr4n/aOoXmYNEQifDKl9vhmrYMyuttHXkaM1g== 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=iEH3AqOKfHzxwLjQgVs3Ok5rqhSw+ALKLhi5IuDAIjI=; b=a4QDHlwocieW2UypgvFfBg0npeEBrCOCLsMZcVjMN7MMiVDNX4LogWPJdInIuWkw3OFLUYPtEa351AYAf6Bm15dR0G4yYpTwVqhe1A4dZwERb7WGH+AwcZ7LSXg8Y5eV1wWjnDpGJE8J8slVJt0uP89u45xzhmSh9G3/+fxkotTbsc94IxKCqwero4Oibfrp3bIsMzojfUasvAcBuj826Eudwu7Kh7O4YhgpCUUCepMdE7TDyvq5N/BshEu5jzxfPLwvE3Hp/ZaBSdEztIfoQDkd9buyhsxGPEsW5oxazosjXzy877p09ySGaU2gRs8hAMovTh8hY1QgJ/9e55d04w== 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 DU2PR04MB8599.eurprd04.prod.outlook.com (2603:10a6:10:2da::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.16; Wed, 24 Jul 2024 15:46:08 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%5]) with mapi id 15.20.7784.017; Wed, 24 Jul 2024 15:46:08 +0000 From: Frank Li <Frank.Li@nxp.com> Date: Wed, 24 Jul 2024 11:45:46 -0400 Subject: [PATCH 1/7] i3c: master: Remove i3c_dev_disable_ibi_locked(olddev) on device hotjoin Message-Id: <20240724-i3c_fix-v1-1-bfa500b023d6@nxp.com> References: <20240724-i3c_fix-v1-0-bfa500b023d6@nxp.com> In-Reply-To: <20240724-i3c_fix-v1-0-bfa500b023d6@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, Frank Li <Frank.Li@nxp.com> X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1721835962; l=1374; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=/JI8s94ok2z+hT6L0BfTNT5ICOc99IOP4jbZmyhmqiE=; b=vyxohMNLsA1z6uxTUSTcPrthrJborPex1MOrjSPVRNKz/05KfcjgbQG571ILWthcw3HcfFCHg jrp+UIZPzKTDZNIjlTe3JN0zpCKFlavy19fbLG+9BOEF7RteESp2hXZ X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BY5PR17CA0008.namprd17.prod.outlook.com (2603:10b6:a03:1b8::21) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|DU2PR04MB8599:EE_ X-MS-Office365-Filtering-Correlation-Id: fea120cf-7f9f-48f7-9e90-08dcabf7bc59 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|7416014|376014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?+3y4iKOoR9cRUTluZE717OIY5SVHLFb?= =?utf-8?q?teo+eIzAIxGKApJIvBhXRbNjqoX5YGQvv2kG6t87Hn4HFfj94C5knqCLjCx1rmiYR?= =?utf-8?q?dD9AsIm2Xm1Gq7SWZxadrIos/C0kHwjdU5r6yuujZXtdkWUpNkjL9ur9lttWUH49g?= =?utf-8?q?esDjjOE9W+1Hc4aAHMc4yfeUrHpCqgrFHcY9rvjy48jXBaoGqEaJSlB+SdkWSSaM9?= =?utf-8?q?nbOKzJnwQRFIR5gNQtkzs4BKMNxPzUQfLPU4eAlKgjApjFh/e9yCxi4PXqFHpkFxi?= =?utf-8?q?To5RO8B7ld3PFjWKWHdivDNTaTHj+3m72aV8niUVsAh5DDkl0DEIWqOl+JR483xQi?= =?utf-8?q?oiI91t0fx9iOVK36vyySEJ9UqtKmHC3mfAmX5b597O5mnYhg2E80zkkQFKzYRYZcW?= =?utf-8?q?Oz7ocFP6WIXKfTgUm8iky6kmUkR+m/GJCJaW3uaIjFM0sM9dZVbmPi344SSUdsyuw?= =?utf-8?q?cJNx8ds+yZf+ky/IZlZE5Ko1TgJm4l62CbPkDYYabrjgaAPef84jEk+GZmYA3aMdB?= =?utf-8?q?T9sZpI12xDbU+YGByBdrYPBrxefDS8/nH8JZIzhQFz3Hcmz0g+DcyqlSltCQ3kuTq?= =?utf-8?q?zdCXM6tcC7jOAdmlCmzUQmCQqPkARRThB1jBRIMHqiUoximVp9Rx+pGdN98fesK5b?= =?utf-8?q?+mcevg0HgFKLMs7BxU9JnO8HBThIFaJS/msgjEuCfhZsv8NDsiq0aO4lXFk/TwX9x?= =?utf-8?q?EhE0sXTWL6ZVxbeLKKv6FJWvOmCmrNrz4cvyLZBZ+2LoJ/yUPsPVxox2I8xGmL0dW?= =?utf-8?q?CShMdYFnZ80UqZoL+oVntIZXN+BHuzZ0rE8xmT/iliaDsqq6HbM6413xLr7roMBKi?= =?utf-8?q?AwHrDIAP0++F8JdohZcox+m5PLsPibNbWVLrKrqP5IRUeq+uqEsKm3j4hKcfRJAv+?= =?utf-8?q?HpUjCgd8iqqasD5HBeayum28Pem/c0PSblaULFt96miWn9/RQbfiRBJaBxLxr4UHd?= =?utf-8?q?C3aRWw0UkKFM+OjMKXnkqmlPEmnzSfFXXapdIGqsxbenKtslm++g/UtpYH7Ynpm9Y?= =?utf-8?q?FyzyTee4H2LGhsxDRVe52sUrLxiXruMO67j06XrO6D2SkK2PVKgi6I1ocHWy6vTnc?= =?utf-8?q?B9oUTGXcyH+llTbCXBNLHemdi/pXxn6yNonqVu9Q66X8h2uZP5dmbExPmqukqTTcj?= =?utf-8?q?AbTHibrBKGvebWgx4bSOkHAAgtdfYzEx1RtCe0KA62qcK/P73h/46yReAlPYunqep?= =?utf-8?q?bmsBoF1GnTEgXuFhRd/vq436qXoxM/rhUmAbKwbkuvms5QWATtFKXZqwAhzSnPLmJ?= =?utf-8?q?ZK0sH05JGvu0NmVOIp2jKbiq/WVkTSkXlKHHSigVI8IhkIWQ+r10JYZzpmPeNf1Ls?= =?utf-8?q?KKamL3mU0oMw2qeg9NIXmbJaeZs4CCcOzA=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)(7416014)(376014)(52116014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?YgyCzh0iOvRdnWavHQ0JVsBaaMsV?= =?utf-8?q?BCX7lwpWj6vd+YyRnP9YE7XrZIu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R8foj93bwO46uWTyetA7fdwjk51Vjjm459lPwkaHa1MGNKu8lz8w9ej?= =?utf-8?q?7kTDfJ1b6h3iwgALbjSg1rLTim6XRfI0T4JAxcmHJITgWgnYY5/PRncIaxoPbKysb?= =?utf-8?q?LL2o2PcpOHOGSSo8t7Y7hdUSTrdoDIOZ/rZnKN2tWK3Y4FhJZQbTeI0NilzKQWAtW?= =?utf-8?q?pFThMAAWZ0KYkDTO7Oc+ccQCvK4rNE9u8UeNbysFDyNuiNoeyBRLhgXlD2QqjDVZn?= =?utf-8?q?6zlGbLf67HNrRhpnwLWcGwRbv6/BC/RzBPlVhIFUFdVRmsqcDMrfIYnDFBHmKKgH/?= =?utf-8?q?1UiZymeELaCfb5TK557njgGMOz4oyrdoU/2agkmcceZBIZskpYibuQcCX6Ds+vTKR?= =?utf-8?q?L15+scVBUKq+zxwOQr9itcx2PaJ+i39w44M9LVJ3vFaCNIrCUVHSP80rsyaPwd5Rd?= =?utf-8?q?DtTWIUrsY4c76q8UvJH0XWX2Hiu1ZytGTu/+hlsdx4RviPu0OowHklcWWPr/ZOzoz?= =?utf-8?q?5gr5fPn+lk7RQ0vu0SuRndZlFq9v7WpoPDyK99z4/BSSIMTuXmocgMizHOkTkO1Ni?= =?utf-8?q?xh47702Ysq+y1LgNIpSZDfdjPZewX/6M/1MNEfMLVIkJ3wRl4pzVXf3mCt5PBsq7H?= =?utf-8?q?yWExX0CNvgWf?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: fea120cf-7f9f-48f7-9e90-08dcabf7bc59 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2024 15:46:08.5959 (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: cMwWSxVc2t1XzCseARubJn3D5Kezsb6Im7O6B/4HdMS3HfsjcI0FE+IyM17MRACICJL+GR+8MBvijj9+POBOfA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8599 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240724_084613_529855_263413C0 X-CRM114-Status: GOOD ( 11.85 ) 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..852b32178b722 100644 --- a/drivers/i3c/master.c +++ b/drivers/i3c/master.c @@ -2039,10 +2039,8 @@ 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); - } i3c_dev_free_ibi_locked(olddev); }
When a new device hotjoins, a new dynamic address is assigned. i3c_master_add_i3c_dev_locked() identifies that the device was previously attached to the bus and locates the olddev. i3c_master_add_i3c_dev_locked() { ... olddev = i3c_master_search_i3c_dev_duplicate(newdev); ... if (olddev) { ... 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 remove it. } } Fixes: 317bacf960a4 ("i3c: master: add enable(disable) hot join in sys entry") Signed-off-by: Frank Li <Frank.Li@nxp.com> --- drivers/i3c/master.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)