Message ID | 20241001-svc-i3c-hj-v5-2-480ab8aed849@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 B16B7CEACF0 for <linux-i3c@archiver.kernel.org>; Tue, 1 Oct 2024 17:31:53 +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=+8q8VKyLeGNfSXI5Rlns8wyFmzO3gNeG1g/AgaE2ke0=; b=ICy2cuR5T1eJDHvaFlxp6LOfjF M1EV+FZKoAYvqZSLDblwgKZC+/L2StU/I2k4lLb6Wo4v42UmhMFM/TXGDnPwXQaIj8Ydu6iWVu5kD 6HxYOzR7cjIKaXckt7ULMjxO+dAwLEOlzL5+WKvIxPjOL2oNiWdzrbntT8ojxF6B1AA20/CWl+1B2 G0w732On4ZvDVv81owOia9dWsb/qX62plRKrLoaWkcp96p91AxLgbah766EEd1IqWuICBhMB5BB1l K0EBycn+uWm1I4ZGh1ugDNKrn0EaKf1IMgfmNxx25KVxbPolukEF4mUHwkRUrI6i5t1O0Atom0D7S 4O3xNE8Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1svgj2-00000003fO9-2man; Tue, 01 Oct 2024 17:31:52 +0000 Received: from mail-westeuropeazlp170100000.outbound.protection.outlook.com ([2a01:111:f403:c201::] helo=AM0PR83CU005.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1svfaQ-00000003V19-0IFz for linux-i3c@lists.infradead.org; Tue, 01 Oct 2024 16:18:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Bv8oIuO3d/wNoWfiduoIRsfCyyVSry+j/hSDC4ADfgBOEXlVUDyFoExXGwDz3S1yUJBhI+pExYSn1lhT3IdqpuAhoKOxUEv1+TjipW8DRIn0eZq6y1LhtCR0/5X/2o8rUnAfbA7AAtwPeU2IRyKdW24PzGeA1bKs6RaZNQmEmLDrtN/aPtEE8fluPTPYD/RYxMwa2k6aFuKXTjRZ5kGsGNg99hVySG+RZzpTiepbta2lNHSj2U8xF+taf3csTQdee7IJ0R3cE6WKY4nFXfQ2sQckVlBxF72KuzapNJ7ixy7FvEs0gYkxmRggayqfG5uHg9NGM+6cq8rfIk5IuhUwpA== 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=phGcqpjKBhpboIAfePzMU+xlXCV/r2VDbu5UN0qglSI=; b=F3gVSIQf9JtAl+zIWYyduXLB/GKe58KN5J000left4RKB898OzpyvsDMrsoKGRpO81w0Jj8ix8XemZMTRnDseNifaszZxJS9q3nG7p8r5AG+buMXqo6VwnnUbCOqFQ0+5gW4gg1inaHMcl6zAYaeVAXqN7E/Y6Iu9prwEPBE+V8s17DT5O70u6OMUVQGb3EzYMftgGpkqgazCH9NPYXmuqmQCZOngrWcrpUJVn8t6F+UsevwYj053lspK8QqYTZlxr8ursw8D+zrk9SRyysOOG+Gr0I4+IhxEH4+BXJrqkAQ9kFFbNntYmgfRi5xFdZ3EOhc8Wv+o91YO1hRjVfgEw== 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=phGcqpjKBhpboIAfePzMU+xlXCV/r2VDbu5UN0qglSI=; b=D/oRgZFTz4AS5e2soZYQ9QnFh9u6uTr0ok+id/5XJBwJUeY7q9+6tmZMM/6tNCEiwpLJAw2SWXek0nYRj1SrLIkizak33kkJHeExPLB9XM913ueVb+5uuS4PXMJ0qm2XYOfcuHqg+IB/wHVWKrj4QVVe4aa8tkLEcQdqYv3cxssu2FNebNPWuefSJ1ii3Y2oGtlAV47lrW47C/yc+B5r8iT3wkMYcR3eZEgr4L5XJ72x3mv4pO8b6szSxeWIc8N0jij7clJuTER/qEYdDpEhzZhhyu6+yStA9rE5vph8QLnUJN20pGbMbJe7S5CjcJokpECv6+A7ueZStCHzqI4ALA== 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 AS8PR04MB7879.eurprd04.prod.outlook.com (2603:10a6:20b:2a4::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.27; Tue, 1 Oct 2024 16:03:41 +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; Tue, 1 Oct 2024 16:03:41 +0000 From: Frank Li <Frank.Li@nxp.com> Date: Tue, 01 Oct 2024 12:02:51 -0400 Subject: [PATCH v5 2/6] i3c: master: svc: manually emit NACK/ACK for hotjoin Message-Id: <20241001-svc-i3c-hj-v5-2-480ab8aed849@nxp.com> References: <20241001-svc-i3c-hj-v5-0-480ab8aed849@nxp.com> In-Reply-To: <20241001-svc-i3c-hj-v5-0-480ab8aed849@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=1727798616; l=1870; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=HGmPEBh3mp0etKTNyLcYhyNHTes4xfDtOurveSww8os=; b=oUeixh/hE6hKHFP0GFQxi5DGSNggf9MDispFIBBJzUmMXx+VmMdMRY+iyFkW2dMpSXsBdp/6S jsMtmNlUCy/Ai2Bd6TrmoLQ2uE5uPYWFjHP1NpeVRZpEkPujcFRw8Wt X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: SA1P222CA0045.NAMP222.PROD.OUTLOOK.COM (2603:10b6:806:2d0::22) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|AS8PR04MB7879:EE_ X-MS-Office365-Filtering-Correlation-Id: 45b9b58d-ef8a-487c-ac79-08dce2329e39 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|376014|52116014|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?SE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/pTLPKp+LVxV8SX?= =?utf-8?q?ktiZ7c1Mel0jwaZ5TYVI6rtw65+OdjLMEQkZI2OR8KcWl/+zryfE2GPzBnYqproeR?= =?utf-8?q?2ciuOSoq29W0l5NwPHYMH192MyiN2EHbgtQyFB1dLV2WHpgqrVvQchg9JUg8lznUE?= =?utf-8?q?n+uUiL8t4jQJBFb7GpoGNrKDZi59k+YE2vbl1sIwd4eoK0vux3G3x7ApBBFIbF7k/?= =?utf-8?q?WAO47BrPCWGTPh/YSAeePZD7fx5klke1FyPMY+Jy9a1KjQfD/E6xXvs7c9hCg9qmY?= =?utf-8?q?y3R2z04y8aOtbxDYw5NE7qXmdYKBnHKHIcs/+A9rLT2pjvzA/UzzJ8Q9Doan9Agtq?= =?utf-8?q?il5iLazOcyfU+yvUzDozX2P/U4pzwvOJzX3Fk54EXsqYl2dN/83RX9MlU0ElU/9NR?= =?utf-8?q?TeXMKH11acd9wvji5+66dHWTqYeKrySPFvQ=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)(376014)(52116014)(1800799024)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?2WcMzU0tp+1H1wSH/wAyF1KFuI+E?= =?utf-8?q?ypdIrBCTsto9LFKDPKc9vwadFz/gBpTudgkcBmyscBQzA64hcFIGaL0LsA7zb04Na?= =?utf-8?q?So6k2DMjh2EXYbXPFgDl9LAHD2JPT3s2ikK+IiM9Xru6ZXFAPwSx/H5BSoJfTyBgu?= =?utf-8?q?1FBMyKorEMFyBaGN1nbTgsjXMnTOUIMv16tYbYQrz/KCxhpJK5VNfT3hdXYunuL3p?= =?utf-8?q?Dj/yZxmYn2E1juIIsTnNOtgiGrcPc9m8dfILvah3m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xD2CWgGzC/nDW5x0?= =?utf-8?q?6zecxVqxOZooHWRpSlNaNPrE6+1zJnUKBYl+0Os5zOWVOGtYGwHM7rp6LMTruvi61?= =?utf-8?q?KLH9T2nBy3Wqb95pOodFLqzc/vYvVq+aNKLpSvNKyw1pzby5mR+kfvhEZDikNB/uR?= =?utf-8?q?wuH5Xn8rzGAdEvzvExud51VTn1M8GihcvTUu1tXKTIKgqiBNvzBiwDd1DrcSYdh+R?= =?utf-8?q?dtm9+vnudTguCUmpwlEiKJJFItGJXZLSMaCTBeWFEgLv0IGe7UHNXD5IwXd3U8IkF?= =?utf-8?q?9AnRaUYXNcvLFo/A6Dzne7y1COYftplN2NQr5XhXEPWbTT/g4rK8UfbO4CQmEnxfa?= =?utf-8?q?ke2kNtQFWBosLoeuAdeVdFY/PToxlnJFxbUlv9WUblRm2i4E+Z5xfiHc=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 45b9b58d-ef8a-487c-ac79-08dce2329e39 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Oct 2024 16:03:41.1224 (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: i2M5T9zxo17/dyGgUsFkdI6kFprxRMoPMkl+16KR6SstpTfo3N1lsvVLuhpnWbi5Uvx4IklzVBeNd1U7oVTgAQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7879 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241001_091854_150178_3A7A272E X-CRM114-Status: GOOD ( 13.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: 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; }