public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: <Padmarao.Begari@microchip.com>
To: <hs@denx.de>, <u-boot@lists.denx.de>,
	<Conor.Dooley@microchip.com>, <ycliang@andestech.com>
Cc: <andreas.buerkler@enclustra.com>
Subject: Re: [PATCH v1 2/2] i2c: microchip: fix erroneous late ack send
Date: Fri, 28 Oct 2022 04:58:31 +0000	[thread overview]
Message-ID: <06dd84878027fe57b95e98563a5f3c2c21ff87ff.camel@microchip.com> (raw)
In-Reply-To: <178ee132-5eaa-66aa-3c9d-71028f7cd597@microchip.com>

Hi Conor,
> On Wed, 2022-10-26 at 07:54 +0000, Conor Dooley - M52691 wrote:
> On 26/10/2022 08:49, Conor Dooley wrote:
> > A late ack is currently being sent at the end of a transfer due to
> > incorrect logic in mchp_corei2c_empty_rx(). Currently the Assert
> > Ack
> > bit is being written to the controller's control reg after the last
> > byte has been received, causing it to sent another byte with the
> > ack.
> > Instead, the AA flag should be written to the control register when
> > the penultimate byte is read so it is sent out for the last byte.
> > 
> > Reported-by: Andreas Buerkler <andreas.buerkler@enclustra.com>
> > Fixes: 0dc0d1e094 ("i2c: Add Microchip PolarFire SoC I2C driver")
> > Fixes: 0190d48488 ("i2c: microchip: fix ack sending logic")
> 
> I had removed this fixes tag but I must have aborted the rebase
> in which I did. If nothing else needs changing, please drop it,
> otherwise I'll remove it if/when I send a v2.
> 
Yes you can remove it because the patch check is showing warning for
this fixes tag

Regards
Padmarao
> Thanks,
> Conor.
> 
> > Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
> > ---
> >   drivers/i2c/i2c-microchip.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/i2c/i2c-microchip.c b/drivers/i2c/i2c-
> > microchip.c
> > index 3a27459386..d82b80f535 100644
> > --- a/drivers/i2c/i2c-microchip.c
> > +++ b/drivers/i2c/i2c-microchip.c
> > @@ -224,7 +224,7 @@ static void mpfs_i2c_empty_rx(struct
> > mpfs_i2c_bus *bus)
> >   		bus->msg_len--;
> >   	}
> >   
> > -	if (bus->msg_len == 0) {
> > +	if (bus->msg_len <= 1) {
> >   		ctrl = readl(bus->base + MPFS_I2C_CTRL);
> >   		ctrl &= ~CTRL_AA;
> >   		writel(ctrl, bus->base + MPFS_I2C_CTRL);

  reply	other threads:[~2022-10-28  4:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-26  7:49 [PATCH v1 0/2] i2c: microchip: misc minor fixes Conor Dooley
2022-10-26  7:49 ` [PATCH v1 1/2] i2c: microchip: fix ack sending logic Conor Dooley
2022-10-28  4:44   ` Padmarao.Begari
2022-11-14  6:12   ` Heiko Schocher
2022-11-14  9:09   ` Heiko Schocher
2022-10-26  7:49 ` [PATCH v1 2/2] i2c: microchip: fix erroneous late ack send Conor Dooley
2022-10-26  7:54   ` Conor.Dooley
2022-10-28  4:58     ` Padmarao.Begari [this message]
2022-10-28  4:43   ` Padmarao.Begari
2022-11-14  6:13   ` Heiko Schocher
2022-11-14  9:09   ` Heiko Schocher

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=06dd84878027fe57b95e98563a5f3c2c21ff87ff.camel@microchip.com \
    --to=padmarao.begari@microchip.com \
    --cc=Conor.Dooley@microchip.com \
    --cc=andreas.buerkler@enclustra.com \
    --cc=hs@denx.de \
    --cc=u-boot@lists.denx.de \
    --cc=ycliang@andestech.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