From patchwork Mon Aug 19 16:01:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13768539 Received: from DU2PR03CU002.outbound.protection.outlook.com (mail-northeuropeazon11012037.outbound.protection.outlook.com [52.101.66.37]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 583538287D for ; Mon, 19 Aug 2024 16:02:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.66.37 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724083335; cv=fail; b=OCvUWxJSS5/GcPVIztmOZocqmua8BViZBvhOlgKzJvc5SOJu8PoBTZzO0I+sMcJeaWfJdmmgTZK+9cR/NcubOapX4qTFGdRzkBLmRjoNs1RmbRzH36r9DGUN4O67vC3Q9jJwg67JHaYwz8+Oz9ENCH+CtKhj5dSl0wBoZyG87qk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724083335; c=relaxed/simple; bh=VX43ykqcJNGirYjMBmD5nMNy5hv+rqSl7B9PiHEQOE8=; h=From:Subject:Date:Message-Id:Content-Type:To:Cc:MIME-Version; b=EUAwbQFntpBuZ7Um5OoN3rPwc9heyoB/RgG7izaUTpfqBN0tRo6Gs8If0uyOwBAn9tG40Its8HpRMdhtkVZbpXWcMwWwiwFnO/9cQb/sN1V8D11Asu2+pKxjQeTonv+sCyCmJHsmFvlxst2WvqaHFa2sg57adfS+/f/adJwwLKg= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=cmcNLOdn; arc=fail smtp.client-ip=52.101.66.37 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="cmcNLOdn" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=BDLR5A8pM1OyqLl74uwBfDf6AizBWmIsux53Uge1ITZgmmbtJ7okl5zB2pxvdyiskurC2yMgOid5JQrNf2cKsyeFFMZlFqyv0BtSWnXo7kASyz3UGlRnMkjCUcUSsQdK4r4Xk9ulKNR6uKmn7U5wjnMrNIHhwI5wzAVyNbpkiw7O6Bnq9hWWn4/65xixWtX24Sz/UDQdOaasRgKRRXhA48cwn0xtMoYk5Ocx11eeFtoHc/wNRvf1QErObthjEqzgTG3TQiO8qa7lYmcK++7ZWnYfKbGKYyjmRU7yE52p7MOPZloZyHR/xiX1euVQfpGqX3NKBWRCzf2vIuVf4YVZNw== 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=hrqbG2iJc56Xiifh+Q8obodv4WTy3HOVpy3ynGZaGHA=; b=Zwh5TdY160JVdOHVvpPlEbZPNZtsCoo0M7CKBlRS/Q299uIBn2n1dBWa+DS7GyxIBvl+ux05iWw5fOgL5V8behUA8ggeu1Sc2S5PB850DJrCGuLumR8zS8zN4iw/1oC/unTuEcY+z9SU+vqY1Ele8J8kGdBfyNX7+I8kaT4Q3aeifQCVEg48WmlAC7dZA6B3JZcFSMUArzgf2rSGTlHwXPrJSpBoBdQUHF89rP7ROOWbKpKm+gtfXrHKB25gll318+zrWhxRertYNv4u+n5UKV8fpZkkB/UY1SvzbX6V6KK4hkHruEJZ0gk9JD3vsiHpQ9MNih/V78n+Aea5cCrD9g== 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=hrqbG2iJc56Xiifh+Q8obodv4WTy3HOVpy3ynGZaGHA=; b=cmcNLOdnIhWqVyPTSG38HUytFT6cEy49FB3SoHqvcALiSO7CQU2ABxsnMZOotlpEDRctoaUBtwzQa5GwM1RdK4VZ7pWFwSJDj782ngnrFmf+p8ClK8FlVrb3KMWJwzXd5P++zEQ3MeZPxspqu2WgoTpRTNVY4NeZHAPUexK1FFE/nSeeaTyxftfDTFFamlSLwO6FV82p62020FhiZ/WvJNRUtCaW0gz1zf88WOj8jMjvS8UDgJQdMscmriowVBCXltwAvbLOxsYLu6aG5qYU2xGGEwwDAqabFwRje4YtPJNXxtGRIH5T9k2rUUDHrEEdAny0lBow+F0V7d1+o7l2jw== 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 DU0PR04MB9659.eurprd04.prod.outlook.com (2603:10a6:10:320::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.21; Mon, 19 Aug 2024 16:02: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%3]) with mapi id 15.20.7875.019; Mon, 19 Aug 2024 16:02:08 +0000 From: Frank Li Subject: [PATCH v3 00/11] i3c: master: some fix and improvemnt for hotjoin Date: Mon, 19 Aug 2024 12:01:54 -0400 Message-Id: <20240819-i3c_fix-v3-0-7d69f7b0a05e@nxp.com> X-B4-Tracking: v=1; b=H4sIAHJsw2YC/2WMyw6CMBBFf4XM2pppy6O68j+MMQWmMgspaU2DI fy7hQ0Ll+fmnrNApMAU4VosEChxZD9m0KcCusGOLxLcZwaFqsRGlYJ193Q8C93I1hlnL4QI+T0 FyvNeuj8yDxw/Pnz3cJLb+t9IUqBona0QW1S6r2/jPJ07/4atkNRhGakPS2WrNo5KixVKYw5rX dcf+yG6LNIAAAA= 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=1724083326; l=2911; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=VX43ykqcJNGirYjMBmD5nMNy5hv+rqSl7B9PiHEQOE8=; b=2xcBcngQe7gxCsirWAPxIrJbetrMXqYYH3Q+Vw0CAeUfuOBzTkdlQCNW3tvXuQkBdLuJremwE xphAnnuuhpRDDtiMNLZ/qmeStinyOnDggn8/WL6ig4LuL45yjmgjAPv X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: SA9PR03CA0005.namprd03.prod.outlook.com (2603:10b6:806:20::10) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|DU0PR04MB9659:EE_ X-MS-Office365-Filtering-Correlation-Id: 765df2cf-f862-4f6b-eda3-08dcc0684741 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|7416014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?BaV/rTLHgPa7jGnIzusfhYTTCMaOLot?= =?utf-8?q?wevVuh9xLGsTGBVXucRHbBIWwCU4iripO1VbfJ3Qr8CJ9clJY6xp5sCvIhuFsh5CG?= =?utf-8?q?UI7Bgi3/B92erDBi0szN6h5Up4MG7ct0uJt0bjqmpfX3ZsltkGWQ1XKlmmae8cRZF?= =?utf-8?q?HFZpeaVqu4eClT6jnHSwr7pKZz23gg0BwCZXfrNvtjVIVyn1CEKzSf9tK1r1IPLXJ?= =?utf-8?q?TVTNzginIBc/8Nm3HSMPbQ0d1UDTV+QAmZdGecsxm2+s20e9n9yHURl9AqWg+Lvtm?= =?utf-8?q?JirsHBcSJPE+dvmd9acwhz1EHTOHzZUB++eInQS2xe36JITIt9ZiIPVDbwEGYL87l?= =?utf-8?q?Erkt5Q8GqtJY1Ob8m68CaoXZnch4FbY2uylMJf7DsyT5lfGCwKNSF4XdDZ1JttCBv?= =?utf-8?q?173V7puF73t0KHc9UZbhkpAIYnnzWpBqjphk+eIVBU/Etr+TeW3zfFvb98q1zbr8u?= =?utf-8?q?sV3XyH8mMTXjfpdrWW26mKgUgCDEsPl/EIq6e7n4oFUP95SH+yvHLx/SZ/x6hFkMC?= =?utf-8?q?qMOFR34X7I87MPj9124rxoCYo/uzQ1e1iIAL/dCnEsHN++y7GtzvKLHFn1ajKUrxi?= =?utf-8?q?5k+2q999zOBXdfQtSt/tUsR98L+vdc1zin5tS3AEEpT5GikmhCby4MYwIS/MMsaVu?= =?utf-8?q?AG++Nym5DOJ8jWO+yPZ4ochr9GyI+nnqp646yfk1v4UcmVSbWRXf2I0CdrBVSHBHA?= =?utf-8?q?eXKLtq+Rmkh+FIETOFAvfCi+O85K493vaPoFcKI+jo0N3HMQfRwbGYie+m8zndB+B?= =?utf-8?q?oqn3tgHH2f6OcufZb++n5nbEWLjXq0h1PFVVa7Icp0OFeF4niyiLpU5rTR7zGYbQY?= =?utf-8?q?eIqAW2BYGqH9EqMNKzUI7ATstRfMJFmiqk7jB3GRLRGx13aHKRp91Iq7Xe+AaepKo?= =?utf-8?q?h2FrtHL4bDNlcp9iwGJhRMP7DZm3s3g9OIwJpK+D1EjhpRORbpSKyeQoVyGIgtTFL?= =?utf-8?q?aYZC/IDeCKSOW0/xY3SiAM/i8yHlxTUIoUFabuZyOi8Xo60lXb5v624CTALEIG58R?= =?utf-8?q?kcljgDArzlbkAeluwr7ecqD4SdCfsdYNYNBZE/pTCLcBvEUs9nNus714ye6aNKL0i?= =?utf-8?q?U2ow5MmlSDL857KOji6VZ8VFj+Wp6SUltILzMDdCHKOhqM3twQHfAjXguP5kY6FMX?= =?utf-8?q?IW0bJbhGNbtWOp+0yGcLeGCS3cr8TLV2/AvFzjGHKzJXYWBRJLk1tHHXCoKXmBifv?= =?utf-8?q?6RxY35NdPx9zz7N7qoevZKF8tRjLoFgH6HpPc8zOwxOoFFMO/2T9WKvxnuQJ2Atcd?= =?utf-8?q?i3hjD2wzbCdPlUkMElEm367REoZ17txExfg=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)(7416014)(52116014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?FCmZAvfCNJ8tsmHSGt4YojN07IoI?= =?utf-8?q?vKbW9nwxWYwFeeieSZacV270HuUzniBcMV+HUmaXgHBDWiexe96/hEfC7dSD1MfcZ?= =?utf-8?q?eTINgIcqepcFrK0xiYZSruTSvnOeJQdcm8v0jUAiHsQGSi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fMnLMMktFfTXEwCa2?= =?utf-8?q?DqB/jjLH+xfTD5fWRqOMbB9vLTHXxJU4+bCnHNsyjCD39lAGMq4uHCT+sAnjWbyAg?= =?utf-8?q?u7SfVinytkenl8VSqTbVXbT+5aH/5HkUrEHHxtRK5RYdYzK/h3kWgSNBFtNOJ1zPi?= =?utf-8?q?w+bq0vUfRBrsG8xQICHypfGIduFnGl9FHfiCFK+YvALuR4GhmHRHLRHlHEBl7IcCF?= =?utf-8?q?IEVAwraKbHXbnnR/CtwAxPnnwFG/G2RA/IkAHhySPs6QK9auCBQtLqD2WRMaOjGBx?= =?utf-8?q?Jr2dQPb+O29ASidVDXYVRpX/mAHfyFf9Dp5elY6zxvNyv24x+xOksw5ZtcuNzjVoU?= =?utf-8?q?ym7s6MZYUDDY1mPin+yng63b0FPybV+IYhZGsrJPIyMeavb4UHpzC662UwFXkT/ce?= =?utf-8?q?pKUufJfV8MXttOvs3JMe8QJCyXd/4XoTfAf1iLunV+OkX+4QHwtGmXaDtKzGEakZH?= =?utf-8?q?mT06Zbu0kdKOOhnMA0YgegjIqwfYTJvlAJjS4jm/LndP3m4Jra9WlzYc6pbtAgNk+?= =?utf-8?q?5p1EQLwNR7Me?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 765df2cf-f862-4f6b-eda3-08dcc0684741 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Aug 2024 16:02:08.5482 (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: ZRYNTwXCu3cBo3EyRC1HCQXdTtARxbLFqXqyXr7NHfQKEpuXaj+ATfBtaOpF4iR5FhUMIajUMgaRFD/jA+Kiag== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR04MB9659 Signed-off-by: Frank Li --- 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_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 | 104 ++++++++++++++++++++++++++---------- include/linux/i3c/master.h | 8 ++- 3 files changed, 125 insertions(+), 53 deletions(-) --- base-commit: 41c196e567fb1ea97f68a2ffb7faab451cd90854 change-id: 20240724-i3c_fix-371bf8fa9e00 Best regards, --- Frank Li