mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Frank Li <Frank.Li@oss.nxp.com>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: alexandre.belloni@bootlin.com, Frank.Li@nxp.com,
	linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH V2 2/7] i3c: mipi-i3c-hci: Ignore DISEC failures when disabling IBIs
Date: Mon, 8 Jun 2026 13:33:06 -0400	[thread overview]
Message-ID: <aib80opvhKCILTKr@lizhi-Precision-Tower-5810> (raw)
In-Reply-To: <20260608075801.16111-3-adrian.hunter@intel.com>

On Mon, Jun 08, 2026 at 10:57:55AM +0300, Adrian Hunter wrote:
> Disabling IBIs currently returns the result of the DISEC CCC, causing
> i3c_hci_disable_ibi() to fail if the transfer errors out.
>
> However, the controller has already been programmed to reject IBIs by
> setting DAT_0_SIR_REJECT, so the target’s IBIs are effectively disabled
> from the host side regardless of the outcome of the DISEC command.  At
> this point, teardown of the IBI infrastructure can safely proceed even
> if DISEC fails.
>
> Note, from then on, the MIPI I3C HCI not only NACKs the target's IBI but
> automatically sends another DISEC command.
>
> Make i3c_hci_disable_ibi() resilient by ignoring the return value of
> i3c_master_disec_locked() and always returning success.
>
> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
> ---

Reviewed-by: Frank Li <Frank.Li@nxp.com>

>
>
> Changes in V2:
>
> 	Re-base due to changes in previous patch.
>
>
>  drivers/i3c/master/mipi-i3c-hci/core.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/i3c/master/mipi-i3c-hci/core.c b/drivers/i3c/master/mipi-i3c-hci/core.c
> index 1e1f05aff092..fffbc1775ef9 100644
> --- a/drivers/i3c/master/mipi-i3c-hci/core.c
> +++ b/drivers/i3c/master/mipi-i3c-hci/core.c
> @@ -697,7 +697,13 @@ static int i3c_hci_disable_ibi(struct i3c_dev_desc *dev)
>  	struct i3c_hci *hci = to_i3c_hci(m);
>
>  	__i3c_hci_disable_ibi(hci, dev);
> -	return i3c_master_disec_locked(m, dev->info.dyn_addr, I3C_CCC_EVENT_SIR);
> +	/*
> +	 * The DAT entry is now set to NACK and DISEC this target's IBIs, so
> +	 * the IBI teardown can proceed even if DISEC below fails, so ignore
> +	 * errors.
> +	 */
> +	i3c_master_disec_locked(m, dev->info.dyn_addr, I3C_CCC_EVENT_SIR);
> +	return 0;
>  }
>
>  static void i3c_hci_recycle_ibi_slot(struct i3c_dev_desc *dev,
> --
> 2.51.0
>

  reply	other threads:[~2026-06-08 17:33 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-08  7:57 [PATCH V2 0/7] i3c: Fix IBI race, address handling, and reconcile DAA Adrian Hunter
2026-06-08  7:57 ` [PATCH V2 1/7] i3c: mipi-i3c-hci: Fix race in i3c_hci_addr_to_dev() Adrian Hunter
2026-06-08 17:31   ` Frank Li
2026-06-08  7:57 ` [PATCH V2 2/7] i3c: mipi-i3c-hci: Ignore DISEC failures when disabling IBIs Adrian Hunter
2026-06-08 17:33   ` Frank Li [this message]
2026-06-08  7:57 ` [PATCH V2 3/7] i3c: master: Prevent reuse of dynamic address on device add failure Adrian Hunter
2026-06-08 17:45   ` Frank Li
2026-06-09  7:02     ` Adrian Hunter
2026-06-08  7:57 ` [PATCH V2 4/7] i3c: mipi-i3c-hci: Tolerate i3c_master_add_i3c_dev_locked() failures in DAA Adrian Hunter
2026-06-08 17:48   ` Frank Li
2026-06-08  7:57 ` [PATCH V2 5/7] i3c: master: Make i3c_master_add_i3c_dev_locked() return void Adrian Hunter
2026-06-08 17:51   ` Frank Li
2026-06-08  7:57 ` [PATCH V2 6/7] i3c: master: Move DAA API functions after i3c_master_add_i3c_dev_locked() Adrian Hunter
2026-06-08 17:52   ` Frank Li
2026-06-08  7:58 ` [PATCH V2 7/7] i3c: master: Reconcile dynamic addresses after DAA Adrian Hunter
2026-06-08 18:06   ` Frank Li
2026-06-09  9:23     ` Adrian Hunter
2026-06-09 14:20       ` Frank Li

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=aib80opvhKCILTKr@lizhi-Precision-Tower-5810 \
    --to=frank.li@oss.nxp.com \
    --cc=Frank.Li@nxp.com \
    --cc=adrian.hunter@intel.com \
    --cc=alexandre.belloni@bootlin.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®