From patchwork Thu Aug 29 21:13:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13783879 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 B7325CA0EC3 for ; Thu, 29 Aug 2024 21:15:00 +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=xaZM1005orRl6Whu8srHXtrQ5PJflD4IFR0Xv1heHBQ=; b=AmngXqZ1yUvpj0 WvijczKqIq6VFVj7i67hNmU49dV6wr7k4GqTTTNMtvfwlvN7M9WgmTSzh/0yTqcvqqRbRR6M8rLXs 3MyV/h5fq1x/M/zPDxST0WKUmzB33ZrVH0daeUcL9sUjEkVPlg0VYALNL6EgCCGHmZkD+rzMkGcGH lbvCGTIWpWe2ol82PX6J811LYnrZY1wpNxMiCDkgoSCYu46OZdw6RFSJYlvh6/xARchl8yHEp3Nql I+D9z/Awq3esk3BPbQ2RCG2tfSB4BHZ0yGVcQu8aRtwbk/AQ2l6qWOUhGdLCLzKUTi2XvvRHnbjW0 cuVCcp4mGSb633aLZCrA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjmTr-00000003eo4-48Xa; Thu, 29 Aug 2024 21:15:00 +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 1sjmTp-00000003en9-1asC for linux-i3c@lists.infradead.org; Thu, 29 Aug 2024 21:14:59 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=dUX2qGbqeFUNKqi9A2fJhcYjv5lUNohgip9CxFcQQkQqOqVhckODevtHSEm4tBdCmIdT7WxfTvJv8NbFZeDaZI/9dQzkqpwJr9uz3eLB41kWdTFbQY7SOoMnXBx5CvtQx+KutMtI24hRZDY+RtzGThh6B5KF0dzmmfOC95nILCbaQG5WXUXbDUJWlEJmfsHovqGBCIwmvTKtGJw9UdnCEHm1cpsJMrwp49gUc/bdv7U3hybcC6+4UBS3l67ljE9exT2aEm+UM+QfZb+HFGMrDhL5ptmKjHBxK0oPLaujCEnTvVnEg/8G09m1mCaLDy0XBp8wBkvpCPXF6w+447yn0A== 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=JtteZUO4947jhBzsYUYSoc17Pp7vdqOtvhMK+e6cP68=; b=H8Noe959IFM2nix7jAjRIZwfDAnwjP5gfV3UNFDTH04tT49kkaY6aG8tqgJ8UpvlsIdq/B5eRpA4j5TNyG+Zv5PX7sEJn0/wd+eq2cnzy+E0peU8/mmUGnahUmWErxmNi6FwdR0GnJwkXExgOgAEMAi2Icdozt/qs3xnfQ9bDTiKru9c/L6EUVcbqsQbp95tRMAmKfVuySfFDTYzS7EEJPjfmj3K4BNQqjmBNa2mCM75QZJoALK97ApQrK5KE8rRCwlafh2RQgp/6yFgA60KQVNtnGRkI+u/kvBLNsjweCzuB5Y7NU8OqTPDfr1PdRaOKn2ed2Z6abzyjcrk8iFYJw== 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=JtteZUO4947jhBzsYUYSoc17Pp7vdqOtvhMK+e6cP68=; b=ka1aKJpu5p5qN2p1z/YHZ+phHaJ9fCr1m1ECBbHQ3LM4roPZosF/VtZH7alZZ/PLspPz7Xvi3c86S/pZQw+ByHWJwgo9KZe+Q0uLF2B3V2+bRhs+zETosLtz+jzLF8wzNWGZkHtiPN5l5oficPhiBXfDGNt5LXU+NN5KLKPAokiYq78ut+FiurNzdXGJGYZfqGZ73AaRceOJVGHyxmSlWgKvj09cZA9rJIXBOQdPVXvEklb0jEVBmV5tQI7YNnaYbNfOPCKRw2SNI6knIMzQ3kWAieGpkVvDe5pKcGqzsQNKkbQdcEpwvtBqs34L+l9rSTcPEj+x4yyiLcVL7CKxcQ== 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:46 +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:46 +0000 From: Frank Li Subject: [PATCH v4 00/11] i3c: master: some fix and improvemnt for hotjoin Date: Thu, 29 Aug 2024 17:13:57 -0400 Message-Id: <20240829-i3c_fix-v4-0-ebcbd5efceba@nxp.com> X-B4-Tracking: v=1; b=H4sIAJXk0GYC/2XMTQ7CIBCG4asY1mKGnxbqynsYY6AFy8K2AUNqm t7daTdoXH6Ted6FJBeDS+R8WEh0OaQwDjjk8UDa3gwPR0OHm3DgEhSXNIj27sNMhWLWa28aB0D we4oOz3vpesPdh/Qa43sPZ7Zd/xuZUaDWmwrAAhddfRnm6dSOT7IVMi9KM1EUR1Vr76SBCpjWv 0p8q6YogUp1deOVBYSuqHVdP41xePAIAQAA 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 , Ravindra Yashvant Shinde , stable@kernel.org X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1724966082; l=3045; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=UiDcNDkPN6XID2EDxw+hsqrwbsBPgaVCvqRoeU9RYKI=; b=t0Job+XVVBi6SNyklAV8bXNVJH3UT30lXz8xe/sNF6K4eEd6eTlrPW0F5ERGj5O1ftzm0Iudr zz4/K4nW22HD2zRZeb+IFcxeCyk2xwpC9h9NqtlhVOxBK3DU7D2t2sd 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: 67ec9722-e641-4395-6b04-08dcc86f9bf2 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?pID5Msl98wwAg39HiDj86D2jR297hEe?= =?utf-8?q?2PiOYjyVrfH4hGW6S5tmIEFLH2pYcOTBQ+LDetR8gCJg4wj2XkZJuII72rjiliLrv?= =?utf-8?q?rDAa7eyY6WoZEqktkYWyWzpSUBL1OK3fAnqiVljMsm5Qq0eQ2eq2gfxZhxtebu5wA?= =?utf-8?q?mqQlW8an2WC16jIxD2pLJB84mp9GmuiQimxoLHdPzIsP+i/jSz2ZLAB9Vj5WM5akB?= =?utf-8?q?PSmPs34ZIWpexUZVF0PCP0Oax9OUVNyqUSsi/RVj3Ph9iI6tK3fy3GU4/EMv35PPX?= =?utf-8?q?5PaZ657AAyorJKt6bVUOOgCaPqwp+m6BvXwwhxPB7aQEYk4RtGtscxBgK5kDFBjqz?= =?utf-8?q?aWusPUCNj0SBLmaXYzCXq+aSvA0L2XWcQMqztyDeUvjAIxYBs6Lr2WQq+lOsYwW4S?= =?utf-8?q?LnNlbzO8aTLY5/IrlVYm85yuieiY4Jl7PXKg1CkgSD2RP6I+KlokDFU7M/su/vdh3?= =?utf-8?q?KwKbpq1dB3XkZXoCF+tNhK+RV+ts2cwUzvLKahZhpbxaI+wTquVZJppcoYANw8CtL?= =?utf-8?q?a7RcwIksm67/Jf0ZoaERSZsKvW0M/Ek0Mm/TFiVtTyVqbLHGUjF/pXx3JpGyNDep3?= =?utf-8?q?F1MLb9UVkK79d07BnR268nmISibv4F9ByOIvJwR8A0HGC6kn6slwtUD1g275wEFn5?= =?utf-8?q?F9FqsQqn9htyY9a5OykTkKVgHWJ1AH+j4UyoJLrRQnRcYZNslBoUWJi5geahf+x5S?= =?utf-8?q?RQRjAxQJ7/tZD+6LjEIyf3mTlOZTgrwi3/UaESsMrbhwmduAjSTPTGA18ktXCDA57?= =?utf-8?q?1O9yzdjU/EZX6rzbNL8B/cmZRob93JTAjy+wUtcTkSdRYkFm9WDFxuA9OEqN+hfpC?= =?utf-8?q?JNXxIRXRTLSrZqd4dcUgE+qCVxdbWRMs5Egijiq8Ebo+OA6yptc/+7rs0juVHyBxh?= =?utf-8?q?SX7hQexYabk22Lh4oZns6n5Sq3KxgxYDWaRFC0mxOmbvQwDTVu3jJhTXsq4EzPMTI?= =?utf-8?q?gPo5OHjScsBC5aOkQZnQY0y+0dXX/MEauqGKQJsFkV/CrpIvemmjyz+WVYu3BVTp/?= =?utf-8?q?e9wFbbAH6iJlyjk+2IVZZvN3DVfDPt3HhjT2eWhOTc9H89O0FggcRIFjTn/nS5lQh?= =?utf-8?q?waFtWxodGAvcbDKmcaJsutlAwak2EJ+WsbxsTynW+eYORwcz/n47ShBDOYV18fti6?= =?utf-8?q?vAqL/z1ZvfiGSQkCkK1gRLzekwRh/csSMC613ph3tB5a3TmUHd7AUg+o6hr+NksYy?= =?utf-8?q?olV4q4p1bUYQ/bTeg5dRqFv3+9eozbILyEmjX8BNqvdZsyD5t7XHmguv3MaKZZ0Dd?= =?utf-8?q?YFBdyTFfGwOsaC/UemfYKiik9Ide7VSb0sJdxaELx78OHiHFG58hC6j4=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: =?utf-8?q?Pr8ZML/NIwohKSscAMqnmljIN9Pm?= =?utf-8?q?fZbIfYJzicmPKAfVEhMFEcU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otTtA585i0ZGd8J4rhR4eUobvlBleB7?= =?utf-8?q?tA/8pFaFwLQNJVi4Q6r0xCuy/R9fQPw4pzQVxk9TjT5fjLfJ+dtj02/i4lJc3H0rM?= =?utf-8?q?yHmg/A9LpRoVcqCf2mAvO/pvGAs5uwwrEi+hyKXtOGG5CnekECRpm+h5vKFergxZy?= =?utf-8?q?uZWMIRNxETs5u9Ui/0tif1oOq0LvEezbTnp9yFW8v14os+GJ4YQzm1IilsAl8Qdz8?= =?utf-8?q?ksi4Vqv6FhWKyeeWY4k/9hFBnVuwZcyV6SBzBusN6sAgJAJiwYwUZuuqAtvz3qUzV?= =?utf-8?q?95OUSliMzH2uD2saSJeeQtexUWeGAQWgbFXpcIpDamc3+J3st68czIzrSNXvv0Ig3?= =?utf-8?q?6CU2L52uil97vrEAQNNHQcY60CXzOVM/c8XUH3blb19JqhH+Zp2a1Ylel/PrKiEZS?= =?utf-8?q?UQT7gizOEiyiu0Z+8puAQoLpUanVPylyB8PdgkDnGWNvbgsft9QTHJz8izB5gohuQ?= =?utf-8?q?X98RJFrZNfbBahlAtjkZMslqrqJL6rgX3hAvgKIP3t1dPqkZ5pY8zdX3r+jaKKHXy?= =?utf-8?q?GPtJiz0aFz/IEjNhAWs4tVwuo7izt+ER++QTQZeB5H0LCfpDgT4iR+b/E+RgG8O2k?= =?utf-8?q?D3x/EQZfFT0T?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 67ec9722-e641-4395-6b04-08dcc86f9bf2 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:46.4326 (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: K0hBsTAEZiBD3oF9YMA4pC9ZcjVH3JCDyryZ3X87hQi4A6IWT8Ebgm45U7JHymFM51GD3pnfnVJMShO1ufyKTg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7560 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240829_141457_702032_9E4A5B60 X-CRM114-Status: UNSURE ( 8.58 ) 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 v4: - See each patch - Link to v3: https://lore.kernel.org/r/20240819-i3c_fix-v3-0-7d69f7b0a05e@nxp.com Changes in v3: - Fix build warning kernel test robot noticed the following build warnings: url: https://github.com/intel-lab-lkp/linux/commits/Frank-Li/i3c-master-Remove-i3c_dev_disable_ibi_locked-olddev-on-device-hotjoin/20240814-234209 base: 41c196e567fb1ea97f68a2ffb7faab451cd90854 patch link: https://lore.kernel.org/r/20240813-i3c_fix-v2-10-68fe4a050188%40nxp.com patch subject: [PATCH v2 10/11] i3c: master: svc: wait for Manual ACK/NACK Done before next step config: x86_64-randconfig-161-20240817 (https://download.01.org/0day-ci/archive/20240818/202408180012.ifcIOjgX-lkp@intel.com/config) compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Reported-by: Dan Carpenter | Closes: https://lore.kernel.org/r/202408180012.ifcIOjgX-lkp@intel.com/ - Link to v2: https://lore.kernel.org/r/20240813-i3c_fix-v2-0-68fe4a050188@nxp.com 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_STATUS_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 spin_lock_irqsave 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 | 100 +++++++++++++++++++++-------- drivers/i3c/master/svc-i3c-master.c | 122 +++++++++++++++++++++++++++--------- include/linux/i3c/master.h | 9 ++- 3 files changed, 175 insertions(+), 56 deletions(-) --- base-commit: f2b9f0aeff2b3bb0446c955f0d8fac7659644c75 change-id: 20240724-i3c_fix-371bf8fa9e00 Best regards, --- Frank Li