Message ID | 20240813-i3c_fix-v2-1-68fe4a050188@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 291E6C52D7C for <linux-i3c@archiver.kernel.org>; Tue, 13 Aug 2024 15:15:31 +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=A0JHUNuvD1gU68Jnt4I1eOT5gm zQGmTbamG5tHQTuoJAn3APmw38siR1ZICGA6lbGkMzK1HWiJnn11bsRV+JETrOYGsm5Q3P5VQFt02 YJF66jPQfIgACUDltqgXK96ji9tfwtCiIIT2FM2o1KtF4VWQq3zn5r5JYkOgJ+M9kYhy8j/SqI4vR eWVFVqLeyueroH5N40om7hub21GcAzZu/q+3mfIQT4ISi1dyvjCcN9D3XrMRPBUwnMK2FYD9YyJcE 2IbhT7hIfBE1TScdc91y3fG+xNCKpgBeVWHAXq0cbtXxmp3rZlIjsiOjj9tnVMRkWScQli7u3R65U d9CAGW+A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sdtFC-00000004AhJ-11IA; Tue, 13 Aug 2024 15:15:30 +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 1sdtF9-00000004AgH-1CBE for linux-i3c@lists.infradead.org; Tue, 13 Aug 2024 15:15:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=CBNoGK1wOQS8ud95bPNZhi0Na5s4ZKXqg6D6KPM0WPh4+t6E2Vs7WOaxSgz/N3i0U85vlrBr2v4ULFIBlAQSxFU0KydANKpgqpeY80h577WH/Fxs/bXzHivSjwr7Vh+fgqHqjaYn1aeVOJ2pl5bMsdt+5ZVBf2LUOwA4D833MSb7gJ9ITt63hflVXuh8AiWMte3fhF0l62PXYvjy4Kh5CVjJMHTVHXhUx5TL7SaYQcUMwwx2m18o0MC3NGxHG0C+b4cnNf+9o630X+I8OpZdKGu4TQa/euzvoxCXO5Q/YZeux8i778q1miW6PuGjqTJJAmKYGbvxyGjeumZqVp7NHQ== 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=UlAAoemUynI13Uu7KomUIBlkCnVTNv7RdFzaNWlLiv0qB8yq0e5riJgLzd3doE2JI7SS8ztbRwHWy58+WgG4tPtmSF4ITfvpF4TgdvrM9lWJ3rnYp91xeYze3L3+LVRq5l8k88avyLosXexb3caH702ZFQUvSGUxcp+1TX7OiIHP+YOZcIbDwtzm3Xf3I8LxUzzGuY7Z5jcol1IHH3CZCNTNlqXMwwyYfHdIYsDjtdFCSjRcY298xJAAcltdcYPfQVbF2MfGjIWtga755AkZBdhr6rHw1gr7rDwQMiAUwxcj6OCZe3gOATTacj9jyvCSAGj8pHC9JDOGAAyAEKTKPw== 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=OVRF+nNXq5xiY6xpOWZDOnopBWDK03/ZC7JH4b9fwxHyS/4Vh3PI7ZppaxCnJPxEb9uOxAOEVvP8ovz1DgnSvrswqlGpoX7cShByRlS8/jizX0nPohfbCkn1c1XrAwfK5XPBrlhdutKEtCmYVQSZ7dQRUX+OuJqnP8c33UBoZiJFFnkYp731drBPDJwatF+lGSkAuQaQkA1Mtak5bmVemsS6LBiYASKtS3WOgO439oN1Yd0q6E0RzzFoHKB1eASpfjJSc9+ujnxsNojLCq2t69yD7P+MdrY9L+EKWPvLBpewBdzeACahab+UHn0ERiA1QWAdhJzNQ1hRhWtfU2UnMg== 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 AM9PR04MB8416.eurprd04.prod.outlook.com (2603:10a6:20b:3b7::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.22; Tue, 13 Aug 2024 15:15:22 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%3]) with mapi id 15.20.7849.019; Tue, 13 Aug 2024 15:15:22 +0000 From: Frank Li <Frank.Li@nxp.com> Date: Tue, 13 Aug 2024 11:14:59 -0400 Subject: [PATCH v2 01/11] i3c: master: Remove i3c_dev_disable_ibi_locked(olddev) on device hotjoin Message-Id: <20240813-i3c_fix-v2-1-68fe4a050188@nxp.com> References: <20240813-i3c_fix-v2-0-68fe4a050188@nxp.com> In-Reply-To: <20240813-i3c_fix-v2-0-68fe4a050188@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> X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1723562115; l=1374; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=/JI8s94ok2z+hT6L0BfTNT5ICOc99IOP4jbZmyhmqiE=; b=k+hcRgKRsY1SW+/ssQ/u3lmwyi7D60jBG6mT4m/rVcTv+BRIKr1ZEv0HDmSLSs4UUUa6BG3cD /hEz/Zhv9hlBnrCB/QEh/2ISubU+Bk0lICxlV93Dy8F4woNYMdHdSGb X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: SJ0PR05CA0125.namprd05.prod.outlook.com (2603:10b6:a03:33d::10) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|AM9PR04MB8416:EE_ X-MS-Office365-Filtering-Correlation-Id: 0ec55771-8990-4e0e-7330-08dcbbaac076 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|366016|1800799024|376014|52116014|7416014|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?2WH4P42xFHTIzUKUyxKh9D6mkPWGRq+?= =?utf-8?q?tLbA64vZqqUyfTamvGaqybrelon+/ZgEMSWv2IsZlnFRfrpcJ2IqFC102ZbiTgk3T?= =?utf-8?q?ruewc90wVcaXj/tntZkKJEEexKmpmJXGLIjP61q52h/J1sgGCNnRLIFpj/zdf/qFG?= =?utf-8?q?ZXAOT7yIZDXEffaG7etlSmjwjCPt7h+qqks6efT7lzAQ/dqHd26INpwrQpoLdBrL1?= =?utf-8?q?QQZhzqf9xKjfyl3WfF0J28tgsotnsB72k8ZmCX0yKZp+4Cw7FfJaDodmrp1F/W8Q5?= =?utf-8?q?Pcyp4aHztRLoMccDJ6IVJmn3zNewP9IvxZCG6tgTTeiat9xLBlogWT8uMIbxdL/TI?= =?utf-8?q?nGG59Vwff7V1wP2DsOaYgV5v19UArph6SN0Gw3YDJdclcsxLAj3/JPXa7Lrw7sWIK?= =?utf-8?q?iaOTJlKaAJ4WNi+73zkIUpW1o0Ch2Sl6OYPOSm10RsZpDtEWMT+1pKTMgnPmZSfD2?= =?utf-8?q?uNCWL5fEraJQn0mMq50iQCGH+DrsDVs73MKGZlISmpQ8FS8hmMDjLNu/roEC6JxDt?= =?utf-8?q?YhhzHmW8EsxuOuS0n+KWY8s9V+BGAyaV0VS1PEWu7BctjOddpiWH5owIg+ftqyuoW?= =?utf-8?q?YLxxRej1dBJN0LzMRTqdSu8U8tHtsZj44qbSWnYzN6UnPK7m+IyaMcnvDsRVWZa/O?= =?utf-8?q?XNA5cKJbPhGxLaBjzCZGz/aQw2BznFfF9KaJ4OH+DcfUCrUNA22PdJ/EBZlU+ntlC?= =?utf-8?q?zdrN0JP6ZrFMnWlT0VjSfX8X3z/YVw4pLdnCaUp4f2xNxsO7NZaifGs8CB+ZkPXsY?= =?utf-8?q?MOcx/YjpfA4PUtLvskb9bJ39EE1OHf6fEpwek1JyVsYGnM9Rm6j2aj2O83N1DFzKT?= =?utf-8?q?RbNrCPime4GtSn/aRyxriUcsGLcp/5asoQCcqxG5SRj4QegDej0RxpGCj8quh4J1V?= =?utf-8?q?Hp7iCvqXxtUg7q37rhqLA2jWwfsvadUO61VE+DTyiNZ49hda9/uTb31GqPSvXuORr?= =?utf-8?q?yIw6oVcz6a4/CzMcrNKeqZsf0hmgf0DBOfhpiAB1TgCj3G4qWhzZMggRxyRLOYmZD?= =?utf-8?q?4yG3CI+FQrB78tx5XV2Woza8gic84qHeVmsJfLRyhN70vzmU8UHxemZ8eTf5k0s7f?= =?utf-8?q?kC9G2POqulYjmZOSkFbz26w76Kmgeh3QEOAC4gWR83rL7Q1yYUmr0MbXiEv0dCskp?= =?utf-8?q?vhRbmAoGKHTs5cWIzO/p/o57bGLSTSvNIZqWU+0moZ9MTeemWKqHuRcQstwiIAJY/?= =?utf-8?q?a2bXYpOYXECR3zl4p71KWWJlIfJBkzAvXvKRijXJEYOhGczfqCbJnLrSZAtMb9+vG?= =?utf-8?q?kJSx+x6mu89cJHvF2ZTSmrt0sXEu7T/0wtvy79CeHVUWOjMP2DqUZ5A7LrUL+HK5Z?= =?utf-8?q?ggtXVNRuMOsxWnQ/XJEht3vlb3Dwqih5Yg=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)(366016)(1800799024)(376014)(52116014)(7416014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?f0sefltuwNAQ09Cm0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GxNTNf5AHtE3rL/Pq/B?= =?utf-8?q?YqBpb4ScK2bW4jMWpWGeV8ZXLfyCHqJ6nu0LYW8tG3+n9+NUa8F5Tdu6uCVBtazbh?= =?utf-8?q?9lpEu3HxzxBN/fYStqGa1xfjsvUB6IoccHnzjIxRWX32q1M4SpeQ0l8Oce8j/oF/M?= =?utf-8?q?Wy9qU8pvaeEdUNi+RKJApYgvQrfFbMnCtie/anm9uZgnZqRY3LNGu9P9PvDbw+Loh?= =?utf-8?q?tnIde9pNcfgad4u7Gc9it3QPEYTxgVt+3u7xo8IjhyUpnsMjaYD/GoRcERV//S0cS?= =?utf-8?q?d+EZhkobppcSQgCcYRjx2n46EU4bYEufhVjJ3WXHqFUd28ppDj3vpYf6zY3kTZy9C?= =?utf-8?q?mTL8lXwHMXP+LVcpJzjknhZcsZ2fwSvXO2ltP6G9Jz3JwZoy09Jkm7paVoZcIpux3?= =?utf-8?q?zga0hLgNt5z7zb4TY3wSsvr5ME+9B4iK+BdlAwhriICszSbfAryvN79JEyPcKMhz7?= =?utf-8?q?lPc8ZbsIB6bRjtdRKoZwYWtLfLFAn3Q6KN06dzxoGE+OPQDeWgCOmpzg2CjvhlSZ3?= =?utf-8?q?rGadgeegydIZ+3WlrIo1S+fUZ/HrYnMQ0oZrEnCPpwedbYYjeC6d4niArFsTl4kGr?= =?utf-8?q?2VWWf4QdYkVR0VHygf9fH/nH9czSDlzcLVjHqj+lRSUedMsCs57jCMHs=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0ec55771-8990-4e0e-7330-08dcbbaac076 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Aug 2024 15:15:22.8705 (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: mBba6ev70Gm2b/WQoF1ki7ddPJgBKGGNVatrJYpFGlQKdGlAEirtj3F4g+kG6Cf6B6/GvVrMYb9KI6bcIkRjiA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8416 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240813_081527_368992_79369783 X-CRM114-Status: GOOD ( 12.02 ) 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(-)