* [PATCH 1/1] i3c: master: svc: fix IBIWON not set if IBI follow a hot join
@ 2024-05-31 15:43 Frank Li
2024-06-03 13:49 ` Miquel Raynal
0 siblings, 1 reply; 2+ messages in thread
From: Frank Li @ 2024-05-31 15:43 UTC (permalink / raw)
To: Miquel Raynal, Conor Culhane, Alexandre Belloni,
moderated list:SILVACO I3C DUAL-ROLE MASTER, open list
Cc: imx
When an In-Band Interrupt(IBI) occurs after svc_i3c_master_do_daa_locked(),
typically triggered during a Hot Join (HJ) event, the IBIWON flag fails to
be set when issuing an auto IBI command.
The issue stems from the omission of emitting STOP upon successful
execution of svc_i3c_master_do_daa_locked(). Consequently, the controller
interprets it as a repeat start when emitting the auto IBI command. Per the
I3C specification, an IBI should never occur during a repeat start, thus
preventing the IBIWON flag from being set.
Emit STOP regardless of the success or failure of
svc_i3c_master_do_daa_locked() to match I3C spec requirement.
Cc: <stable@vger.kernel.org>
Fixes: dd3c52846d59 ("i3c: master: svc: Add Silvaco I3C master driver")
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
Notes:
Change from v1 to v2
- new patch
drivers/i3c/master/svc-i3c-master.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/i3c/master/svc-i3c-master.c b/drivers/i3c/master/svc-i3c-master.c
index bb299ce02cccb..032fe032ec433 100644
--- a/drivers/i3c/master/svc-i3c-master.c
+++ b/drivers/i3c/master/svc-i3c-master.c
@@ -961,11 +961,11 @@ static int svc_i3c_master_do_daa(struct i3c_master_controller *m)
spin_lock_irqsave(&master->xferqueue.lock, flags);
ret = svc_i3c_master_do_daa_locked(master, addrs, &dev_nb);
spin_unlock_irqrestore(&master->xferqueue.lock, flags);
- if (ret) {
- svc_i3c_master_emit_stop(master);
- svc_i3c_master_clear_merrwarn(master);
+
+ svc_i3c_master_emit_stop(master);
+ svc_i3c_master_clear_merrwarn(master);
+ if (ret)
goto rpm_out;
- }
/* Register all devices who participated to the core */
for (i = 0; i < dev_nb; i++) {
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] i3c: master: svc: fix IBIWON not set if IBI follow a hot join
2024-05-31 15:43 [PATCH 1/1] i3c: master: svc: fix IBIWON not set if IBI follow a hot join Frank Li
@ 2024-06-03 13:49 ` Miquel Raynal
0 siblings, 0 replies; 2+ messages in thread
From: Miquel Raynal @ 2024-06-03 13:49 UTC (permalink / raw)
To: Frank Li
Cc: Conor Culhane, Alexandre Belloni,
moderated list:SILVACO I3C DUAL-ROLE MASTER, open list, imx
Hi Frank,
Frank.Li@nxp.com wrote on Fri, 31 May 2024 11:43:08 -0400:
> When an In-Band Interrupt(IBI) occurs after svc_i3c_master_do_daa_locked(),
> typically triggered during a Hot Join (HJ) event, the IBIWON flag fails to
> be set when issuing an auto IBI command.
>
> The issue stems from the omission of emitting STOP upon successful
> execution of svc_i3c_master_do_daa_locked(). Consequently, the controller
> interprets it as a repeat start when emitting the auto IBI command. Per the
> I3C specification, an IBI should never occur during a repeat start, thus
> preventing the IBIWON flag from being set.
>
> Emit STOP regardless of the success or failure of
> svc_i3c_master_do_daa_locked() to match I3C spec requirement.
>
> Cc: <stable@vger.kernel.org>
> Fixes: dd3c52846d59 ("i3c: master: svc: Add Silvaco I3C master driver")
There was no hot-join support in this commit. You can probably use
instead:
Fixes: 05b26c31a485 ("i3c: master: svc: add hot join support")
Thanks,
Miquèl
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-06-03 13:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-31 15:43 [PATCH 1/1] i3c: master: svc: fix IBIWON not set if IBI follow a hot join Frank Li
2024-06-03 13:49 ` Miquel Raynal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox