public inbox for linux-i3c@lists.infradead.org
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Jorge Marques <gastmaier@gmail.com>
Cc: "Jorge Marques" <jorge.marques@analog.com>,
	"Alexandre Belloni" <alexandre.belloni@bootlin.com>,
	"Frank Li" <Frank.Li@nxp.com>,
	"Przemysław Gaj" <pgaj@cadence.com>,
	linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org,
	"Dan Carpenter" <dan.carpenter@linaro.org>,
	"Jonathan Cameron" <jic23@kernel.org>
Subject: Re: [PATCH 1/5] i3c: master: Move rstdaa error suppression
Date: Tue, 10 Mar 2026 21:13:19 +0200	[thread overview]
Message-ID: <c1547277-e83a-4eca-86ff-88974e6c5ddd@intel.com> (raw)
In-Reply-To: <c3lyva3q6yqbeoa4vzmxx2mhnffahpzljcm2cntppenkmntisg@fniqac3weif6>

On 10/03/2026 10:05, Jorge Marques wrote:
> On Mon, Mar 09, 2026 at 02:34:58PM +0200, Adrian Hunter wrote:
>> On 09/03/2026 14:17, Jorge Marques wrote:
>>> On Mon, Mar 09, 2026 at 01:39:36PM +0200, Adrian Hunter wrote:
>>>> On 08/03/2026 18:47, Jorge Marques wrote:
>>>>> --- a/drivers/i3c/master.c
>>>>> +++ b/drivers/i3c/master.c
>>>>> @@ -1016,6 +1016,10 @@ static int i3c_master_rstdaa_locked(struct i3c_master_controller *master,
>>>>>  	ret = i3c_master_send_ccc_cmd_locked(master, &cmd);
>>>>>  	i3c_ccc_cmd_dest_cleanup(&dest);
>>>>>  
>>>>> +	/* No active devices on the bus. */
>>>>> +	if (ret && cmd.err == I3C_ERROR_M2)
>>>>> +		ret = 0;
>>>>> +
>>>>>  	return ret;
>>>>>  }
>>>>>  
>>>>> @@ -1785,7 +1789,6 @@ i3c_master_register_new_i3c_devs(struct i3c_master_controller *master)
>>>>>   */
>>>>>  int i3c_master_do_daa_ext(struct i3c_master_controller *master, bool rstdaa)
>>>>>  {
>>>>> -	int rstret = 0;
>>>>>  	int ret;
>>>>>  
>>>>>  	ret = i3c_master_rpm_get(master);
>>>>> @@ -1795,9 +1798,9 @@ int i3c_master_do_daa_ext(struct i3c_master_controller *master, bool rstdaa)
>>>>>  	i3c_bus_maintenance_lock(&master->bus);
>>>>>  
>>>>>  	if (rstdaa) {
>>>>> -		rstret = i3c_master_rstdaa_locked(master, I3C_BROADCAST_ADDR);
>>>>> -		if (rstret == I3C_ERROR_M2)
>>>>> -			rstret = 0;
>>>>> +		ret = i3c_master_rstdaa_locked(master, I3C_BROADCAST_ADDR);
>>>>> +		if (ret)
>>>>> +			goto out;
>>>>
>>>> This is an unrelated change.  The original intention was to perform
>>>> DAA even if RSTDAA fails.  If you really want this, it needs to be
>>>> a separate patch with separate justification.
>>>>
>>>>>  	}
>>> Hi Adrian, handling I3C_ERROR_M2 is unchanged.
>>>
>>> The intention is to perform the DAA if the RSTDAA fail due to a
>>> I3C_ERROR_M2, this behaviour is unchanged,
>> No, the intention was as the code is written.  DAA is done
>> irrespective of whether RSTDAA fails.  The behaviour has changed:
>> before it always does DAA, after it does not always.
>>
> 
> Hi Adrian, you are right, the og behaviour is to continue on any error.
> v2 will bring the rstret back, thanks for pointing out! For context, did
> you experience peripherals/controllers that failed with
> err != I3C_ERROR_M2 on RSTDAA? Would be nice to map at least one
> non-spec-conforming case.

DAA is being used to ensure devices that lost power in suspend
have a DAA assigned.

RSTDAA is used also in the case of hibernation because the hibernation
boot, suspend, restore, may have left the device with the wrong DAA.

So the two are not directly related.


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

  reply	other threads:[~2026-03-10 19:13 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-08 16:47 [PATCH 0/5] Fix paths unexpectedly returning Mx error codes Jorge Marques
2026-03-08 16:47 ` [PATCH 1/5] i3c: master: Move rstdaa error suppression Jorge Marques
2026-03-09 11:39   ` Adrian Hunter
2026-03-09 12:17     ` Jorge Marques
2026-03-09 12:34       ` Adrian Hunter
2026-03-10  8:05         ` Jorge Marques
2026-03-10 19:13           ` Adrian Hunter [this message]
2026-03-10 19:13   ` Adrian Hunter
2026-03-08 16:47 ` [PATCH 2/5] i3c: master: Move entdaa " Jorge Marques
2026-03-10 19:13   ` Adrian Hunter
2026-03-08 16:47 ` [PATCH 3/5] i3c: master: Move bus_init " Jorge Marques
2026-03-10 19:14   ` Adrian Hunter
2026-03-08 16:47 ` [PATCH 4/5] i3c: master: Negative error codes at send_ccc_cmd Jorge Marques
2026-03-10 19:14   ` Adrian Hunter
2026-03-08 16:47 ` [PATCH 5/5] i3c: master: adi: Return xfer->ret at send CCC Jorge Marques
2026-03-10 19:15   ` Adrian Hunter
2026-03-12 15:50     ` Jorge Marques

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=c1547277-e83a-4eca-86ff-88974e6c5ddd@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=Frank.Li@nxp.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=dan.carpenter@linaro.org \
    --cc=gastmaier@gmail.com \
    --cc=jic23@kernel.org \
    --cc=jorge.marques@analog.com \
    --cc=linux-i3c@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pgaj@cadence.com \
    /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