From: Jarkko Nikula <jarkko.nikula@linux.intel.com>
To: Tam Chi Nguyen <tamnguyenchi@amperemail.onmicrosoft.com>,
Tam Nguyen <tamnguyenchi@os.amperecomputing.com>,
linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org
Cc: patches@amperecomputing.com, andriy.shevchenko@linux.intel.com,
mika.westerberg@linux.intel.com, jsd@semihalf.com,
chuong@os.amperecomputing.com, darren@os.amperecomputing.com,
stable@vger.kernel.org
Subject: Re: [PATCH v1] i2c: designware: Handle invalid SMBus block data response length
Date: Mon, 5 Jun 2023 10:41:18 +0300 [thread overview]
Message-ID: <d560c9b0-d2cf-18da-3470-a51468413955@linux.intel.com> (raw)
In-Reply-To: <95d838d5-ea27-ef75-4ac6-575ebd75111a@amperemail.onmicrosoft.com>
Hi
On 6/2/23 07:30, Tam Chi Nguyen wrote:
> Hi Jarkko,
>
> Before pushing the v2 patch, I have one more question to ask.
>
> The commit f53f15ba5a85 ("i2c: designware: Get right data length"), you
> mentioned,
> does not handle bit 11 set (on a HW where it's supported) correctly.
> "tmp" was not marked with DW_IC_DATA_CMD_DAT when passing to
> i2c_dw_recv_len function.
>
> So I plan to update it in the v2 patch by adding this
> regmap_read(dev->map, DW_IC_DATA_CMD, &tmp);
> tmp &= DW_IC_DATA_CMD_DAT;
>
> My question is: does it need a separate patch for this change?
>
I think for now bit 11 gets masked since tmp variable is assigned to u8
variables when calling i2c_dw_recv_len() and writing to *buf pointer but
your proposal indeed makes code more robust both your patch point of
view or any other future change. So separate patch makes sense in my
opinion.
prev parent reply other threads:[~2023-06-05 7:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-23 8:21 [PATCH v1] i2c: designware: Handle invalid SMBus block data response length Tam Nguyen
2023-05-24 12:33 ` Jarkko Nikula
2023-05-25 9:30 ` Tam Chi Nguyen
2023-06-02 4:30 ` Tam Chi Nguyen
2023-06-05 7:41 ` Jarkko Nikula [this message]
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=d560c9b0-d2cf-18da-3470-a51468413955@linux.intel.com \
--to=jarkko.nikula@linux.intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=chuong@os.amperecomputing.com \
--cc=darren@os.amperecomputing.com \
--cc=jsd@semihalf.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=patches@amperecomputing.com \
--cc=stable@vger.kernel.org \
--cc=tamnguyenchi@amperemail.onmicrosoft.com \
--cc=tamnguyenchi@os.amperecomputing.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