[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240506105451.26e40778@xps-13>
Date: Mon, 6 May 2024 10:54:51 +0200
From: Miquel Raynal <miquel.raynal@...tlin.com>
To: Frank Li <Frank.Li@....com>
Cc: Conor Culhane <conor.culhane@...vaco.com>, Alexandre Belloni
<alexandre.belloni@...tlin.com>, linux-i3c@...ts.infradead.org (moderated
list:SILVACO I3C DUAL-ROLE MASTER), linux-kernel@...r.kernel.org (open
list), imx@...ts.linux.dev
Subject: Re: [PATCH 1/2] i3c: master: svc: change ENXIO to EAGAIN when IBI
occurs during start frame
Hi Frank,
Frank.Li@....com wrote on Wed, 24 Apr 2024 15:00:29 -0400:
> 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.
This changes slightly the user API, but feels legitimate at the same
time. Maybe a comment somewhere in the i3c headers to clarify this
possibility might be welcome?
> Fixes: 5e5e3c92e748 ("i3c: master: svc: fix wrong data return when IBI happen during start frame")
> Signed-off-by: Frank Li <Frank.Li@....com>
> ---
> 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 5ee4db68988e2..a2298ab460a37 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;
> }
Thanks,
Miquèl
Powered by blists - more mailing lists