Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3208634rdg; Tue, 17 Oct 2023 07:46:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGafmlkuVLIZv1ioJm9l315xSWhPZJ1m5v57IHCjR+fmUm8ci2OIp8DB+Xw79G5cJ51PjXJ X-Received: by 2002:a05:6870:2c92:b0:1bf:6ec:dd4d with SMTP id oh18-20020a0568702c9200b001bf06ecdd4dmr2380921oab.28.1697553977499; Tue, 17 Oct 2023 07:46:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697553977; cv=pass; d=google.com; s=arc-20160816; b=GLbscw96fmXBSXx9Jth0fz5fNT/Jp78w7IQBSmfp1E78gPBjsXP83kCB50FSxW4vfE PGLK0G1dHMpBpnuSZ+hx3pHEUFesow1wWug+uhfvtdfSfNF3Am/PuNoZN4MSGs8b7ahv JPxJNkiBnVHw/LAHNiDEUp8G493nQ9+FwuwSmqI0ikcl2GhMPsv9EYimpbTL10NosZv6 xn42/MLkNMplQi603Nrke4Q38Cnq45MTwqePNkf8OqftITa6B3HVeHlarZZ6tRFvRMvW /s+vaKe3PJvNIhiXWPYzvErZpQ55iPs8kPAAeg5+TSpKzhuCxeL8Sh2LOrW4rVNVbsB4 9ndg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to :content-transfer-encoding:content-disposition:references:message-id :subject:cc:to:from:date:dkim-signature; bh=LPf5pEmwysBeUII9ydWPD8bHPHFBDv9RRxnkkVqeTJg=; fh=x1qsKuYWsQ44klU5/Lip2C9Lc9AjvjSXux3CAwX1c5s=; b=ek9r1s2OXMqAvBZb2WSZpYHcY9UcpUFW1lBPFEoe0KCQJ/uGOQi1ie4eK/dkMf3BBf zYMQMucRw4of8vhlLQXueKRmF4X8stJJcGBDrpL8xEU179LuTd9sdZO0QfUrfGno2+E4 cp0SLrdw1I7ZzvDI+asn0p4MxHFVNgzNaudzf8dpp6xpPF6aavrzJgDFSXKM0g7w7vW6 CTXu4MlAbfImxNyu1I+5g/87Q6VzL2fo7IWCwKCR7rMoMR57rthLJIPEiVXKtKYN9QGr YrSPM/FYruOPbnWB2ORHMg5VMIrEIM3VlU6hwUCu9zuXfoFZcjip63wKK4BYy9BIjiCg 7q2Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b="lJL3l/2a"; 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 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id q29-20020a63751d000000b005aa83686f34si1774133pgc.79.2023.10.17.07.46.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 07:46:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b="lJL3l/2a"; 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 2620:137:e000::3:3 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 lipwig.vger.email (Postfix) with ESMTP id 6DB37806A607; Tue, 17 Oct 2023 07:45:33 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343637AbjJQOpZ (ORCPT + 99 others); Tue, 17 Oct 2023 10:45:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233785AbjJQOpY (ORCPT ); Tue, 17 Oct 2023 10:45:24 -0400 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2082.outbound.protection.outlook.com [40.107.21.82]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A572CBA for ; Tue, 17 Oct 2023 07:45:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cgVdW0bh8J/xDirMsTcAJG4tcJ5nehSdX/mygfW59ZEFG+oTPMEn0HlZdBn+WUZHGZwdyMrx/0vaO0ixbIFgsjRQKV3uuTy8wjBdSRA1uZWmuge7P4qInYfJ5rkqU+XGy9313l70Lf9+sjXZThuVg7Kgn8/ehYFSrNjG8fD5na9yudRYNVH5QpvC/ImJJ9oArG90x4j7yPAvspHgrvg+wGtzrgQ9KmcsjFHMoScZHwoqEjdSg/LHyspzzof06AbV0UF02vuOv6zxn1Ys5nN/cxSOluBlX3AgZZ3rQsbkXWPGqptTCQOxmvEzBNub+Uy9PhFKhlcTRpz+fb1bmu4A7Q== 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=LPf5pEmwysBeUII9ydWPD8bHPHFBDv9RRxnkkVqeTJg=; b=XJK9xLVM7GWs0cgjntxJVSbV9hozA2G10edsSMpVfr+qesnQcTpE2DhxsgZ09LAdlXnldAm7xiNoXlOzBk51xs843X+UYllaDgkn9ExPoJARKJEJ6iWtWF2R9bG/1YNTPPL6o5KgU1r1raLTHiE7vUAQmyUNOkftJ6Bt/k7JXwADY0hvOTZ2TxBY6cC7ukYD9W0TbhmHj4donC5drdC2z9hf7p3X7qrO99P+OhrQ0Ur4w9GchsyRqmspl5KKv5UNyFVx2JusBjin3gazfzoCqNwoMYNlw5t1+vnIKujCjGtjO9daTuCLoEkUKIHQ5fmqlfvIdD9t4T8TrqwdVJbgQA== 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=LPf5pEmwysBeUII9ydWPD8bHPHFBDv9RRxnkkVqeTJg=; b=lJL3l/2at4hPBfvaOf1AHsf+h1XuqURnsEhiJ3lcUGl4NPPyT9YuHqUdGMLAJtiBoTGzXshpiSbToF5UNhYWMzJltO5pAVh2FNfGaeL8pIcGpkBwAQ+shC8IYnkF6nEoxKIWzQlH6BX811ZnNWXfIy49VDYJY+w+27rhKqko2O8= 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 PAXPR04MB9570.eurprd04.prod.outlook.com (2603:10a6:102:24d::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6886.35; Tue, 17 Oct 2023 14:45:20 +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.6886.034; Tue, 17 Oct 2023 14:45:20 +0000 Date: Tue, 17 Oct 2023 10:45:14 -0400 From: Frank Li To: Miquel Raynal Cc: conor.culhane@silvaco.com, alexandre.belloni@bootlin.com, joe@perches.com, linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev Subject: Re: [PATCH 6/6] i3c: master: svc: fix random hot join failure since timeout error Message-ID: References: <20231016153232.2851095-1-Frank.Li@nxp.com> <20231016153232.2851095-7-Frank.Li@nxp.com> <20231017163335.16770af2@xps-13> Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20231017163335.16770af2@xps-13> X-ClientProxiedBy: SJ2PR07CA0008.namprd07.prod.outlook.com (2603:10b6:a03:505::8) To AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6PR04MB4838:EE_|PAXPR04MB9570:EE_ X-MS-Office365-Filtering-Correlation-Id: 149b80cd-e53f-4c3d-5170-08dbcf1faf77 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RRpbrGGsov52htAgP4O3ZTOWUgcgNVM+OCBAzqLGRpq2pstUKmmCjGpKrbhQ8HPt07wyJmQBtHWGvv5yT0+I1ZkAd7hX1NWI0/f9l5Lj6njgE2K2NZsd9pgdQz+4efsSfZy+nKDzf2cZhTOhfHWX+/GeK/aOJFec3DO5jSaTOQ3zOv2NCwHqnurKoC6q8DQG5q4fDDlhk0wWPp7K6qWSSaJ/KNjKTrrdZbnroDNJve96PTU3bG0jV6EHuH/3V0VT9rzD3aKiF201DKVDUqMxaj38G8PiKcWjMs8nnc2tW+tA5fgV5F51QSxu62vpsKpo7T09gUWx0ciJX5xk4zkOVYQEyUfO5TeFfdF7cHP8GGk9/SiItlfbkME7egdo/d6fWi17GNRMRlv6HV9Ulfe0CHqVivmPX+jGy/axd5d/5pwTENBoa1hLYtDWhUOsFbeS9Qbxf0rRNAtXmyzK+Kiju3c8ESUiSjZWYX//ATJFonHWgpg7mdD5sozS2R5lONEYNNaV51GOU+qxKy2Lc2A/bjKmGpAzTdVNC6SXobHVO6xvPQdOf5upw4gmjBN+nr0Q85vsDSktQFojQxkzegcT44kTXLhrhav2Gtv3UnFzsvjORR0Y6svNTPECiikKzlMomVzb88ycbLTo7TwohuLWGA== 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)(7916004)(136003)(396003)(376002)(346002)(366004)(39860400002)(230922051799003)(186009)(64100799003)(1800799009)(451199024)(6486002)(478600001)(6916009)(66476007)(316002)(66946007)(66556008)(66574015)(52116002)(26005)(6506007)(2906002)(6512007)(9686003)(8936002)(33716001)(4326008)(8676002)(5660300002)(41300700001)(86362001)(38350700005)(38100700002)(83380400001)(6666004)(67856001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?THRza0NnbU9LSUVFMDJLdSt2R29KRWRVOTlnTk80ODNpTEFsNXRNeXovRVVQ?= =?utf-8?B?RmRBWkxSUndxTms2UjUrUHdEWTF3QnNUa3hWaVJkOFdEQnFaeVZDWnEwblUy?= =?utf-8?B?a0JLQjBsK3F4OEN3UlZ5SlBhSml5VjNsWDQxSDhDVk0vK3RUOTlJc1JWL1BB?= =?utf-8?B?Z0dWM0NLZjFhSWRSajFzbmJVTkdQeGlUWmtGV0daU1VYQWdTVHNadi9VUzll?= =?utf-8?B?U2VwbVlYZ3oyQU8xbzBTbEs2ZmltdWdFOXY5MUE5aGlYUTkwNjdFQmJ1cTJx?= =?utf-8?B?WCtzSlRlQXgybmpxR2pMN2hLeXY0RkR4ZjhEeDRqMEdIMWUvVVpyU0x5ZDNJ?= =?utf-8?B?b0VzU3NNLzlBdUpB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ant-Network-Message-Id: 149b80cd-e53f-4c3d-5170-08dbcf1faf77 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB4838.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Oct 2023 14:45:19.8730 (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: HvdDKIBJCwI4tGQmKCjsBDQUtD7qOma2BQn/8JjvszwwKF/cNCiHu89pymJlDkURS4yhTkr5mf0Zbwik32KJ4g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB9570 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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Tue, 17 Oct 2023 07:45:33 -0700 (PDT) On Tue, Oct 17, 2023 at 04:33:35PM +0200, Miquel Raynal wrote: > Hi Frank, > > Frank.Li@nxp.com wrote on Mon, 16 Oct 2023 11:32:32 -0400: > > > 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 > > can be bigger > > bigger than 100us. Just omit this waring. > > I'm not sure this is the correct approach. It's a real issue but there > is not much we can do about it. Perhaps dev_err is too high, but I > would not entirely drop this message. Maybe a comment and turning the > message into a dbg printk would be more appropriate? The key is not message. It return true, means IBI/HJ thread will not run. Frank > > > Fixes: dd3c52846d59 ("i3c: master: svc: Add Silvaco I3C master driver") > > Cc: stable@vger.kernel.org > > Signed-off-by: Frank Li > > --- > > 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 5bca369d6912..18bc277edc8a 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) > > @@ -225,6 +226,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); > > > Thanks, > Miquèl