From: Andi Shyti <andi.shyti@kernel.org>
To: Abdurrahman Hussain <abdurrahman@nexthop.ai>
Cc: Michal Simek <michal.simek@amd.com>,
Wolfram Sang <wsa+renesas@sang-engineering.com>,
Shubhrajyoti Datta <shubhrajyoti.datta@amd.com>,
linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 1/3] i2c: xiic: preserve PEC byte length in SMBus block read setup
Date: Mon, 21 Sep 2026 10:43:32 +0200 [thread overview]
Message-ID: <arDgdyG0QsNerDH5@zenone.zhora.eu> (raw)
In-Reply-To: <20260909-i2c-xiic-v4-1-218df31e9d3b@nexthop.ai>
Hi Abdurraham,
...
> xiic_read_rx(i2c);
> if (xiic_rx_space(i2c) == 0) {
> + /*
> + * If the setup path padded a short SMBus block read up
> + * to SMBUS_BLOCK_READ_MIN_LEN for the HW exit
> + * workaround, trim rx_msg->len back to the number of
> + * bytes that are actually valid so the SMBus core's
> + * PEC check reads the right index. Must happen before
> + * the rx_msg = NULL below.
> + */
> + if (i2c->rx_msg && i2c->smbus_actual_len)
> + i2c->rx_msg->len = i2c->smbus_actual_len;
We do need to reset smbus_actual_len at every xiic_start_recv(),
otherwise this would be true for every rx_msg. Right?
Andi
> /* this is the last part of the message */
> i2c->rx_msg = NULL;
>
>
> --
> 2.54.0
>
next prev parent reply other threads:[~2026-09-21 8:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-10 3:40 [PATCH v4 0/3] i2c: xiic: fix SMBus block read and PEC support Abdurrahman Hussain
2026-09-10 3:40 ` [PATCH v4 1/3] i2c: xiic: preserve PEC byte length in SMBus block read setup Abdurrahman Hussain
2026-09-21 8:43 ` Andi Shyti [this message]
2026-09-21 18:22 ` Abdurrahman Hussain
2026-09-10 3:40 ` [PATCH v4 2/3] i2c: xiic: defer RX_FULL until all trailing bytes are in FIFO Abdurrahman Hussain
2026-09-10 3:40 ` [PATCH v4 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=arDgdyG0QsNerDH5@zenone.zhora.eu \
--to=andi.shyti@kernel.org \
--cc=abdurrahman@nexthop.ai \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.simek@amd.com \
--cc=shubhrajyoti.datta@amd.com \
--cc=wsa+renesas@sang-engineering.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
all inboxes | Powered by JetHome®