From patchwork Mon Oct 16 15:32:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13423594 Return-Path: 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 0D9C0CDB465 for ; Mon, 16 Oct 2023 15:33:15 +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:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=NurwPyXc0zO5VQDPZ6CVUgBTUTVCCKethuXJcYsDJ5w=; b=i21d8Yw9d/NfVN 0C7zsjxBw+vyoQnYXPwSkyMnGEdvQA7qcVwNuSC+K0XnQwDukfCeQTsgjvjTjoIpnAHoqzcldkQD+ KLsVN8RX0hGFL5W4TAs5kk2Wu+HW6xYkLF+t1qlrKsWomD+Y5cEEvmwI5op6NtahUu6RuTpVb/OHR e59Chc+xdO08D993uA59EfR7YYg0xvn5eWJSmqMvvji8Bd4Kwifid1tK3qM1l6f1XGwdiwG/jDHcQ UCpzBP4RN4e7AxtvC9CN7IsjYepVz7VcIMEV5QnzNx6maAPmKHphPwCfnfoIhkxv9ObAK05US+RiM GUqx5bizmGgokL+BX5Tw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qsPal-009zXM-2E; Mon, 16 Oct 2023 15:33:15 +0000 Received: from mail-dbaeur03on20613.outbound.protection.outlook.com ([2a01:111:f400:fe1a::613] helo=EUR03-DBA-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qsPai-009zVd-0z for linux-i3c@lists.infradead.org; Mon, 16 Oct 2023 15:33:13 +0000 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> 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?q?hzE9PFifwDBpRzJ15Xezk4zAiddL?= =?utf-8?q?irHceZP6ASlN+eghLVVWO6IIkRI5jaItOPJoPVvvCNuhgkrhuXpeZ2tw20Xto7fD2?= =?utf-8?q?AcrrVlyGZaF8oXgz6zO38jI93vIRrtQQuRg97JaSCyZGuUqYew8egcVTEfuXe+vYH?= =?utf-8?q?iXxHHrmKmiaquryKom1bGW0hnY1DSUVii+5R9Lt7zCB+fppiQChHTRmZwaQN7KlGi?= =?utf-8?q?LtZIEdnP+hVovPa7xaKE2ImO8msxrttvIiUKMF48unCimCPRXLUzYqs1vMLrOjv2i?= =?utf-8?q?Q9fU0vmBuDNCOsbiZ5YV4dhkSF6b2sbHCLBabOk7wxO2Kp0+6qDvIFGGkOdyo0lb0?= =?utf-8?q?ZRR3yQgQ47FBQ9dCWOdOBPmzXfUbqik8Ylu3OvwFkEA8aXzMiLyuTaBYKj4qdzDSI?= =?utf-8?q?vHbys+Ay8hDvNIHHAU4R2+ZmqWXAroKSorT4cZjuaJ8qJJ1zZKyKlTqfZj2tA6tqn?= =?utf-8?q?kBJgCIyduFfohEkicH1/314agJ4A1FDwnHJH47g3UsO8zIH1kzdYgy5RS6k+vFFgg?= =?utf-8?q?gob3yxyvl+rLzzG5agpVf/7+qGoeuS5UnyczPO7Tv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NyL+C9EdzftWs4rApfVSqzI?= =?utf-8?q?h7sGvMgTgI2qG2yOAL01SYDAQFsBnrONcMi8Tk5SifGiu08CUK0tHh7E=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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231016_083312_350529_939E3C45 X-CRM114-Status: GOOD ( 10.24 ) X-BeenThere: linux-i3c@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-i3c" Errors-To: linux-i3c-bounces+linux-i3c=archiver.kernel.org@lists.infradead.org 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);