linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@amd.com>
To: "Datta, Shubhrajyoti" <shubhrajyoti.datta@amd.com>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Wolfram Sang <wsa@kernel.org>
Cc: "linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>,
	git <git@xilinx.com>
Subject: Re: [PATCH] i2c: cadence: Support PEC for SMBus block read
Date: Mon, 18 Jul 2022 14:54:51 +0200	[thread overview]
Message-ID: <51fcbbf2-c490-4b2b-fde5-df1dfce7e677@amd.com> (raw)
In-Reply-To: <BY5PR12MB4902D36D299948DE036AC0BF818C9@BY5PR12MB4902.namprd12.prod.outlook.com>



On 7/18/22 14:37, Datta, Shubhrajyoti wrote:
> [AMD Official Use Only - General]
> 
> 
> 
>> -----Original Message-----
>> From: Simek, Michal <michal.simek@amd.com>
>> Sent: Monday, July 18, 2022 2:56 PM
>> To: Lars-Peter Clausen <lars@metafoo.de>; Wolfram Sang
>> <wsa@kernel.org>; Datta, Shubhrajyoti <shubhrajyoti.datta@amd.com>
>> Cc: linux-i2c@vger.kernel.org; git <git@xilinx.com>
>> Subject: Re: [PATCH] i2c: cadence: Support PEC for SMBus block read
>>
>>
>>
>> On 7/17/22 16:52, Lars-Peter Clausen wrote:
>>> SMBus packet error checking (PEC) is implemented by appending one
>>> additional byte of checksum data at the end of the message. This
>>> provides additional protection and allows to detect data corruption on the
>> I2C bus.
>>>
>>> SMBus block reads support variable length reads. The first byte in the
>>> read message is the number of available data bytes.
>>>
>>> The combination of PEC and block read is currently not supported by
>>> the Cadence I2C driver.
>>>    * When PEC is enabled the maximum transfer length for block reads
>>>      increases from 33 to 34 bytes.
>>>    * The I2C core smbus emulation layer relies on the driver updating the
>>>      `i2c_msg` `len` field with the number of received bytes. The updated
>>>      length is used when checking the PEC.
>>>
>>> Add support to the Cadence I2C driver for handling SMBus block reads
>>> with PEC. To determine the maximum transfer length uses the initial
>>> `len` value of the `i2c_msg`. When PEC is enabled this will be 2, when
>>> it is disabled it will be 1.
>>>
>>> Once a read transfer is done also increment the `len` field by the
>>> amount of received data bytes.
>>>
>>> This change has been tested with a UCM90320 PMBus power monitor,
>> which
>>> requires block reads to access certain data fields, but also has PEC
>>> enabled by default.
>>>
>>> Fixes: df8eb5691c48 ("i2c: Add driver for Cadence I2C controller")
>>
>> Subject is saying that you adding support for PEC and here you are saying
>> that it is fixing initial commit.
>>
>> If this is adding new support I think Fixes tag shouldn't be here.
>>
>> If it is fixing issue subject should be updated and this Fixes tag kept here.
>>
>> The rest looks good to me.
>>
>> Shubhrajyoti: Can you please test?
> 
> I have tested the reads and write smbus  without packet error check.

Can you please switch it to formal Tested-by: tag?

M

  reply	other threads:[~2022-07-18 12:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-17 14:52 [PATCH] i2c: cadence: Support PEC for SMBus block read Lars-Peter Clausen
2022-07-18  9:25 ` Michal Simek
2022-07-18 12:37   ` Datta, Shubhrajyoti
2022-07-18 12:54     ` Michal Simek [this message]
2022-07-18 13:11       ` Datta, Shubhrajyoti
2022-07-24  5:46         ` Wolfram Sang
2022-07-19  8:57   ` Lars-Peter Clausen
2022-07-24  5:47 ` 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=51fcbbf2-c490-4b2b-fde5-df1dfce7e677@amd.com \
    --to=michal.simek@amd.com \
    --cc=git@xilinx.com \
    --cc=lars@metafoo.de \
    --cc=linux-i2c@vger.kernel.org \
    --cc=shubhrajyoti.datta@amd.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;
as well as URLs for NNTP newsgroup(s).