Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp362633lqh; Tue, 7 May 2024 01:03:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXYnBG7XF1sWJ4NZYLAhWvr1sXm0yR/g1MWEMTTvN/X5mYO7RNlbIL1ABqBkntJrZciMeqz/cnfKWS7oo2lRuvRZcQMNiG1id3G6TMmwQ== X-Google-Smtp-Source: AGHT+IFCCBLVIjGYmfdOn97/bZvb7J5xfRUPtgkwFetbri9vFlJpDno9yc/BA8xBczWTZt+P5zTI X-Received: by 2002:a05:620a:4542:b0:790:f36b:127b with SMTP id u2-20020a05620a454200b00790f36b127bmr16655846qkp.54.1715069019208; Tue, 07 May 2024 01:03:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715069019; cv=pass; d=google.com; s=arc-20160816; b=oh84cCnp2EDcojFT8sXRjRGugDQ56I4/55j8KygbodUlhPGEb7lFHqDsllJhvV/wyk xmqgBrjITA04E18u/C+uFi3XiuVwERwydRWOuGO2VZkMnBEOpC9XLeV5Ic51sNUiD/gA bZYN9+9C0cWLD26/eogFBywxCWYzOP9tUmUdBhIyXZ8yG9HFzLnbRCAzr0fvWNg20oK0 3GttHofrOWUvfv7+nWMbJzKKzwxcsYb9lPY9BIHTLd4+5x2ZAiXbUZArqp9txQ5EYusW inqA2veOoYKpAZJk85cF+cXT5yrIJNtm8pfSrt3VWG26oIviWNqmVmG/YVzyCiP3rTNq B3xw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:organization:references :in-reply-to:message-id:subject:cc:to:from:date:dkim-signature; bh=N1Ei+DgII1ACjLBqbEo7/JpuP+L5JG4dJUUqKjECzuo=; fh=ZwwCWcXvEZbnsjffrOgaxb2NKROPXWYFb3Z62f/zOS8=; b=oBrLiZRXHXmAHV2jd+1XHuoiTvjPBqsBYJy2azpp81Xc2iqSJ0z998Gh0mj6ybE9gd +Y6Jd0jeLBCuMcV1ekud0Kol+FQL40uILO2W/4K6HG+Ecs1i68odO6an63frz0Obls5s aCj92C6RZ1+nlUOtYF2GDBzVAiyxC/qP/j6ge4TwH0SizAzQzpZrLOc5gMhWvnO9qL7u cXxNHve0F+bpCGwHfUZrgUhl4l6a1qMg/OG8zmZXJbaC+KdeZtl2X6HXTznwKXG2AKS4 7q98Kpjbkd6l1SRyYADDjylCoB+LtW05rfhLylDBgO6pjE1WbCB9jSR0iJVp6/wUf4o6 KTOA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=fNwpQ7EC; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-170846-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170846-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id k3-20020a05620a414300b00790f55b734dsi6946956qko.123.2024.05.07.01.03.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 01:03:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-170846-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=fNwpQ7EC; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-170846-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170846-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id EBDC41C23107 for ; Tue, 7 May 2024 08:03:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9237D13C83D; Tue, 7 May 2024 08:03:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="fNwpQ7EC" Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) (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 6BF3013C825 for ; Tue, 7 May 2024 08:03:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715069011; cv=none; b=YEJ7kEkoPsGTej/WZoMuJ2mksfbqIXIiP05yJX7YqNe39vlNRPHhqSKtWYdQUt22LiJZQ97Q/NEsHq+441aTVBDwTv2jNNBDPDevOi36Qans15wewPOAkDSSd94gTxElV0WpD8slQ0tV2Dsrkz1jhmq93W5K5w8tCcGE3k2S1rA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715069011; c=relaxed/simple; bh=vxTK/WdGHBVxGvI38+NcIIAAZ6xtmiWpTx2AFmt1GrU=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=nTGd5IwTuyZyRLl2GQ7t/KJMwWUykAECVVf8ZI9ZhJC+goiSC6tg2+2DcEXeY2+sh/CajTfH1BTjGJ6Sa2MkQ/K/qW032WBZwKfXIOE3MZw975v07f6xzcubiKw9JcyEjOjgJjces60Wc64BCcwwiZxifS+Bpx4XOXjM/alK8ic= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=fNwpQ7EC; arc=none smtp.client-ip=217.70.183.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 852B41BF20A; Tue, 7 May 2024 08:03:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1715069001; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=N1Ei+DgII1ACjLBqbEo7/JpuP+L5JG4dJUUqKjECzuo=; b=fNwpQ7ECmfGij6EkQo/jw3zchLWtOfWIfA6jaF2G2SreFnwdb5UR/Tno9lxKR0sUuRWEQM oefoxxpMBWsmsdIpQmI6QxJJI7UTyFttalD4qWnKxVKcrorbjxQvGKaKJdxeIHAJLUE6O8 reml2ByM5BXQfI7bpYkgIFPny2vYPhVWOUt5IsA4Q74JXjTaT8ar/zGqFbzDVn6c/kOO23 UFcxittD1nWgPPDScwLL04VjLVyPoJpCPqKUNk/mJhJiJ+DNmol2fUzD/FJK9zXIeHidha WMIRWYKthKkM7WvAZzsCBl5sHnEUhruCiebAmpbZP+Nr15gPYnX7QyIL+FYtGw== Date: Tue, 7 May 2024 10:03:19 +0200 From: Miquel Raynal To: Frank Li Cc: alexandre.belloni@bootlin.com, conor.culhane@silvaco.com, imx@lists.linux.dev, linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/3] i3c: Add comment for -EAGAIN in i3c_device_do_priv_xfers() Message-ID: <20240507100319.04d8039f@xps-13> In-Reply-To: <20240506164009.21375-1-Frank.Li@nxp.com> References: <20240506164009.21375-1-Frank.Li@nxp.com> Organization: Bootlin X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: miquel.raynal@bootlin.com Hi Frank, Frank.Li@nxp.com wrote on Mon, 6 May 2024 12:40:07 -0400: > In accordance with I3C spec ver 1.1.1 09-Jun-2021, section: 5.1.2.2.3, if > a target requests hot join (HJ), In-Band Interrupt (IBI), or controller > role request (CRR) during the emission of an I3C address in > i3c_device_do_priv_xfers(), the target may win bus arbitration. In such > cases, it is imperative to notify the I3C client driver and retry > i3c_device_do_priv_xfers() after some delay. >=20 > Signed-off-by: Frank Li > --- >=20 > Notes: > Change from v1 to v2 > - new patch >=20 > drivers/i3c/device.c | 4 ++++ > 1 file changed, 4 insertions(+) >=20 > diff --git a/drivers/i3c/device.c b/drivers/i3c/device.c > index 1a6a8703dbc3a..b04a55a1337d4 100644 > --- a/drivers/i3c/device.c > +++ b/drivers/i3c/device.c > @@ -27,6 +27,10 @@ > * This function can sleep and thus cannot be called in atomic context. > * > * Return: 0 in case of success, a negative error core otherwise. > + * -EAGAIN: controller lost address arbitration. Target > + * (IBI, HJ or controller role request) win the bus. Client > + * driver need resend this 'xfers' some time later. needs to resend the 'xfers' > + * See I3C spec ver 1.1.1 09-Jun-2021. Section: 5.1.2.2.3. > */ > int i3c_device_do_priv_xfers(struct i3c_device *dev, > struct i3c_priv_xfer *xfers, With this little nit, Reviewed-by: Miquel Raynal Thanks, Miqu=C3=A8l