Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Abdurrahman Hussain" <abdurrahman@nexthop.ai>
To: "Andi Shyti" <andi.shyti@kernel.org>,
	"Abdurrahman Hussain" <abdurrahman@nexthop.ai>
Cc: "Michal Simek" <michal.simek@amd.com>,
	"Wolfram Sang" <wsa+renesas@sang-engineering.com>,
	"Raviteja Narayanam" <raviteja.narayanam@xilinx.com>,
	"Wolfram Sang" <wsa@kernel.org>,
	"Manikanta Guntupalli" <manikanta.guntupalli@amd.com>,
	"Shubhrajyoti Datta" <shubhrajyoti.datta@amd.com>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-i2c@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<stable@vger.kernel.org>
Subject: Re: [PATCH v5 1/3] i2c: xiic: preserve PEC byte length in SMBus block read setup
Date: Wed, 23 Sep 2026 18:44:21 -0700	[thread overview]
Message-ID: <DLN5ZQ7GWNQU.3S23BUADOK8M@nexthop.ai> (raw)
In-Reply-To: <arPW6xckt7QMpt7C@zenone.zhora.eu>

On Wed Sep 23, 2026 at 11:04 AM PDT, Andi Shyti wrote:
>> +			/*
>> +			 * Undo the setup-time padding before rx_msg is cleared,
>> +			 * so the PEC check sees the right byte.
>> +			 */
>> +			if (i2c->rx_msg && i2c->smbus_actual_len)
>> +				i2c->rx_msg->len = i2c->smbus_actual_len;
>
> I think this restore needs to go also in xiic_recv_atomic.
>
> Andi
>

Yes. I2C_M_RECV_LEN forces standard mode for the whole transfer, so an
atomic block read hits the same padded branch and then completes in
xiic_recv_atomic() without the trim.

v6 pulls the trim into a xiic_smbus_trim_len() helper and calls it from
both sites that clear rx_msg. Patches 2 and 3 unchanged.

Abdurrahman


  reply	other threads:[~2026-09-24  1:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-21 18:25 [PATCH v5 0/3] i2c: xiic: fix SMBus block read and PEC support Abdurrahman Hussain
2026-09-21 18:25 ` [PATCH v5 1/3] i2c: xiic: preserve PEC byte length in SMBus block read setup Abdurrahman Hussain
2026-09-23 18:04   ` Andi Shyti
2026-09-24  1:44     ` Abdurrahman Hussain [this message]
2026-09-21 18:25 ` [PATCH v5 2/3] i2c: xiic: defer RX_FULL until all trailing bytes are in FIFO Abdurrahman Hussain
2026-09-21 18:25 ` [PATCH v5 3/3] i2c: xiic: don't clobber msg->len to signal block-read completion Abdurrahman Hussain

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=DLN5ZQ7GWNQU.3S23BUADOK8M@nexthop.ai \
    --to=abdurrahman@nexthop.ai \
    --cc=andi.shyti@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manikanta.guntupalli@amd.com \
    --cc=michal.simek@amd.com \
    --cc=raviteja.narayanam@xilinx.com \
    --cc=shubhrajyoti.datta@amd.com \
    --cc=stable@vger.kernel.org \
    --cc=wsa+renesas@sang-engineering.com \
    --cc=wsa@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