Message ID | 20241002-svc-i3c-hj-v6-2-7e6e1d3569ae@nxp.com (mailing list archive) |
---|---|
State | In Next, archived |
Headers | show
Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2077.outbound.protection.outlook.com [40.107.21.77]) (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 CF3351D1503 for <imx@lists.linux.dev>; Wed, 2 Oct 2024 14:51:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.21.77 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727880662; cv=fail; b=jnbMc3qNCVXVNDPEsuBt8Ycte6Z30mjfI5bSsrDQ4q2iTkdxcECzvOca5StXyfu0nJ1r1wxdNFMnqa3cRYlRWDw+icw7CspwJoxSlHvIpadbklCn1RA2dsMOD/1WaYXLpidKbNiZgZa/cTqtp9MSRTN7btlbLTU+vstYXc3wNWg= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727880662; c=relaxed/simple; bh=Gqd0wCYgtoBFMpBxtk0AaOasL9R8L0WjBcTL6xq2nd0=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=X6Hft+r8+DsRpRfAywJoadc98Z3YrGDr/zYouSxoo407bNesZgclo2wTQzMQemusS1m8PN9AWefumyEJBCM/w4mfCzyI+zACE2/nqAVNVztimchWeVU2tjcdwiBik5MOCRrSrtuqBvGXcFcFuHK5TyJ41gJgvRLGJyWeebuzY+o= 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=e7iwHWOW; arc=fail smtp.client-ip=40.107.21.77 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="e7iwHWOW" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=KkYZ+zE2rMHlnc70VSAQ100789i18tAaO8SQTNbW4kg5CWGN+r4Cp1ETZG5/L0hjL6H698ejpvxYORdf4ouqDoAEidFXkvSEolcOoP2k1MNvNtrvsEF4eBp9qXNHDUqgc0R8GbVGeOWteNRhTfkHdqBmsXslG8CYevugKWB6Ym5ITHvL+G1ML5Js60SJHIR7X7lEl/YK46L0p2mK+DKpIpLA+fDLgD7tqhSFFXtKJf8v23MFQOBYWUV22wGN5CqnmbH2oKoTGnexE3WIMJgw0i2XpOmIq2Mh/Fq8ppYSodws+dmteD6QFp4ES93tCQW9JU8lbU+RqMpgq0GmemYm8w== 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=X3g4JdrXttj+9kVg/nPdSIQfctPvNkrRl+XAcULKDEM=; b=S9pdwUc1dRVSoCrkEhdsicNH+Hg1hivnE+JDuV8sOsXdT0uJ2hzHRSzFuR+JSUEW6z15qdYM0J5XsCaV+wQayL7WjWrtbYitcuNcqUNN2H8cps8vCOH2qONTIqW5FLu3Jkiank8iMerZPXo9rJM0lX91alPCsQxWTv1E31cyCqby3uOQM3ay/pXw7lcVnMHZdLJssmxYzqG19su0ZOKWtH4ustrYiLAk/IEwk0XRy/Af7hvaNNGxcn3201ilSFjdkyS5PZMKjxPzWyAn2ih8llcEp2PsBwRCXc7JPiOwtSLzINYfVAY5rmkDdqDjqr9N3WjHMxyluipIzlbeaXdZlg== 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=X3g4JdrXttj+9kVg/nPdSIQfctPvNkrRl+XAcULKDEM=; b=e7iwHWOW942zd9e1aU+MKBpxV6Krlc+S+tkBT0jQKHO+LM3Sz0qlQKeu+mW0XREBFhTxGvANa0xsv690yhgGb3rdDm6RQuK9fSOSFWNLcwpevJYwwEKEcJlXaE7kiK8KumBDfV/uDJEOV8ZbNtucVzyJ2xZH8XJdC29+7G4j8f3pEdMkCzQBlGKbhv7zxZ5SWh/TdC1h2yflwhscszxNxfNQ0uV/NC816BUyEwr8d76CSsJLm5qHE/KOfICS6ulIkIUpSV2C6dpCFvCJZ4fJ1gNS6qyO9qUfsTOVTe8grBBKq5jO/S25rEwyQDdQNmurwKpHBy5qGDaOa/3hbmZM+A== 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 AS1PR04MB9699.eurprd04.prod.outlook.com (2603:10a6:20b:482::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.27; Wed, 2 Oct 2024 14:50:56 +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.8005.024; Wed, 2 Oct 2024 14:50:56 +0000 From: Frank Li <Frank.Li@nxp.com> Date: Wed, 02 Oct 2024 10:50:34 -0400 Subject: [PATCH v6 2/6] i3c: master: svc: manually emit NACK/ACK for hotjoin Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20241002-svc-i3c-hj-v6-2-7e6e1d3569ae@nxp.com> References: <20241002-svc-i3c-hj-v6-0-7e6e1d3569ae@nxp.com> In-Reply-To: <20241002-svc-i3c-hj-v6-0-7e6e1d3569ae@nxp.com> To: Miquel Raynal <miquel.raynal@bootlin.com>, Conor Culhane <conor.culhane@silvaco.com>, Alexandre Belloni <alexandre.belloni@bootlin.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=1727880649; l=1900; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=Gqd0wCYgtoBFMpBxtk0AaOasL9R8L0WjBcTL6xq2nd0=; b=yTdOKTPn+Hk4AHdfqpLCafDEvmCl2BrJJxQOVbedY6RqaFUBlJ0BGf+gflgCusCn1PCsnkUsn f8OQ7scY4pHAVImiva3L8kVM/j/nVX33oQCoyxzyx9Gom48JoOQtYYI X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: SJ0PR13CA0177.namprd13.prod.outlook.com (2603:10b6:a03:2c7::32) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: <imx.lists.linux.dev> List-Subscribe: <mailto:imx+subscribe@lists.linux.dev> List-Unsubscribe: <mailto:imx+unsubscribe@lists.linux.dev> MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|AS1PR04MB9699:EE_ X-MS-Office365-Filtering-Correlation-Id: 48628745-f4cb-472f-994f-08dce2f19f01 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|52116014|366016|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?RAXKm7raruJPlahhfrbiNGRIomxExaH?= =?utf-8?q?pIt0g04XnQValLf/rt8jjxypQKyshG88wGjgxFi8Vh0FVP6CvLvACTz5bcOGw/oC0?= =?utf-8?q?Uhqno4OHvSQ0gLlH+Tx7V06rS8zkJey0rHntOnueUn04Vb2p6HyRmq+DJnPSTHO0M?= =?utf-8?q?nhZAc8G/85HNXPSCdl1p6RWVxvjRlGim+jDeA+NbqdmHJTI765SLlwS82CA1IWzyJ?= =?utf-8?q?Dbn+Qw4sETDR+7QtQiTgmMgpthkx/IqbIS38kZlj/n4Gtt47lSvnNPxkLvYdS1djN?= =?utf-8?q?eevoPWqWIuVFw9tWDYV9b0rJMgokI1MtDIvMtwp2qNBrxZwRS8pxgKQuiHYRR5k7d?= =?utf-8?q?R/8cA1QlmIq9K+h2asPj7rFs9i68sFyTRVwzcYLHbwTaDulD2Y7NJjm04jt97xhus?= =?utf-8?q?foATnyyDwEOrVfLqb7On5gF81J9gaysuZsBHc6Sn3M8RXIqZk8iFHSUqYN72FKK4c?= =?utf-8?q?AipVMNC8RX4B6jqqbSK9DfL/AHqfxgRduNTGSknptgnRu3cjnSIYxoOa2BlcDnDUh?= =?utf-8?q?Ku4VEdXKatAkvPQ9LzeM2AKG8exenIv3nEFpMYbQ/C84cFCfFPgpiFIIWM5calrJu?= =?utf-8?q?9sEwhBB72aWJ8S+/eDWqmSzxjgLDN75YtHP+oS3xJDKAyajQEwrTuaeFYyJZxOIfq?= =?utf-8?q?8veQ0tbVIkW9DfNO3FHQ2vlxgzjcv/Xxdk4czttc7cRg6Uje5TXDbJeyO1ItwKiHi?= =?utf-8?q?QxRSwJCwsJAH/n7jbzFtJig1LZJYvQHEFw/p3j97P7hzg92UFGgPUUItaTxAnP3sJ?= =?utf-8?q?c8JlO86Z2y4MJJWElOOs+Am1zX2t11K0AEK1vHQ/pWBtipnZBKiq7mYDcHFuuYkI6?= =?utf-8?q?caZq6cv3ffI0OjCJSyhg8mWVzIHX7okNKflyEIRjMsmj8apvu+H0FXOfa8NvC+fYI?= =?utf-8?q?bmOmiVGGybmIYAC8L//PQomd40YSJdqwWmhOCTm/LOBKnpw2YS0mNwaQX2tFk6kPX?= =?utf-8?q?ySEEoedF4LjdXtEDLMMCulejLKiGgKWN8OuS+DFo0s3JsvtP3ivOPKdfNmU2LkL6K?= =?utf-8?q?wY9qkgNgt1xxjMhwcdFdfmOIyGkH/4gn8sadvPFqBX7x93mkvSLyi2MV7SBeUf1zM?= =?utf-8?q?a3GqF1jGCY5eTljJ24pCklxPMnc4QdIxrAX+yIrsBOjd1xVrU1JSr3bAF4mTbO2YX?= =?utf-8?q?x5xaRUhWRURyWGA0jE/2J3popSh8hnnWBrb6U7DlQXL1zmbCKs5PHhCLFVa+/DjDn?= =?utf-8?q?E/+/VxckybCYfumGqNRuhKLAWQ6/n2eGSh2teyL4PdDyGD1r0s/ALx3C8b1JMLXiq?= =?utf-8?q?gVl/9D2e/OsBI+1oCslcQBoqFjnYs5e05gA=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)(376014)(1800799024)(52116014)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?QOaeM/6qBKhXImNdykHBLIgF6Qq8?= =?utf-8?q?4SG3VVA7nxeqZSjPUtkauUussLeXWLeQYykEwPWWOp+4jzKxqtU6l4mXxHWIkJV9f?= =?utf-8?q?nvW3yaXSmtaP8zJ1IECkqbLaKD+c2z6QGOd6mUADN8d1Lqqpyc+TDp0GcgfmMMxm1?= =?utf-8?q?u0gYqDoXdFkl77jYylShBmUk/NidDSGhv3jKV5NGdjUi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rlk?= =?utf-8?q?LK7AzZPMMsugZav984Ma4nbrra70yi8/xQw/pu/Yl/+qmlFe7LbkQbhZMkEsUO7oc?= =?utf-8?q?blGDKH9KXIR61jY4z9JOMCfUMaDhEbpFxTbrMgwhYuWm8gnJiJBvrkfTu98MFfqJm?= =?utf-8?q?4GHhgWBeupadoTcWxQ0FavJeyshLvmnm+MSVWC6eUA4R+wq2zSy0prpTsHsEJnqZU?= =?utf-8?q?fwI/sc3ezVnV8yjKGHCHpk5Bfcrmys50B6PobT6pfSwxQgenZGuP4QFU4BviKuriW?= =?utf-8?q?j0I9+J7bew/GUmKNce/2uh5mcGG+4kqy/LbYHZBTEX8gwPep9V6qdK5E4MwLg0MhD?= =?utf-8?q?j/fYCa6tBVGIH9sn/WBp2Q/5zRCkinHZ7/K4xXl2HxSxfOLRACD5pN2w0a7+k5gQJ?= =?utf-8?q?tk/JS1GJq8tNaN8En9o3NHjR9Aav2LJi0+lZQ7Eb5jljVmfygVtLDsp9m9ASoon3X?= =?utf-8?q?0ZeW2srdWYDl?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 48628745-f4cb-472f-994f-08dce2f19f01 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Oct 2024 14:50:56.3360 (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: 1xd52IG72cRUZpMsDz/QlwkyrX7bmWjP/Z3fgFCd74g2Z8DugpepE4TYdLBAoSNp6M49Le+7PR5fBnqzQqx5zA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS1PR04MB9699 |
Series |
I3C: master: svc: collect all patches to improve hotjoin stability
|
expand
|
diff --git a/drivers/i3c/master/svc-i3c-master.c b/drivers/i3c/master/svc-i3c-master.c index 7cd3ce2643f1a..c35a228f0c2f4 100644 --- a/drivers/i3c/master/svc-i3c-master.c +++ b/drivers/i3c/master/svc-i3c-master.c @@ -409,6 +409,24 @@ static void svc_i3c_master_nack_ibi(struct svc_i3c_master *master) master->regs + SVC_I3C_MCTRL); } +static int svc_i3c_master_handle_ibi_won(struct svc_i3c_master *master, u32 mstatus) +{ + u32 ibitype; + + ibitype = SVC_I3C_MSTATUS_IBITYPE(mstatus); + + writel(SVC_I3C_MINT_IBIWON, master->regs + SVC_I3C_MSTATUS); + + /* Hardware can't auto emit NACK for hot join and master request */ + switch (ibitype) { + case SVC_I3C_MSTATUS_IBITYPE_HOT_JOIN: + case SVC_I3C_MSTATUS_IBITYPE_MASTER_REQUEST: + svc_i3c_master_nack_ibi(master); + } + + return 0; +} + static void svc_i3c_master_ibi_work(struct work_struct *work) { struct svc_i3c_master *master = container_of(work, struct svc_i3c_master, ibi_work); @@ -1177,7 +1195,7 @@ static int svc_i3c_master_xfer(struct svc_i3c_master *master, * start. */ if (SVC_I3C_MSTATUS_IBIWON(reg)) { - writel(SVC_I3C_MINT_IBIWON, master->regs + SVC_I3C_MSTATUS); + svc_i3c_master_handle_ibi_won(master, reg); continue; }