Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3897470rdg; Wed, 18 Oct 2023 09:01:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGosq7Aa9tiiTPTpcTrAmEeXdfYPzgY0JJH8/eUQEgq12vpnJ7HzNMm3LXpQgTjEiaUprgI X-Received: by 2002:a92:d604:0:b0:351:526a:4b6 with SMTP id w4-20020a92d604000000b00351526a04b6mr6110332ilm.18.1697644882332; Wed, 18 Oct 2023 09:01:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697644882; cv=pass; d=google.com; s=arc-20160816; b=bUKG5kqs0u7SHGAVdJoX7UELsRDIUXbke31dE7KNsHTPnwcElXvMHuekRfs7HwO+Hi sGi386IgYGeOr7Lb0mlYlfGtV1qBKuiQsPs7+6By7B8mzk7Ja4h+LuTE2bfIDLP9PFHG 2X+vKFj47Nn5fBWm4BvXBxnWqPV5ML2YmkyZhvH7xg467yAUHupBkSioRCULYcw7nw2l mI7lIp94BYM/b6aNH9P3v7iCtyUy1fHYlzAMgnKnccoO8bLHg+4nRAfB0If4qwFYV3tU zhdTr2m1VSVqdoOyr37QKzCquMi3eg8YR8B0t9zNO4/SCjV+iWi9gHzycnojoEeVMTsU LC6Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=478803QczRFFXBUKZoVGKqPgxQF91oUCRqBqSsaRd+c=; fh=sDe3TG6/b46JEOvF2xh0f1K4oYWCH8cpxTVfh1/w/G8=; b=u628wYAv2ydZAcvxlXlwzgvhAk8B4zK7FWS56PiwXKmjkpxbMyjvJLzVACiuZcK/TN NFG491p3+zq2a6eoMXrbsPxZll1tShgdVi/+bO+9nph1Q1HovZZSzJytl7XdtO1hANcG 5s3qvZluhb96ncifGCGBWBSFBA4B3DL9i+LVvuj9nLWiVxrXL94fMxhHfPSwZ3EGDLfi Wckt17+WHhai52Ptj9rQCnZgGlUwIw4FfIzhjmSZPiHQt6mmlNp8uElmbPPTeyguQgf1 E79jPjjPdCv7eXR2HGTkg+L2tMX8X0gtmBwa7GJmfDBsdrOwFPA1BCu9JBKWxHYHZSEX XMRw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=I7lSfk6m; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id az1-20020a056a02004100b0056fbf85c743si2451556pgb.790.2023.10.18.09.01.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 09:01:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=I7lSfk6m; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 790E1805CAD4; Wed, 18 Oct 2023 09:00:41 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235180AbjJRQAY (ORCPT + 99 others); Wed, 18 Oct 2023 12:00:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344704AbjJRQAG (ORCPT ); Wed, 18 Oct 2023 12:00:06 -0400 Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on2047.outbound.protection.outlook.com [40.107.13.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A07B2116 for ; Wed, 18 Oct 2023 09:00:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PXIvC6ZLfNB+KGG0DzU8M85j5GIWB56VpQh6c4GPAf3BCF7gjkq4sS/OovCn4OPZvnhwmpxfju1qwYnXfsMj++JqXfeytijqP1tyqfMbYTQJSdc81uHDNlBTNJCXzH0KTnpIFcOkE8sVccj6Lbc/3hTewP8n+sKSNg6ZkrqonZFiBY4dnNlNO9P/s73BAGwOzZeJXOxvnOvGUx9fRNCIbP0QPX+200aSZgFZobtC64FhZQdB+/HOqnj2UX+c0CCUGZWjpgcVw1sTkjj/beoTlquNg5Ywu+sEppUFUfmN4vyYgyot0sv4jiRMY0aXZ5Hp6wzoCUskUckBAW/kC728xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=478803QczRFFXBUKZoVGKqPgxQF91oUCRqBqSsaRd+c=; b=QWeViCOLj9+yWPPu9X2ZaQjBd/Jj427tpv8uOkPEIyJjkQqpTile/Ogeh9282QquzXgDgdmCRhxQJSVmw+7afrBZikW2ovXedm4vXR5j5UVa0IKemmdegdYg//gMHkop68TFjJrewccgz3qFCZg7wLrxZ+zPW3c5Sk8CbiP5zss95ZCNuDRh/A9bv4uR9xHZPLvUdmtOlOTIEtbwpXlZUkwnwOtEI3LffRbjpxIGDz3ywwnNoJDyw1+0mzh+EWoFhCi014fuW3mp74WVgTCAl9pouv0+vgc+UwUqpfTjj2u6HnhR2WMZ9by6WrbehYjpJM5VvsePro1xBmP2Oomj2g== 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=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=478803QczRFFXBUKZoVGKqPgxQF91oUCRqBqSsaRd+c=; b=I7lSfk6mpf4kco4xiOh1PzN5kobl9au2hHtcGe69DWXLY2mE3VQOrIitd5qc6peg73MI3eN+VrWVMuC5f8leVdxiwtQyC6aN3wyd0qSV6owNX3zRcs3e8D1qYIbA4HQSvCh1hIsdB807ZDfnwlBgdYnTGCBMAilUdYalThj3OZ4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) by AM7PR04MB6966.eurprd04.prod.outlook.com (2603:10a6:20b:109::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.23; Wed, 18 Oct 2023 15:59:58 +0000 Received: from AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::1774:e25f:f99:aca2]) by AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::1774:e25f:f99:aca2%4]) with mapi id 15.20.6907.022; Wed, 18 Oct 2023 15:59:58 +0000 From: Frank Li To: miquel.raynal@bootlin.com Cc: Frank.Li@nxp.com, alexandre.belloni@bootlin.com, conor.culhane@silvaco.com, imx@lists.linux.dev, joe@perches.com, linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 Resent 6/6] i3c: master: svc: fix random hot join failure since timeout error Date: Wed, 18 Oct 2023 11:59:26 -0400 Message-Id: <20231018155926.3305476-7-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231018155926.3305476-1-Frank.Li@nxp.com> References: <20231018155926.3305476-1-Frank.Li@nxp.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SJ0PR05CA0210.namprd05.prod.outlook.com (2603:10b6:a03:330::35) To AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6PR04MB4838:EE_|AM7PR04MB6966:EE_ X-MS-Office365-Filtering-Correlation-Id: c2be9190-f7fc-45cd-6d61-08dbcff34751 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Smkj3gwC3HUe66vGSDimpNAsvQlq7DV5p1MyVAdR7X+KEKe4PZSZZEj5/VnNVMKgxkC1ozjDt4VaK3YQjPcn37OMmUfFlkzj41AU5k5An8cGQOE5V/Jl4vS89JULr/fdYuXA7NOF5ct6H0nSyPm5wxSWfthKLaPdT5bKPQuFP/SGuhVJtfK1HuLwgIgVCjRXw4t/1sQnWuZogYXKKij9rQ6Q7BnX+VB0pLZwJEiOFEcmxwhN1Y9eh4wHTqj8hgaJWcl4Ob1WUkD5vtGaSG5rccTBGyr1RE30VZQSnSaN8elm2w2Y6fDMPW+0SvmTz4XiK5tSXfz2gIKw9YrWsXDNw6opudtkzNmXxTT5mOl/hc88IEdhqRr1NPzuZo6DcxJz+E2ZNNNp/bUmNAzl9qv1/Gh/I58Kyyp4hsWmM6R6pNbICtflNmFHSfmy/JHws+m2WuCs3Ohv8KsFPUy7hoaAPfFRd2gNrqsObFP1LaqFFn2pDaItddkDveYuJcH6GfWbnlzHO048918hk3yO7A4/8i/OLY0yRDJ8/E5/TL0tnCYdcAo40WlkCHxSYGmJ/pIL2GpUul+kuNf2m0VtW1BEcXiXvfyueL2dE83ZagKmuOiK1rpfJoJb8Z3HWOpwdoO6 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR04MB4838.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(39860400002)(346002)(376002)(396003)(136003)(230922051799003)(451199024)(64100799003)(1800799009)(186009)(2906002)(478600001)(6486002)(6666004)(38100700002)(8936002)(5660300002)(8676002)(66556008)(4326008)(66946007)(316002)(36756003)(66476007)(6916009)(86362001)(41300700001)(6512007)(52116002)(1076003)(6506007)(2616005)(26005)(38350700005)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RGYzVUdwSlJJUDFkVWw5VjB1a3RONUF2UCtYREFtdnpGS2RjS0tPK01jaEpI?= =?utf-8?B?c1djekpaWnBQZnZqNWlyY2NOdXJSL252WWxKaksyU1dReWxqaUxWY1E2dlVB?= =?utf-8?B?djJSMGlnM0ZCS2tSUHRsMWNyMHMraXA0anA4QWRXQ2RoaThVVlhKNTFMUUFX?= =?utf-8?B?REY4QXN3dVMvY1lHL2ZWUVp0N1RaUEt5YTU2NDgwcVN4SFNCcWFmY3U3REY3?= =?utf-8?B?MFR4OC9VVUY0TFJTSHJJNWFROG1VaC9OUmVaeFlVaWQ5Y3QrU21nUURrRVpy?= =?utf-8?B?Q3huQjR5TmdWSzRLTmFHQmt4NkZmZlVwRUZaUFZyL0xyZUg1WENTN2kwQndy?= =?utf-8?B?NUpoWHJmOEJDZVFJL3pKbTBpRk5yc0k2QnF5UHBjT3NHcGNSRGd4cUR0bHIx?= =?utf-8?B?a1MxMWNqT0NldTFxSG9pZXZvcF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96VXYxS2hDTHViTlVMT3k4ZjdMQWRoQ3VvVUFESGY4TlJ4?= =?utf-8?B?U1JrRDBtdHlqNjV2bWE1UVVpRDF3SU85bjRoYzl3V3pudVpiWmFqdUFwcnV1?= =?utf-8?B?eFc4SysyWFBsNHd4OGxTQkdRbUZnKy9CSGs3a2RhZzFtQjZwcmd3b3pVb0Jv?= =?utf-8?B?UUJqcWhSY3BWTytoV1FsZVkyYTk1Y3JrRklhSTJtN3NrWHR5TldNZEh0cWtp?= =?utf-8?B?MXc2dVRDQUZLR0lwU0Juc2VCZGtkS0FNZ01WdTBRc2ZIbEZqN2tBQ0VDY2xC?= =?utf-8?B?Rkd6ZWFyRU9aRHRTMFRJY3pVekd1dXpOVGtscG9kRkIwZjBpMktidk5WemVZ?= =?utf-8?B?TnpSdWxKMW5KYmozdEtCaWQwcmFpcE9naXRlUnU1L0lKUkQxNVdZblVUNm04?= =?utf-8?B?RkRZa2s4RUtpUWtHUUIvQ3o3eURHd1FKcXZ0ZUlWelNmRFVJMXhEN09KWWpl?= =?utf-8?B?SlluMXlSNWFrdjZvd2pqd3FYTXU5OVpFQTdTclQxeHpPenJwQnVGVW9ENVBk?= =?utf-8?B?amFoZXI1MzNHZW10UUJxZXFNOVVsRmlzQjlKQ0VYY0JxV3k5VGFsc08zWnh1?= =?utf-8?B?OGxtR2NHbnFJc2ZoVWNYcm02Wlp6VVcyME80b2pMRGkvVGFvVllCMTdNcE5L?= =?utf-8?B?TVF6SExiaHdOdUtkc05FWTlGRXZXWkZvbmtmK3NZdW5iMVg4ZE9xeDdIVUcx?= =?utf-8?B?MFVJY3hDeExlM1JoR1BMTlBiazFGSG5LaUcyaFd6SU5SMGZpWDBQMyt4MThj?= =?utf-8?Q?GKqPKpgYhS11pSc+BGHyCDWml?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c2be9190-f7fc-45cd-6d61-08dbcff34751 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB4838.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Oct 2023 15:59:58.5131 (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: 4I63UuGnjXmXnwy8MxQis7lE52/x2VZWoraOOvtBb+ac2OVVWOFq1FgDitYaoM1rPLMYGh/QX9lhRt+GEq1sPQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR04MB6966 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Wed, 18 Oct 2023 09:00:41 -0700 (PDT) master side report: silvaco-i3c-master 44330000.i3c-master: Error condition: MSTATUS 0x020090c7, MERRWARN 0x00100000 BIT 20: TIMEOUT error The module has stalled too long in a frame. This happens when: - The TX FIFO or RX FIFO is not handled and the bus is stuck in the middle of a message, - No STOP was issued and between messages, - IBI manual is used and no decision was made. The maximum stall period is 10 KHz or 100 μs. This is a just warning. System irq thread schedule latency is possible bigger than 100us. Just omit this waring. Fixes: dd3c52846d59 ("i3c: master: svc: Add Silvaco I3C master driver") Cc: stable@vger.kernel.org Signed-off-by: Frank Li --- Notes: Change from v1 to v2 -none drivers/i3c/master/svc-i3c-master.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/i3c/master/svc-i3c-master.c b/drivers/i3c/master/svc-i3c-master.c index 1a57fdebaa26d..fedb31e0076c4 100644 --- a/drivers/i3c/master/svc-i3c-master.c +++ b/drivers/i3c/master/svc-i3c-master.c @@ -93,6 +93,7 @@ #define SVC_I3C_MINTMASKED 0x098 #define SVC_I3C_MERRWARN 0x09C #define SVC_I3C_MERRWARN_NACK BIT(2) +#define SVC_I3C_MERRWARN_TIMEOUT BIT(20) #define SVC_I3C_MDMACTRL 0x0A0 #define SVC_I3C_MDATACTRL 0x0AC #define SVC_I3C_MDATACTRL_FLUSHTB BIT(0) @@ -226,6 +227,11 @@ static bool svc_i3c_master_error(struct svc_i3c_master *master) if (SVC_I3C_MSTATUS_ERRWARN(mstatus)) { merrwarn = readl(master->regs + SVC_I3C_MERRWARN); writel(merrwarn, master->regs + SVC_I3C_MERRWARN); + + /* ignore timeout error */ + if (merrwarn & SVC_I3C_MERRWARN_TIMEOUT) + return false; + dev_err(master->dev, "Error condition: MSTATUS 0x%08x, MERRWARN 0x%08x\n", mstatus, merrwarn); -- 2.34.1