Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp11100lqh; Mon, 6 May 2024 09:41:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU8wJ8a/kmlrFTBtlR0T0u+SQWpkSuIEJcdIBAr7G7bwysS1yvVzYO0FYly5ecY15NI4qpd/UdvfM7u/WA9mODZfFY8j7gQT182XBfrAg== X-Google-Smtp-Source: AGHT+IFBxYt3DSWncrCIab1b+JVylRdn1wYyQ6IY53YccFzR8LqvotyMPmgYDdqv7S1FbCpoYblC X-Received: by 2002:a05:6a21:3a82:b0:1af:9633:b8a1 with SMTP id zv2-20020a056a213a8200b001af9633b8a1mr9597304pzb.47.1715013659891; Mon, 06 May 2024 09:40:59 -0700 (PDT) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d3-20020a63ed03000000b005fd8cc7489esi8581021pgi.875.2024.05.06.09.40.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 09:40:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-170184-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=aMOuE3eL; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-170184-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170184-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 6FEA3283E11 for ; Mon, 6 May 2024 16:40:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E6474156F54; Mon, 6 May 2024 16:40:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="aMOuE3eL" Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2057.outbound.protection.outlook.com [40.107.6.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CB12B1E4A6 for ; Mon, 6 May 2024 16:40:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.6.57 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715013634; cv=fail; b=DX4tk+7y1qenI6vh8/ZSYGTKMF/FNZ3GdxiA17RHTEJfLJJOE2xOfZXqEXSWUNDfDzIm+1+NBTW4ddJB2zGQ1IvxJOlcwTIPGPl9ZdFbJoX+PLn+VKdl/hDPwEEY/fXxDbHyMZBUYroJXtaX8icSW2LLSrpHsCtNoxgjv8RfjU8= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715013634; c=relaxed/simple; bh=Bz7J9sHFqnldrqDjmFpaZPmFPCbeJg1rdyukwLTo1Hg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=BObgOi7wI5UYsGTRUq566lK/zDpaswDrTdOfKMqZkhzaxE9tWZNC2rdVPFkwOyZjiPE4uwtabnhFbE8V4LcemmX9g/T6jDXdqgo8zXtjTlV1sgHDhDy6VA2kiAi3MlFROSysBDMplY/YmpZaju3j7nWhFjGTNavIl1/q7udrLAw= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=aMOuE3eL; arc=fail smtp.client-ip=40.107.6.57 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KPRbGu+2PLXIbo+b+afT92opVe0JhYE7dsM8ZxVfo9e9NlDxusWpM/3lLw/PTTSrEgatQGUdDklaK7RWE+AdoBaA4lL4vswAlrcdKmajKO9RXKjj5D2XG/aWwm0r7D2QpcEXtYmhCQqnAqyN8oZ8+8guQvZ6J6fhgvHAwpD8laPdnvbJOa3YNwdq+AHpiLjXhXHHxiXZLBlfF/MnHGmZkVBn6ozkYmWX0Yz8mnxJuRJ1px5ZDbgdhlLslBEaXz10o52XLtuUPtQuQdQnkTNJIPm/oxwBUpYz+F3SeU22HSocS53kUhMZ0d1eYq0kBj7ZphuXdTF90qD5ZR5zFV71xA== 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=RZa3Ui22bl0O+Rohjhbh5GVtdNA8CI3VASFPs59f3Xs=; b=DMcBMOt7T9AwXerGTR+yQekyOdXGehLgYFKyQBtxYiiEIffUfrV9+aaiyFpB7fHK25MTnx6itOoyQXzqoY78o/40bHZPqQ4pIhpzc78aAhp2ILjZRhA6STXK07N4HSDkxB2c9bgCc8ZFP1IA5E9POaLve6+g0S4Nq0f5VOVjbU++4EbR+Ze8kvDV088BwQMl3t0rcuFhLn6h08ATwiOVeVeL03MOalMtY0k1cfO4XxSSFdrWZL2gnX1M6wOgz5RGJnkijk4gnwWnm3XFQAY3NZeeEQPp+KThuyNavOUMe5VIzqfxnZMUDSavwrp1hgF/aubgdiEYwmKkHUfvyV8RTA== 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=RZa3Ui22bl0O+Rohjhbh5GVtdNA8CI3VASFPs59f3Xs=; b=aMOuE3eLtkFy6iRLqP6IHrpoYILrz3mV5ff66uK1V1ertfaf0HZ+v+iPlv5KkJaqe7TGEKz3mh0Gr1pjesfVK+GmYiyY7FAc8lWq520oj/L7RrkKcBubsiuvvBMDkC7yuV+nOHT2IUpqMPLLS25e+Lm/QjAoDxD2vpnRx9tVT2I= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by DU2PR04MB9049.eurprd04.prod.outlook.com (2603:10a6:10:2e4::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.41; Mon, 6 May 2024 16:40:28 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::1e67:dfc9:d0c1:fe58]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::1e67:dfc9:d0c1:fe58%7]) with mapi id 15.20.7544.039; Mon, 6 May 2024 16:40:28 +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, linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/3] i3c: master: svc: change ENXIO to EAGAIN when IBI occurs during start frame Date: Mon, 6 May 2024 12:40:08 -0400 Message-Id: <20240506164009.21375-2-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240506164009.21375-1-Frank.Li@nxp.com> References: <20240506164009.21375-1-Frank.Li@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SJ0PR03CA0296.namprd03.prod.outlook.com (2603:10b6:a03:39e::31) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|DU2PR04MB9049:EE_ X-MS-Office365-Filtering-Correlation-Id: 2ca8e3ef-70fb-45ca-4c32-08dc6deb3cbe X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|52116005|376005|366007|38350700005; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?caXBGyI0hsfDtUD08pnPfAfozW94zQnHmy7012Fs5n4AHkqeQcTgjkBxB7oi?= =?us-ascii?Q?+NnM6A8QAhkSxOGVs/ydYFkwAT/ZyS9+rIFj54g9AfbhunaXp8QXaDWhvNDV?= =?us-ascii?Q?5Jw5UG1U6u1xEJkUqYEtPcH3OMvcG+d1p6mpmDjEBN36PI7BY8P5j83GhKRV?= =?us-ascii?Q?iCwA3TW4GxfHlgFykHvEqr5P+deXysrhZ3kyILIzr0JwFBS5NWecytnvfa/Y?= =?us-ascii?Q?oyeTiz7eucGqRzZxH2UMDnOkSl84Qoi+b36IDDVThA4oQa2m3XjzaaCQrk31?= =?us-ascii?Q?BrxfJvV3tRxpgk5wwB6RpijQxxb/pV9IwBkwRSlfbrNfnTT4BIB1tzJ4TfkG?= =?us-ascii?Q?M0eT4mOe1+APT5opbVmYkjw/Z8/tao0neJLt5GsB5kKvZKYjjaIJs7anGipr?= =?us-ascii?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o8/mvGD5lMDYSl7w7Yy?= =?us-ascii?Q?1k4VCkuf6qDqSyXNakPF645SCsfob8kyok5LM+EsUToapQ=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(52116005)(376005)(366007)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?+5w89qb59irigpgcgafwVjYHSsS1CMp6BayCPQumfBt5Dc1crZsUj0oS15uj?= =?us-ascii?Q?fKKxLHL1J+RoydlcP7PiDzEghi7Up1kMKQTPrn2lxrpMkO9kCciMmIu/YujM?= =?us-ascii?Q?aR4ZLHG6xiZXKKPKCDBgDV0zdbXivCOmpblK1X441hipX/w71pCnob44a3na?= =?us-ascii?Q?WcGLMnVeTIOQmQJnaAGuDCAk8gGKldlD8FhP6vBsFbMq32Wd8NhgGdc+ky0F?= =?us-ascii?Q?a2Zvn/DAV4evKYJGIVVkMIyXaErbz5P65L+I3tpt7GJ3iQElL+0PCFNc02bk?= =?us-ascii?Q?H26VITQdm2pIV0zlLlDBPZ4DkUUWE688aDL+MJX/9UCbt1jFoCipePJZp7gr?= =?us-ascii?Q?mnA8VR2Y84LQ2yaPIOnLZyy50KmmmjnUcPg4Oze3MwDArYT1NEamCrYFSzTR?= =?us-ascii?Q?Z6aGZ6vXtVgnTpeZTOhdRbUM6jtpIftHIXBFdLKtokYKH2EfuQgVMD2ShMpo?= =?us-ascii?Q?0umEXaqO2SeKETQqs4GDrfVa+IqZyHEHAPcp3T5yEp9kdTphvkRhi41f0TK2?= =?us-ascii?Q?YCaDNqJUwKh68JisPb/DeA/pdP5ecREIJM/OTWWcOMRWpd6fGcVkUMB3UvIB?= =?us-ascii?Q?Qmftkd9O+Gx2Fo9YMUVyrhN+z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us-ascii?Q?CVyyOokxZE3y18hH1K9Z7sdt0OkBJBm1JhhigzfsH3zTnra7PlGlnhKRFiaK?= =?us-ascii?Q?VpwV4vy6fMNGl1JmxEs=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2ca8e3ef-70fb-45ca-4c32-08dc6deb3cbe X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2024 16:40:28.6499 (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: ONRGNs81xPviuHXw2IOpy3vjszL1+nsQAHD0kErRpCAskRE0FasWl9RGM/VU5ed8NHp0C/5TMAKoT9szWoGyww== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB9049 svc_i3c_master_xfer() returns error ENXIO if an In-Band Interrupt (IBI) occurs when the host starts the frame. Change error code to EAGAIN to inform the client driver that this situation has occurred and to try again sometime later. Fixes: 5e5e3c92e748 ("i3c: master: svc: fix wrong data return when IBI happen during start frame") Signed-off-by: Frank Li --- Notes: change from v1 to v2 - none drivers/i3c/master/svc-i3c-master.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i3c/master/svc-i3c-master.c b/drivers/i3c/master/svc-i3c-master.c index fd8de54b13667..94e4954509558 100644 --- a/drivers/i3c/master/svc-i3c-master.c +++ b/drivers/i3c/master/svc-i3c-master.c @@ -1080,7 +1080,7 @@ static int svc_i3c_master_xfer(struct svc_i3c_master *master, * and yield the above events handler. */ if (SVC_I3C_MSTATUS_IBIWON(reg)) { - ret = -ENXIO; + ret = -EAGAIN; *actual_len = 0; goto emit_stop; } -- 2.34.1