Linux-i3c Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Sam Agazaryan" <samagazaryan@google.com>, linux-i3c@lists.infradead.org
Cc: Frank.Li@kernel.org, "Alexandre Belloni" <alexandre.belloni@bootlin.com>
Subject: Re: [PATCH v2 3/4] i3c: master: Drain IBI slot pool before freeing
Date: Sat, 05 Dec 2026 07:17:16 +0000	[thread overview]
Message-ID: <sashiko-outbox-251216@kernel.org> (raw)
In-Reply-To: <20261205065552.2594113-4-samagazaryan@google.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] i3c: master: recycle_ibi_slot remains mandatory in
  i3c_master_check_ops()
--

commit afb42a0e8e9b2c8251676d99ee5df7324a2b1534
Author: Sam Agazaryan <samagazaryan@google.com>

i3c: master: Drain IBI slot pool before freeing

This commit tracks in-use generic IBI slots so i3c_generic_ibi_free_pool()
cancels unstarted IBI work and defers freeing the pool until the last slot
is returned.  i3c_master_handle_ibi() now recycles slots directly to their
pool instead of calling the controller's recycle_ibi_slot callback.

> diff --git a/include/linux/i3c/master.h b/include/linux/i3c/master.h
> index b04fdadbbe693..f0b8fe89a3cc8 100644
> --- a/include/linux/i3c/master.h
> +++ b/include/linux/i3c/master.h

[ ... ]

> @@ -467,10 +468,9 @@ struct i3c_bus {
>   *		 flag set and then deactivate the hardware IRQ on the
>   *		 controller end.
>   *		 This method is mandatory only if ->request_ibi is not NULL.
> - * @recycle_ibi_slot: recycle an IBI slot. Called every time an IBI has been
> - *		      processed by its handler. The IBI slot should be put back
> - *		      in the IBI slot pool so that the controller can re-use it
> - *		      for a future IBI
> + * @recycle_ibi_slot: recycle an IBI slot. The core no longer calls this: it
> + *		      returns IBI slots to their generic pool itself once the
> + *		      IBI handler has run.
>   *		      This method is mandatory only if ->request_ibi is not
>   *		      NULL.
>   * @enable_hotjoin: enable hot join event detect.

[Severity: Low]
Should recycle_ibi_slot still be mandatory when request_ibi is set?

i3c_master_check_ops() still returns -EINVAL if ops->request_ibi is set
without ops->recycle_ibi_slot, forcing new controller drivers to define a
dead callback.  i3c_dev_recycle_ibi_slot_controller() already checks for
a non-NULL callback, so this check and doc requirement can be dropped.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261205065552.2594113-1-samagazaryan@google.com?part=3

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

  reply	other threads:[~2026-12-05  7:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-05  6:55 [PATCH v2 0/4] i3c: master: Fix IBI teardown when DAA re-adds a device Sam Agazaryan
2026-12-05  6:55 ` [PATCH v2 1/4] i3c: dw: Fix IBI slot leak on oversized payload Sam Agazaryan
2026-12-05  7:06   ` sashiko-bot
2026-12-05  6:55 ` [PATCH v2 2/4] i3c: master: Move generic IBI pool definitions Sam Agazaryan
2026-12-05  6:55 ` [PATCH v2 3/4] i3c: master: Drain IBI slot pool before freeing Sam Agazaryan
2026-12-05  7:17   ` sashiko-bot [this message]
2026-12-05  6:55 ` [PATCH v2 4/4] i3c: master: Preserve IBI workqueue across DAA Sam Agazaryan

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=sashiko-outbox-251216@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=Frank.Li@kernel.org \
    --cc=alexandre.belloni@bootlin.com \
    --cc=linux-i3c@lists.infradead.org \
    --cc=samagazaryan@google.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox