public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven@narfation.org>
To: Chris Packham <chris.packham@alliedtelesis.co.nz>,
	Andi Shyti <andi.shyti@kernel.org>
Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
	Jonas Jelonek <jelonek.jonas@gmail.com>,
	Harshal Gohel <hg@simonwunderlich.de>,
	Simon Wunderlich <sw@simonwunderlich.de>,
	stable@vger.kernel.org
Subject: Re: [PATCH 3/4] i2c: rtl9300: Add missing count byte for SMBus Block Write
Date: Sat, 02 Aug 2025 12:50:01 +0200	[thread overview]
Message-ID: <6287928.DvuYhMxLoT@sven-desktop> (raw)
In-Reply-To: <20250802-i2c-rtl9300-multi-byte-v1-3-5f687e0098e2@narfation.org>

[-- Attachment #1: Type: text/plain, Size: 1708 bytes --]

On Saturday, 2 August 2025 12:32:02 CEST Sven Eckelmann wrote:
[...]
> diff --git a/drivers/i2c/busses/i2c-rtl9300.c b/drivers/i2c/busses/i2c-rtl9300.c
> index a10e5e6e00075fabb8906d56f09f5b9141fbc06e..ed82e6c21aaf46000a263740123ffba833578cc2 100644
> --- a/drivers/i2c/busses/i2c-rtl9300.c
> +++ b/drivers/i2c/busses/i2c-rtl9300.c
> @@ -288,7 +288,7 @@ static int rtl9300_i2c_smbus_xfer(struct i2c_adapter *adap, u16 addr, unsigned s
>  		if (ret)
>  			goto out_unlock;
>  		if (read_write == I2C_SMBUS_WRITE) {
> -			ret = rtl9300_i2c_write(i2c, &data->block[1], data->block[0]);
> +			ret = rtl9300_i2c_write(i2c, &data->block[0], data->block[0] + 1);
>  			if (ret)
>  				goto out_unlock;
>  		}
> 
> 

Yes, there is as always this "2 seconds" after the send "wtf. were did the 
line go" situation:

diff --git a/drivers/i2c/busses/i2c-rtl9300.c b/drivers/i2c/busses/i2c-rtl9300.c
index a10e5e6e00075fabb8906d56f09f5b9141fbc06e..4d109ebd02f0cad86f50e4e148966b3fa68b0196 100644
--- a/drivers/i2c/busses/i2c-rtl9300.c
+++ b/drivers/i2c/busses/i2c-rtl9300.c
@@ -284,11 +284,11 @@ static int rtl9300_i2c_smbus_xfer(struct i2c_adapter *adap, u16 addr, unsigned s
 		ret = rtl9300_i2c_reg_addr_set(i2c, command, 1);
 		if (ret)
 			goto out_unlock;
-		ret = rtl9300_i2c_config_xfer(i2c, chan, addr, data->block[0]);
+		ret = rtl9300_i2c_config_xfer(i2c, chan, addr, data->block[0] + 1);
 		if (ret)
 			goto out_unlock;
 		if (read_write == I2C_SMBUS_WRITE) {
-			ret = rtl9300_i2c_write(i2c, &data->block[1], data->block[0]);
+			ret = rtl9300_i2c_write(i2c, &data->block[0], data->block[0] + 1);
 			if (ret)
 				goto out_unlock;
 		}

v2 will be send tomorrow. Sorry about the noise.

Kind regards,
	Sven

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2025-08-02 10:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-02 10:31 [PATCH 0/4] i2c: rtl9300: Fix multi-byte I2C operations Sven Eckelmann
2025-08-02 10:32 ` [PATCH 1/4] i2c: rtl9300: Fix multi-byte I2C write Sven Eckelmann
2025-08-02 10:32 ` [PATCH 2/4] i2c: rtl9300: Increase timeout for transfer polling Sven Eckelmann
2025-08-02 10:32 ` [PATCH 3/4] i2c: rtl9300: Add missing count byte for SMBus Block Write Sven Eckelmann
2025-08-02 10:50   ` Sven Eckelmann [this message]
2025-08-02 10:32 ` [PATCH 4/4] i2c: rtl9300: Implement I2C block read and write Sven Eckelmann
2025-08-03 22:12 ` [PATCH 0/4] i2c: rtl9300: Fix multi-byte I2C operations Chris Packham
2025-08-03 22:16   ` Chris Packham
2025-08-03 22:29 ` Chris Packham

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=6287928.DvuYhMxLoT@sven-desktop \
    --to=sven@narfation.org \
    --cc=andi.shyti@kernel.org \
    --cc=chris.packham@alliedtelesis.co.nz \
    --cc=hg@simonwunderlich.de \
    --cc=jelonek.jonas@gmail.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=sw@simonwunderlich.de \
    /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