From: Wolfram Sang <wsa@kernel.org>
To: Alain Volmat <alain.volmat@foss.st.com>
Cc: Pierre-Yves MORDRET <pierre-yves.mordret@foss.st.com>,
Andi Shyti <andi.shyti@kernel.org>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
M'boumba Cedric Madianga <cedric.madianga@gmail.com>,
stable@vger.kernel.org,
Pierre-Yves MORDRET <pierre-yves.mordret@st.com>,
linux-i2c@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] i2c: stm32f7: Fix PEC handling in case of SMBUS transfers
Date: Sat, 21 Oct 2023 20:34:23 +0200 [thread overview]
Message-ID: <ZTQZr9QocS+Qls0P@ninjato> (raw)
In-Reply-To: <20231010084455.1718830-1-alain.volmat@foss.st.com>
[-- Attachment #1: Type: text/plain, Size: 1326 bytes --]
On Tue, Oct 10, 2023 at 10:44:54AM +0200, Alain Volmat wrote:
> In case of SMBUS byte read with PEC enabled, the whole transfer
> is split into two commands. A first write command, followed by
> a read command. The write command does not have any PEC byte
> and a PEC byte is appended at the end of the read command.
> (cf Read byte protocol with PEC in SMBUS specification)
>
> Within the STM32 I2C controller, handling (either sending
> or receiving) of the PEC byte is done via the PECBYTE bit in
> register CR2.
>
> Currently, the PECBYTE is set at the beginning of a transfer,
> which lead to sending a PEC byte at the end of the write command
> (hence losing the real last byte), and also does not check the
> PEC byte received during the read command.
>
> This patch corrects the function stm32f7_i2c_smbus_xfer_msg
> in order to only set the PECBYTE during the read command.
>
> Fixes: 9e48155f6bfe ("i2c: i2c-stm32f7: Add initial SMBus protocols support")
> Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
> Reviewed-by: Pierre-Yves MORDRET <pierre-yves.mordret@foss.st.com>
Applied to for-current, thanks!
BTW, there are some patches pending from this series for stm32f4/7. Do
you have time for an ack?
http://patchwork.ozlabs.org/project/linux-i2c/list/?series=359230
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Wolfram Sang <wsa@kernel.org>
To: Alain Volmat <alain.volmat@foss.st.com>
Cc: Pierre-Yves MORDRET <pierre-yves.mordret@foss.st.com>,
Andi Shyti <andi.shyti@kernel.org>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
M'boumba Cedric Madianga <cedric.madianga@gmail.com>,
stable@vger.kernel.org,
Pierre-Yves MORDRET <pierre-yves.mordret@st.com>,
linux-i2c@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] i2c: stm32f7: Fix PEC handling in case of SMBUS transfers
Date: Sat, 21 Oct 2023 20:34:23 +0200 [thread overview]
Message-ID: <ZTQZr9QocS+Qls0P@ninjato> (raw)
In-Reply-To: <20231010084455.1718830-1-alain.volmat@foss.st.com>
[-- Attachment #1.1: Type: text/plain, Size: 1326 bytes --]
On Tue, Oct 10, 2023 at 10:44:54AM +0200, Alain Volmat wrote:
> In case of SMBUS byte read with PEC enabled, the whole transfer
> is split into two commands. A first write command, followed by
> a read command. The write command does not have any PEC byte
> and a PEC byte is appended at the end of the read command.
> (cf Read byte protocol with PEC in SMBUS specification)
>
> Within the STM32 I2C controller, handling (either sending
> or receiving) of the PEC byte is done via the PECBYTE bit in
> register CR2.
>
> Currently, the PECBYTE is set at the beginning of a transfer,
> which lead to sending a PEC byte at the end of the write command
> (hence losing the real last byte), and also does not check the
> PEC byte received during the read command.
>
> This patch corrects the function stm32f7_i2c_smbus_xfer_msg
> in order to only set the PECBYTE during the read command.
>
> Fixes: 9e48155f6bfe ("i2c: i2c-stm32f7: Add initial SMBus protocols support")
> Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
> Reviewed-by: Pierre-Yves MORDRET <pierre-yves.mordret@foss.st.com>
Applied to for-current, thanks!
BTW, there are some patches pending from this series for stm32f4/7. Do
you have time for an ack?
http://patchwork.ozlabs.org/project/linux-i2c/list/?series=359230
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-10-21 18:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-10 8:44 [PATCH v2] i2c: stm32f7: Fix PEC handling in case of SMBUS transfers Alain Volmat
2023-10-10 8:44 ` Alain Volmat
2023-10-10 8:47 ` kernel test robot
2023-10-12 15:06 ` Andi Shyti
2023-10-12 15:06 ` Andi Shyti
2023-10-21 18:34 ` Wolfram Sang [this message]
2023-10-21 18:34 ` Wolfram Sang
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=ZTQZr9QocS+Qls0P@ninjato \
--to=wsa@kernel.org \
--cc=alain.volmat@foss.st.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andi.shyti@kernel.org \
--cc=cedric.madianga@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=pierre-yves.mordret@foss.st.com \
--cc=pierre-yves.mordret@st.com \
--cc=stable@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.