Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2581324rdg; Mon, 16 Oct 2023 08:34:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEN6w+nTRHKQHq2edl3OWLv5O8AbyntVohcAPwTu5rP/2blumso/KIJYnujk40ICs58trIA X-Received: by 2002:a05:6a20:72a2:b0:16b:d470:b403 with SMTP id o34-20020a056a2072a200b0016bd470b403mr31848509pzk.28.1697470439834; Mon, 16 Oct 2023 08:33:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697470439; cv=pass; d=google.com; s=arc-20160816; b=AyPyX4ZS0MOEcyF7SI/9ZfMqfZ9+faEVRTwZ9Ub/ILlFcPQJoPPN2d5munWaeaaBbJ F7HifJirUPPY7hdD2t9fvOrQd5Ze8SWnp8i/t9UQch+L132BoZYVo+CfNq6wp6CJHAyJ A5weC6Q1RDdLhuWcmy0sxBc0/7+NoW37lniyuQ54uX3Et6yh6xEZEiQebOnsaf9UJmAV ZSG9C+cAg6PiAbrI2KaovhrCMlCEzDoZz5PnRqv5sXIXmd0VOU8blFm5z1kRmkuJZDpf Pnv4q6ScQyUmOKggCEclGbNYF1SIBOxDOF6Rm6Eoiql46WGirV/6qIi7+9zEY9Q4DsDI n+0A== 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:to:from :dkim-signature; bh=jorvWz4GxmzMDIDvdhZin08SLMEa5RtSrhynf9Gb3b0=; fh=bn4KwJ7hiZC6iHD6ocv1YpB9R5Bd8J/ZarfJ7QImr28=; b=b7mJ1j7UMEuuO8NeanfhsP4+iNkMGKBvKvjK3No2+a8LkEnA6tLB1oAv5Cx6DlNHQo KOtqKXu/ekOyRqMe4DrM3+cKsOHIh62xhCiFxUsly11+PoLMJfOevneMHHjsB21XERSi sPDAQOpjZzLwewTpuatm1jc0NMjZAvKPP+wKN1NnHm/PKsuGWvXKTi9NGyk8KHextU/m muR7hmUBN1i6ORKEcGLM9THZYkgxGjwA1QGzXUmRAaJJN2we8l7DPCZ2wWWJA5ZbngTw 9quGw1U496dsjTw6tfTFyx0svSYsssPSRDIhPUPgfvNvglYJwWMHWBcL6e6qimkg9mqv EIdg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=rXMw7J8Y; 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:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id y32-20020a634960000000b0057d7cff25besi10671869pgk.829.2023.10.16.08.33.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 08:33:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=rXMw7J8Y; 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:4 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 howler.vger.email (Postfix) with ESMTP id 0DFD48061297; Mon, 16 Oct 2023 08:33:56 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233925AbjJPPdZ (ORCPT + 99 others); Mon, 16 Oct 2023 11:33:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233759AbjJPPdF (ORCPT ); Mon, 16 Oct 2023 11:33:05 -0400 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2040.outbound.protection.outlook.com [40.107.104.40]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BA5DE6 for ; Mon, 16 Oct 2023 08:33:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VmAUmKqK401Br0AJYvqvy2dhoSu6Jr4/dla8smGWtMbUi6brrR/zqnDLIwave4E1bgEmTNGF7/PwkzkpzznWWiK4l7Sf8NAOgc+3NBwGbq5dbwpT8Rebji7bRFVEDG1OONMXwFkripuQy8Gbi207tLUPzdat8FjwayVr97ZTQjMc1BJPiv0g8DXe+KLASzdllnozlkex6rI/wJG8bZCKGOigVXsYhqJfAwJlqHq5seNSB+G8WCu4kUkDlvvPe1c5GVTw8wMH6m9wnADGFbELLlKuT/MwX3ZNbbQLKQRp2PQBkN4Yo/q1pQn2LteMcyw7DiGAH22RxsuXts3L2vLczA== 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=jorvWz4GxmzMDIDvdhZin08SLMEa5RtSrhynf9Gb3b0=; b=hbBBJzrpUdsNUr3nyIYyEaS3peWMMRi8E2mi0tCB7cisHWJYO9TYeHPyxvgXzTHEAmSfDvYt+5geF4oteQcS/gtWlndfaWDAOHgmNO0bO0q2zHpUvcowHxPgstUk2tmCwtl+TxKBgaJnehyKhvP3nMW0KDYXbHHBdj5mg22E0XyNWRZMgvtYj2O4YBWeO8Wc68etqMAZgYrhvHrelVTC5rkJeDA6Z5BhGVlG6V0WvIXFpL6cqF0QJTRs190mskX4HRteCUtoscuDkqc/UqUQW83nvidP2PbQ44exixder3WwfPEhFWg7PgSOMkxi/+SPFLJnP3s0Rt7tpQGQGa4ERw== 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=jorvWz4GxmzMDIDvdhZin08SLMEa5RtSrhynf9Gb3b0=; b=rXMw7J8YJAr9dIX79Jwi742ViKY2IebJHIkhjS46zoxHOWin6/j6/fvhLRKFt483vhvHs1FWn6KvOkKv3Mwzp8ro0f2szkUJknyuc73l0AEf325MNHLyMEJ5RTgTQcod1m3Hy9m2LJeAebTfHINZeBeCFu7Dcts2iHSTuEtvy5w= 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 AS8PR04MB7592.eurprd04.prod.outlook.com (2603:10a6:20b:23f::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6886.36; Mon, 16 Oct 2023 15:33:00 +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; Mon, 16 Oct 2023 15:33:00 +0000 From: Frank Li To: miquel.raynal@bootlin.com, 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: [PATCH 6/6] i3c: master: svc: fix random hot join failure since timeout error Date: Mon, 16 Oct 2023 11:32:32 -0400 Message-Id: <20231016153232.2851095-7-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231016153232.2851095-1-Frank.Li@nxp.com> References: <20231016153232.2851095-1-Frank.Li@nxp.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SJ0P220CA0029.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:41b::13) To AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6PR04MB4838:EE_|AS8PR04MB7592:EE_ X-MS-Office365-Filtering-Correlation-Id: 29fbe925-b5c6-4cb2-63fb-08dbce5d2dca X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Omz6K+ukA2OsFCNQkf2lslJ4lb67m29Rgfg2LOyTuzX/C7R7xjDeKlpMGquTaz9qCcsqmhkTEZ0kM3oXw+QUxlJXqpD6YW/bSz+yKiJa0I7hf8GfSbQ/EAMD6OfZdSMUxtueeayvCg1FIFAcCPnThMEe8ORXTKrvwMuZXDDPNbiJkBOcFpMvHSYR2PJqMUbTJVsbcCgXFZXlAlVMrpSKBooWa7xIKog5KLsd2DH0lkYdpn87CIIy2/fi3MFNZxxFWKcBD0s41VvNYbAknJkgQwkbSbGVp6gepjiB87D3AZG6fhIPTwIf0AkVMsFp1p1lJWHk9vUC7KElqjPVkMFj1rSmiMGo8xse/OWuEEZnphQwoomvDbGNldr/VhKlzR66CLGKc8BetbzUEEa0vy7rvVlK/+0wtvxSTK4SaL2nnrYPLGd7M8/aHXEXd6oKaN8N1GmY8Pa6AKw3kGNXi48EJDMNtrD4VypogQyq1AkEgNcXaJfclbhMDPX7Y16MwJBUBl1EexWwW1AawmCFEdzzChJ8QeCk9Ra0xPGyuwCl+n1cTQlOo6eLUakzx3aENFWbSdRSWSifjqJmh4wRIQTyv8nPgW2HVY3FP03v39YUFu8Hd7Qlu0jVpxavlvJ5bF7+ 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)(346002)(136003)(376002)(366004)(39860400002)(396003)(230922051799003)(451199024)(64100799003)(1800799009)(186009)(6486002)(38350700005)(36756003)(38100700002)(83380400001)(6666004)(6512007)(26005)(6506007)(316002)(66946007)(66556008)(66476007)(478600001)(1076003)(2616005)(52116002)(2906002)(41300700001)(86362001)(5660300002)(8936002)(8676002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?aHpFOVBGaWZ3REJwUnpKMTVYZXprNHpBaWRkTGlySGNlWlA2QVNsTitlZ2hM?= =?utf-8?B?VlZXTzZJSWtSSTVqYUl0T1BKb1BWdnZDTnVoZ2tyaHVYcGVaMnR3MjBYdG83?= =?utf-8?B?ZkQyQWNyclZseUdaYUY4b1hnejZ6TzM4akk5M3ZJUnJ0UVF1Umc5N0phU0N5?= =?utf-8?B?Wkd1VXFZZXc4ZWdjVlRFZnVYZSt2WUhpWHhISHJtS21pYXF1cnlLb20xYkdX?= =?utf-8?B?MGhuWTFEU1VWaWkrNVI5THQ3ekNCK2ZwcGlRQ2hIVFJtWndhUU43S2xHaUx0?= =?utf-8?B?WklFZG5QK2hWb3ZQYTd4YUtFMkltTzhtc3hydHR2SWlVS01GNDh1bkNpbUNQ?= =?utf-8?B?UlhMVXpZcXMxdk1Mck9qdjJpUTlmVTB2bUJ1RE5DT3NiaVo1WVY0ZGhrU0Y2?= =?utf-8?B?YjJzYkh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f-8?B?VDVUMTV1ditvN0E1TE5LVDFpTXZ6K1UvNWRtc2hoODhldXI4UlA5UHdoSVRZ?= =?utf-8?B?MWpKMTU0bDcrSG1qQmloOTJoTnJyL2NVTjEzZG5YOXJqZ04yVHdINFluajlp?= =?utf-8?B?b1V5WXJWa2lPTldZRnZSM3FUeFZvQk9Tc3VLRVY2THVFcjdhWHNyY3d6V1do?= =?utf-8?B?SzFUdGpEdWd2eGlxRStiT3lESXVISWQrZW1Na1FDV0Q3QTgyZW9NWlkyekhG?= =?utf-8?B?VDlOeVRVcXdYeGJaRUFZUXVRcStvK05EcjlSUGNNdmxRdDNRZkFFSzVEcXg2?= =?utf-8?B?eG1rSjgvcHB0Z3lmcXBFUlY5M3RlR1loVmUzandVeEN2SG56cEVMbmpnNENi?= =?utf-8?B?dzgrK1lWWjkzQmxUZ2UxVFJ1RVFHZFhMR1F2eU1UWXlYZXhEMEtBbUVpZ1NJ?= =?utf-8?B?VWcvV2dzaFk3SVZSSWNGWU95bFp3djRYbU1PUnBCMlZMOHFOWkxNMzZPWjBs?= =?utf-8?B?Q3BOb0o0NTRmei9xVU5jbXhQZFB1SWdyLzN4YnFoMlFpL01RZ0Z5MUxzOVl1?= =?utf-8?B?YmJFT2h2UjZrMVZmQ0NuNDNuRFkwZCtlVEJNNjVrWGhEWldQajlJQ0doLzZV?= =?utf-8?B?TE1zZkRNTWpBRytoTXlVaWFzUTRscURRbEczdlUxT25BcFZyUDExVnpDMlBJ?= =?utf-8?B?V1lIU0JRZEQ3aFZVbUtUTnlMK0M5RWR6ZnRXczRyQXBmVlNxekloN3NHdk1n?= =?utf-8?B?VGdJMnFHMnlPQUwwMVNZREFRRnNCbnJPTmNNaThUazVTaWZHaXUwOENVSzB0?= =?utf-8?Q?Hh7E=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 29fbe925-b5c6-4cb2-63fb-08dbce5d2dca X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB4838.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2023 15:33:00.0238 (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: fqbvfMzSso1nkE2LhfC/pJvaW4YIKna9QxITqKKFJWBikliTVEChVSNdZ1P9bHbeCTwLzvsTfflphDNHgJHNcA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7592 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 howler.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 (howler.vger.email [0.0.0.0]); Mon, 16 Oct 2023 08:33:56 -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 --- 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); -- 2.34.1