From patchwork Tue Aug 13 15:14:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13762205 Return-Path: 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 3653CC52D7B for ; 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:Message-Id:Date: Subject:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=bsT/yu5QUdWOv5gvL25wrFvYg5q9evbDssrlkPFZdFM=; b=3SU96USfuK+mrS KABkpDzyCjNYmk911DkvM8I0+HbCSbbGL/F8O2EPKYgAh4ZXAkzD3RfPEtxgPzDDSn56HMMmz2zoX T8yQZCVf/+kpi3C47ybAa+7t6FQv1bqS3JfLZ+3ZgRkg/HmX7X+KLo4hvOEqu/OfBfCDG6DsqUq+v /hxkRFlq706nOO5K2Tw9PqRXzd3OGDbgrxMohVIY703dOsqqPRpYbdd0GwncbSOpetzHqjy9D0zWr TvDhP3HN5w2jfaQDZS66H5NFDWN/eESe4gSazlyV/b7dZiS4ZtKakSCLWDZrOsKGmQq7F6SJO/Oxh bV6sqMCMhhSayKJEkPhA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sdtFC-00000004AhW-3ly2; Tue, 13 Aug 2024 15:15:30 +0000 Received: from mail-northeuropeazlp170120003.outbound.protection.outlook.com ([2a01:111:f403:c200::3] helo=DU2PR03CU002.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sdtF9-00000004AgF-2LOO for linux-i3c@lists.infradead.org; Tue, 13 Aug 2024 15:15:29 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=m7yjp0bM57yxsEo28pN8pN304sRQv9ixfgV89mew/Wdd6kAHVEYTB9gx2MYGlKrFHWTNBsB01wUxvL5qFMmktodD/r6jjKiSaThD2UV6DtqXhX0CDL1gz73rJ6BUJU8CRO9r535ZK4EtlTJwW1SfWr41KeoHKBRqGEQIaFRBj8x2WtyESu8rt6632GKz6gW8GYj7ie7XHabfA6hgiRptnvOraSW/fA5EgXdjk5n84Wm0eDQXfGSyAq/90w2xeQTZaqmes9Sl2xTPwYTL8M4FkiNPnBZPv/rIYTKUSu4jROwn9VtYfb8vNQBi4mfrvz1xZrUnnipKwaCZxFT/JR1CIg== 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=Ik505uxrcoOAZoq0M5fToVBuqg+6ZfC2DDgaDAx2Kd0=; b=KHrFccrmcNxOn6AzkqgGP/phm01bkqBS+pSjmW5LoNKlNw2omwI1Vl99Z+mfTtqs6JK80SQD3X6hfXKYtAw7Qd8T2BMTayTKlcKmTvg03w/ctXzSs1k5c8REji4MTXDiRRriIzPIQ+Igf+r3HwH7CJDnKzhiyiiUtm074uOapx8XPksCvNvoGMjMTy/h/8hnOOLBAwu3prKLEZWOYp+PqOpVu80rOh20s9tmKZfEkR3iYO4igKaNFMgW94lVIK3nAaowVPLBmnMaSrXdB8Yz7r1PskU1udXVH29M9PAnqxTxsJgL3TiO9UqEHu+g7odmnCbVgrbTWvGDyy67BU05KQ== 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=Ik505uxrcoOAZoq0M5fToVBuqg+6ZfC2DDgaDAx2Kd0=; b=FUgvOE3p0u3Dq53Vw0IywaeGlfIKi9NY7ppMMl1uVXyUiKiwT/A1cuVlm8dSeaN5KO994ipFP7zrg0p6sw2Rdy4Nfoe+jGOxxLSSUIEBvzR/Y1CVneJC5lfdFvfBSTVr7aCjpIrsSdGCpMMQLSGktctcN40TEe4fStOxAgfxh5WPk6dRfA+YeWc59PKMucM6WIJimDaGpBdS7Dywsnfgza1tZdcFhXBb9y5xlAsffrx4TdRz180R4d9ITe0Qt+gqgDgeOio/dIp4xL5mmeErALvFMaTIm1dD46NHSlBTf5AQEKIL34O8wjohEf6fnHYALnTj/5kqtRAZTywmZ3dpRw== 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 AS8PR04MB8404.eurprd04.prod.outlook.com (2603:10a6:20b:3f8::7) 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:19 +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:19 +0000 From: Frank Li Subject: [PATCH v2 00/11] i3c: master: some fix and improvemnt for hotjoin Date: Tue, 13 Aug 2024 11:14:58 -0400 Message-Id: <20240813-i3c_fix-v2-0-68fe4a050188@nxp.com> X-B4-Tracking: v=1; b=H4sIAHJ4u2YC/2WMQQ7CIBAAv9LsWcxCq9We/IdpDNDF7kFowJCah r+LvXqcyWQ2SBSZEgzNBpEyJw6+gjo0YGftnyR4qgwKVYe96gS39uF4FW0vjbs4fSVEqPUSqer 9dB8rz5zeIX72cZY/+//IUqAwTp8QDap2Ot/8uhxteMFYSvkCoZjLX5wAAAA= To: Alexandre Belloni , Boris Brezillon , Parshuram Thombare , Greg Kroah-Hartman , Boris Brezillon , Arnd Bergmann , Miquel Raynal , Conor Culhane Cc: linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, Frank Li , stable@kernel.org X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1723562115; l=1779; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=qULKNECKl29j0mMuFirqULF4KYmewWg63Q4mY6fvZL4=; b=PJ3YpGvyfQCWEUiDBw1ivFyqRde6qzLyYi0wxPRyRgySIv2YAWHCty+5wi6p4PicqeDV1Z6pX hWYVBRBvHMcAy+Mwa5P7j+Kec1qjINWdN8hmu2icgfr42TuPPWvBWz9 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_|AS8PR04MB8404:EE_ X-MS-Office365-Filtering-Correlation-Id: 6d8b6841-2b5d-46ff-c946-08dcbbaabe86 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|7416014|376014|52116014|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?Nh5lmXvIaSAOgoxLZaauCsuY/sRBR55?= =?utf-8?q?r0+qdEVR4sQpa67UbOOMTJMBByxyQ/kGw7TEehwtZNXF7DmqbxU6slP5QxOeyPN8y?= =?utf-8?q?IrdatdhSfsK+kjf/wQrYdx1IeSy3y4a5pKi7ZGuLl2BoVSZfM1w2LzuRDrx5GcNW6?= =?utf-8?q?7WknYHxTLaQbqOTd07y9QgwwF70oQtugv4F55zwj22WKpL7prxUU3qf/ioUewrJIU?= =?utf-8?q?1w0vCgJFS8junNw7S8HSY4VgH+89LEJejgIc+EkzbGEbuL/PsIsDWCQYyRFhMYrSx?= =?utf-8?q?8ezg8cfFLlkD0tF4Rq1rpTpQ81qjyO6nMhQtSBwxCMlGmMfzRKCTu7mE4RUxaEwlk?= =?utf-8?q?I4pOmvmxyKgZj61+0UsrNZ2gLlTj/+mtUc1SL4f+eFUEeot+Ox4dUJiB2czXAt8uA?= =?utf-8?q?lCQfqjBEs5fhr1b220KaIIscU+H9bVkhUU8Wii3mqpTQ74kyli7TH8J1jcQmqczOb?= =?utf-8?q?mM6XFFHfHvPP8la4GWs+lx7h9on2m5xFsyCUizVH/NogS2A25BYjOsuYvdFyTftLR?= =?utf-8?q?uYUHLBPg13atAQwlcxek7EIcPoJzNeNONyMV1KisubZ8XUQO8gQxE7JfmQMidTN08?= =?utf-8?q?jKm+3DiDKkQ/SuDMFbqeQbwnB8BNFxp2euN/spT4NX6dGgwxtKMOaptfc6EJqPNdL?= =?utf-8?q?HeLjm4GJ0CNe2QdSJ0RjfbgI94xonPi0ge3EDc2qjumxx2YmhoNMSywQlTWd3ePAC?= =?utf-8?q?BbmP8EN5fnxiXzV2KLo28Zawb8H2mEXAhzR31yNluXAhpNSqf7d7wEuIyRKSN95ab?= =?utf-8?q?KPu2vEsfMJHMyVBeYUMhjROGYYI2mpeX4bCjEZ23JJJ0C117Cf2kOE4QDZ/PtLbPU?= =?utf-8?q?9AF2sPNkOhoK/TzIfcus9WWOg0qPDgmpj2vt9H83rOBkquowrCjwNr5yNJocf/8Ff?= =?utf-8?q?mLf72Q9KTyao8d0VDrgL/VzV9/p2ycjmJpE0MzP6UmNGSCsFRxQJv0u3b3q44ALRl?= =?utf-8?q?sHfMTipKwEuGvGa/kym6ofx9K/QdKX3vn5Yk7MOT3XmNlUKI5FzraZledUXCQ0ds9?= =?utf-8?q?r1qkQJT0BAeqSVn9J89cGQDtT4rJGiWjfVe3d8azihwTl4EnMOmovfOOubUdfdEiK?= =?utf-8?q?GAOlrEdnjzkfXi/TKFobvBU8cKo/Qx4vJ7Cx41LCOe/czbu4+mjX2nchiIwrds597?= =?utf-8?q?3kwmb4iYntxyX5K0p67IpRRvirXBrLn3kpCIxy2Hh1CCbukfbO29mdTJMZjjYWriN?= =?utf-8?q?0HPATKHcn1KhqoeRW01BX4LHsko/TtOKG00IVMXh2BjVE4fwiOP6uXwce7lscgJYA?= =?utf-8?q?T/JuZpQMkD7eZDSaLdOoCbDK35ll57urB5q5Rssbcv4X5mIi77mAR7+w=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)(7416014)(376014)(52116014)(1800799024)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?/Gzn8t2tK7vlpt2MnJlBf/SzP+s6?= =?utf-8?q?hlSoAx33osnqGTG1uCeVrnU/Sy8IMl3mQC502noQ8shJ+JRWJ4NLa2ByF5epR5+1S?= =?utf-8?q?jik6G23/dZ2CCRYvTfr9x0I53P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X1hNVGGtOdueCRtWQxD5fHCtNBtLYYrmYI13zwB08d?= =?utf-8?q?yfPf0xCsM0LssMrBXKCcphKDeYaEu9Knxzs3d2gAIBabJPUs0K32wykV05hvbNOTo?= =?utf-8?q?4o3Op30W5ljNiQkLkzGy4CRfQzE01pJqxN/X+U/qsRPr/ZOFTAsPf//JetvhxsihW?= =?utf-8?q?TEawc844B/wguOcH+efmnXxUVKvlR+oCQkNGPNRKkw9NpSa91XhzVVXe9cNJE8PTo?= =?utf-8?q?4F3nJ2R0C+3ULC5zhpvA1NWjNk84tHxJrJveW+DMS7ZiyXQ/cHJZQOcwiB6ILkfsL?= =?utf-8?q?d8HfaF3q8YStWZKX5n7n1/pzw2neKacofwhIj2Mv8YGXwgOn8Te4J6pFox2Oqj9c+?= =?utf-8?q?jxIqz3XJ14jVsQtf+ybSXhjSzS+Mj8lJ4mXu1WK2hZfIFqqJ8Nk7m4g9VVU94kOZH?= =?utf-8?q?VMLWVGSK4mSXg6JycInebdk/zfxlIXE2SmiK+lEDJ1SpO7g0kIzIjJn0xQYben+ye?= =?utf-8?q?6N+nI/UdX4PMuDQJwGyOViDFnuPfVmMRum2evZxNhQagZ9wHL7SuIL4A=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6d8b6841-2b5d-46ff-c946-08dcbbaabe86 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:19.6030 (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: bQRtX296zzx8NXo+dmZcqDyngoGRb+IbyujtQwyNUBNpYNZ7VfvUbPqTkfhZTLSAZ0YZXbJsOc4OqRii74ClMg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8404 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240813_081527_755596_5BEBD94A X-CRM114-Status: UNSURE ( 6.35 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-i3c@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-i3c" Errors-To: linux-i3c-bounces+linux-i3c=archiver.kernel.org@lists.infradead.org Signed-off-by: Frank Li --- Changes in v2: - add help function at i3c: master: svc: manually emit NACK/ACK for hotjoin F Add below new fix patch i3c: master: svc: fix possible assignment of the same address to two devices i3c: master: svc: wait for Manual ACK/NACK Done before next step i3c: master: svc: use spinlock_saveirq at svc_i3c_master_ibi_work() i3c: master: svc: need check IBIWON for dynamtica address assign - Link to v1: https://lore.kernel.org/r/20240724-i3c_fix-v1-0-bfa500b023d6@nxp.com --- Frank Li (11): i3c: master: Remove i3c_dev_disable_ibi_locked(olddev) on device hotjoin i3c: master: Replace hard code 2 with macro I3C_ADDR_SLOT_BITS i3c: master: Extend address status bit to 4 and add I3C_ADDR_SLOT_EXT_INIT i3c: master: Fix dynamic address leak when 'assigned-address' is present i3c: master: Fix miss free init_dyn_addr at i3c_master_put_i3c_addrs() i3c: master: svc: use repeat start when IBI WIN happens i3c: master: svc: manually emit NACK/ACK for hotjoin i3c: master: svc: need check IBIWON for dynamtica address assign i3c: master: svc: use spinlock_saveirq at svc_i3c_master_ibi_work() i3c: master: svc: wait for Manual ACK/NACK Done before next step i3c: master: svc: fix possible assignment of the same address to two devices drivers/i3c/master.c | 66 ++++++++++++++--------- drivers/i3c/master/svc-i3c-master.c | 102 ++++++++++++++++++++++++++---------- include/linux/i3c/master.h | 8 ++- 3 files changed, 123 insertions(+), 53 deletions(-) --- base-commit: 41c196e567fb1ea97f68a2ffb7faab451cd90854 change-id: 20240724-i3c_fix-371bf8fa9e00 Best regards, --- Frank Li