From patchwork Thu Oct 19 22:27:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 155722 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2010:b0:403:3b70:6f57 with SMTP id fe16csp688198vqb; Thu, 19 Oct 2023 15:28:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG/CjiCoWc577L5Zdrfxa2JC5828QHarlF5jjO1w1jxkk6Tn2V80O9cXsdAkg6VXxEB6mpq X-Received: by 2002:a17:902:facb:b0:1ca:85ae:3b59 with SMTP id ld11-20020a170902facb00b001ca85ae3b59mr289222plb.9.1697754513950; Thu, 19 Oct 2023 15:28:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697754513; cv=pass; d=google.com; s=arc-20160816; b=EO92y02ktCnxR/Lis0+EzCwhVu19GxIQUNper43r2GP0eDQZYTwiW5mr2Su8LRsSEn bVJEsDLB+pelzMWcYogXvl8P8qBykl9B6VDxaRU+yH9hnWeQ5OJbeMZ7zOjV7WV48+HH 3/ykbJdetES5c44f6vvRwE2GGIyz1NodxKGRSIQGgjjzmR/OYmI8E8Tkalei0Y4QwB2A UlAPOO85HJN6WxHXy8F8oV7GUCynI4lvYhducofSfPwndsQssBNHnBgmOldggpT4tTmx X76ZV3QpfU5FBb9AKl1RwlMxdr29DuCGI8LqG5xczpF/FdjBwrb7bV6g83is9MCDJFPc vtjw== 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=B1zxEdHosjsiGCuea9j4jS7nMFZLaSVEQbKLdH8s5qY=; fh=sDe3TG6/b46JEOvF2xh0f1K4oYWCH8cpxTVfh1/w/G8=; b=J5bQa8kBc5ICk9W7/3i6woXCzLofdcRHzw27y8jelSApiF9PQdhcJfL8td9E/NTYpH 98+yTcgWmeaULxfB4w5c1GUGxlvjOerjgkVhVf+5g/W6K2LIUawy9MZyi6OdX+qUyJTx GoxVdm1j/DD+RdykJ59N+IUApE/3s5AoMmuZQyrAhEXJa3w6g97S+Zv3smHk2BJpJQVc DyDTZ9vN51sLUPpGEm97CGZiGT6RRB0dMMBUjaX6PJpb6d6u9y6lJE+ZOk7BYce5lB3O h0cH09ugfaNnh2qrcIlSlhICq7mZKt5s0lj2fjbsLVpDFWS02lH3UbfSowzh2Z2Nzrac 5LNQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=rW9ekDCU; 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.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id w2-20020a1709029a8200b001c3e98a0d79si394870plp.401.2023.10.19.15.28.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 15:28:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=rW9ekDCU; 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.37 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 snail.vger.email (Postfix) with ESMTP id 5FB088274AD9; Thu, 19 Oct 2023 15:28:10 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346672AbjJSW2I (ORCPT + 26 others); Thu, 19 Oct 2023 18:28:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235549AbjJSW2E (ORCPT ); Thu, 19 Oct 2023 18:28:04 -0400 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2089.outbound.protection.outlook.com [40.107.7.89]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53C0ACA for ; Thu, 19 Oct 2023 15:27:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Hi5eWBuv64A0+TjRYvqrpy0xsMI1Fl/Y2L7kAS0scTyLQsCVmJxo0bKAWgoyCUmLAk/DfgrLrrHMVZGaTp5h1goiAV9j0Ww2ylFbjzlwuJnoPnhUs6F8tme8ZC459pVyEcPdswa6YIDsCPa2oD1OVJQzZMbPNjOfkxjZVcxAXbBzZ4hPsDizqcvjKKP9kdFG1T9+E7GtZSsIt2KTKkpdMWsh6tioyIIjxFaqLmETMbe/l7S82aYBDmv1oN+Jyk45M3PN7ChKCi9TDWJMiyYInvG+sY1A9zK8npT1+A5EFNCbfny0WYgvJh3E2nngLjIbK+XBrtVdbHVgEZdK1ifmMA== 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=B1zxEdHosjsiGCuea9j4jS7nMFZLaSVEQbKLdH8s5qY=; b=k0FgBOwIp9recCF7kFOPhS4DlhXVqNo8qZNtPSrRzw1bcT3fhhisuD1niEnu/HD7sKfQO3aJkfFIXpxcU1su4srSjwOTBfRUnkvuX6a/rW0sV9b7cNRbTc5LvsQlIUHv0mvU8eMtapzh3t3S+cvUAaxi47EJhoA/uzHQr/Pg1QUb8Y+CsX/ydHJDOEcfT82Q2a8EsbLGQIvPV3TM1ZTegqV78Y3LKcIvfjjsuZl1sCnmhBciTTKGDW0/8fpEz0/DEHgtHDSsE50Se8Cm+HehEor7wZ99Ivhsld/HJiiNcN81DnH9KzVl8SJjDqMZQ7wFWPKgwIuDJ9LRvEQKt6XpaA== 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=B1zxEdHosjsiGCuea9j4jS7nMFZLaSVEQbKLdH8s5qY=; b=rW9ekDCUyXCpjsr5wK/zMNAyBNMChnKeEvNqTE+DNacDjyOG89Yu9rwys9R2q7RyYpEFxJKh2xBTCVbpCEyFm5I6LEPJF6lfxwioDGcwg1a80q55JkACeQa6PldGxLNkd2UK+pKyFPRQjv0V0ts9btjKeGcJV6MmpvZI6/AT9hY= 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 DBBPR04MB7708.eurprd04.prod.outlook.com (2603:10a6:10:20d::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.10; Thu, 19 Oct 2023 22:27:53 +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; Thu, 19 Oct 2023 22:27:53 +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 v3 5/6] i3c: master: svc: fix SDA keep low when polling IBIWON timeout happen Date: Thu, 19 Oct 2023 18:27:24 -0400 Message-Id: <20231019222725.3598022-6-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231019222725.3598022-1-Frank.Li@nxp.com> References: <20231019222725.3598022-1-Frank.Li@nxp.com> X-ClientProxiedBy: PH7PR17CA0042.namprd17.prod.outlook.com (2603:10b6:510:323::21) To AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6PR04MB4838:EE_|DBBPR04MB7708:EE_ X-MS-Office365-Filtering-Correlation-Id: 27d4e91a-a88c-4151-87ea-08dbd0f2a28c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ikldhn+JIeVUfEJ0BAnRb+HZpVdnCvHN32GGqmTdBelBXJVAfNlFEzbrgG6/P9OSUMtpvH9KwcUaXwny+8mVQ1vYKWCNYujg6BxhBHBsLhS90x3jUM1XUNIXpLsNcC7bT3hc11hS/0i5XjT4jRS+ILTavARC4KjtIiyN+qAa868gYI0AXpFKM8IILHm5wEygLEk7c+N3vWRLJmTlSFcGuQnFHlh0057oAfr9hNdEDHgqRnjPy0toWvdOwMpwIoMZ9Aw+jowb6n9HB63YmdusnoNOayVA2Vj6x2aOVJWuocjj8U8d7aubRTQjf0xZF6dN7hmK50+IhYQIf0zv0XdLOOfJTyKILoUHqqb/UglfxypjCnSbeOK4QHnvkfys5wpCB2WHLCPI7VJiObn4zYMXTY+Lmx6/Hrv2Y3Gz5+CuIlpWKyT6i4i/p1jd/CP3X/MBk/ggA+2b0S82yiSKzeeLk0a4uRQ/wFGRerZeRt16hVKGLMV/SgjrG8fqiB9lPaOVkUufgXDlDJOZEni7osRFrFJpEvWwnxZetKsUIZ/PT/QARPzo/7OWJ6OcDs8TKirQj1HrVStAN4x0wsO/sv8fbLv1MzELFX4LXnlEthPGIczRcx1+xmLe6jRQhji5jbKYccKKu3ptdLZC1jMabQZ0kWGMc+KFfCghWS3Mex6G2rs= 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)(396003)(136003)(366004)(346002)(39860400002)(376002)(230922051799003)(451199024)(1800799009)(186009)(64100799003)(6506007)(83380400001)(6512007)(38100700002)(478600001)(36756003)(66476007)(66556008)(66946007)(316002)(6916009)(86362001)(6486002)(52116002)(2616005)(1076003)(26005)(6666004)(5660300002)(2906002)(41300700001)(8676002)(8936002)(4326008)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ErqE0XaMBw9cFm5QSlr5lTfj3RxFJrAIFQT0kIFac7XnUFOa0caLuQQzaHEpaSqHD3hTs8Q5BCCmPsbStpWGMPelR/mC1Dlh3I1mlOxGXiIGeiM7unWMHJrfWeDGmNSor/f7CVHmWhWGliMSzLnXDP0UegEZDRkojDohb33QI3SgO7IjdhEs73qAPBwXw5KzOXKqUIY/r+1WRvtm7vh94r2nge815V8YDz7s4Wf5HwDFCmYJuz7nuEJTSLbZRHav+DFgVXKwUXNcbIc4ZG759Dsr2HQkmp+6/uniUqhheVlFr533mq3jOiwzwBNfzHS2slRUk3XJtqj3ahUEXvY5i+yXW55L0wA/wwI4pjgLjNfzrECRqjqgoJe7nCEjxT6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w/uBp3iybWWseenOZZnT210+hRAD9PuOckmVPIIMPnYi0+5Cn/JAVxSq8EjzwG+42wTrJ0sDfCB9tt0ikjUMgCSPB40fLFEOxw/JhkeqkLA= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 27d4e91a-a88c-4151-87ea-08dbd0f2a28c X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB4838.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Oct 2023 22:27:53.3572 (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: l4I7Vcp/zs56ZyYrMamEaLGlwx/hv6sxlTJXeX7a7LW0jfvmpsrHknwltANfH4iv4E7GwhiyvD82RMAlQwgchg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7708 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Thu, 19 Oct 2023 15:28:10 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780224637336815983 X-GMAIL-MSGID: 1780224637336815983 Upon IBIWON timeout, the SDA line will always be kept low if we don't emit a stop. Calling svc_i3c_master_emit_stop() there will let the bus return to idle state. Call svc_i3c_master_emit_stop() to let i3c bus come back to idle statue when IBIWON timeout happen. Fixes: dd3c52846d59 ("i3c: master: svc: Add Silvaco I3C master driver") Cc: stable@vger.kernel.org Reviewed-by: Miquel Raynal Signed-off-by: Frank Li --- Notes: Change from v2 to v3 - Update commit message and add review tag Change from v1 to v2 - Update commite message Change from v1 to v2 - Update commite message drivers/i3c/master/svc-i3c-master.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/i3c/master/svc-i3c-master.c b/drivers/i3c/master/svc-i3c-master.c index b113460f059c3..1a57fdebaa26d 100644 --- a/drivers/i3c/master/svc-i3c-master.c +++ b/drivers/i3c/master/svc-i3c-master.c @@ -404,6 +404,7 @@ static void svc_i3c_master_ibi_work(struct work_struct *work) SVC_I3C_MSTATUS_IBIWON(val), 0, 1000); if (ret) { dev_err(master->dev, "Timeout when polling for IBIWON\n"); + svc_i3c_master_emit_stop(master); goto reenable_ibis; }