All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Frank Li <Frank.Li@nxp.com>
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()
Date: Tue, 7 May 2024 10:03:19 +0200	[thread overview]
Message-ID: <20240507100319.04d8039f@xps-13> (raw)
In-Reply-To: <20240506164009.21375-1-Frank.Li@nxp.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.
> 
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> ---
> 
> Notes:
>     Change from v1 to v2
>     - new patch
> 
>  drivers/i3c/device.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> 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 <miquel.raynal@bootlin.com>


Thanks,
Miquèl

WARNING: multiple messages have this Message-ID (diff)
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Frank Li <Frank.Li@nxp.com>
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()
Date: Tue, 7 May 2024 10:03:19 +0200	[thread overview]
Message-ID: <20240507100319.04d8039f@xps-13> (raw)
In-Reply-To: <20240506164009.21375-1-Frank.Li@nxp.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.
> 
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> ---
> 
> Notes:
>     Change from v1 to v2
>     - new patch
> 
>  drivers/i3c/device.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> 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 <miquel.raynal@bootlin.com>


Thanks,
Miquèl

-- 
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c

  parent reply	other threads:[~2024-05-07  8:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-06 16:40 [PATCH v2 1/3] i3c: Add comment for -EAGAIN in i3c_device_do_priv_xfers() Frank Li
2024-05-06 16:40 ` Frank Li
2024-05-06 16:40 ` [PATCH v2 2/3] i3c: master: svc: change ENXIO to EAGAIN when IBI occurs during start frame Frank Li
2024-05-06 16:40   ` Frank Li
2024-05-07  8:03   ` Miquel Raynal
2024-05-07  8:03     ` Miquel Raynal
2024-05-06 16:40 ` [PATCH v2 3/3] i3c: master: svc: fix invalidate IBI type and miss call client IBI handler Frank Li
2024-05-06 16:40   ` Frank Li
2024-05-07  8:04   ` Miquel Raynal
2024-05-07  8:04     ` Miquel Raynal
2024-05-07  8:03 ` Miquel Raynal [this message]
2024-05-07  8:03   ` [PATCH v2 1/3] i3c: Add comment for -EAGAIN in i3c_device_do_priv_xfers() Miquel Raynal
2024-05-07 20:27 ` Alexandre Belloni
2024-05-07 20:27   ` Alexandre Belloni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240507100319.04d8039f@xps-13 \
    --to=miquel.raynal@bootlin.com \
    --cc=Frank.Li@nxp.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=conor.culhane@silvaco.com \
    --cc=imx@lists.linux.dev \
    --cc=linux-i3c@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.