From: Corey Minyard <minyard@acm.org>
To: Joe Komlodi <komlodi@google.com>
Cc: qemu-devel@nongnu.org, venture@google.com, cminyard@google.com
Subject: Re: [PATCH 0/4] hw/i2c: smbus: Reset fixes
Date: Thu, 11 Jan 2024 08:03:19 -0600 [thread overview]
Message-ID: <ZZ/1J4q1TEFmc72P@mail.minyard.net> (raw)
In-Reply-To: <20240110212641.1916202-1-komlodi@google.com>
On Wed, Jan 10, 2024 at 09:26:37PM +0000, Joe Komlodi wrote:
> Hi all,
>
> This series adds some resets for SMBus and for the I2C core. Along with
> it, we make SMBus slave error printing a little more helpful.
>
> These reset issues were very infrequent, they would maybe occur in 1 out
> of hundreds of resets in our testing, but the way they happen is pretty
> straightforward.
> Basically as long as a reset happens in the middle of a transaction, the
> state of the old transaction would still partially be there after the
> reset. Once a new transaction comes in, the partial stale state can
> cause the new transaction to incorrectly fail.
This seems wrong to me. In a real system, the reset would be done on
the smbus master and not necessarily on the mux (though I looked at a
few of the PCA954x devices and they appear to have reset lines, but
different systems may drive that reset differently).
It seems to me that the bug is the smbus master device isn't getting
reset in a system reset. Just adding the reset logic there would be
easier and more consistent with the real hardware.
-corey
>
> Thanks,
> Joe
>
> Joe Komlodi (4):
> hw/i2c: core: Add reset
> hw/i2c/smbus_slave: Add object path on error prints
> hw/i2c: smbus_slave: Reset state on reset
> hw/i2c: smbus: mux: Reset SMBusDevice state on reset
>
> hw/i2c/core.c | 30 +++++++++++++++++++++++++-----
> hw/i2c/i2c_mux_pca954x.c | 5 +++++
> hw/i2c/smbus_slave.c | 20 ++++++++++++++++++--
> include/hw/i2c/i2c.h | 6 +++++-
> include/hw/i2c/smbus_slave.h | 1 +
> 5 files changed, 54 insertions(+), 8 deletions(-)
>
> --
> 2.43.0.472.g3155946c3a-goog
>
>
next prev parent reply other threads:[~2024-01-11 14:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-10 21:26 [PATCH 0/4] hw/i2c: smbus: Reset fixes Joe Komlodi
2024-01-10 21:26 ` [PATCH 1/4] hw/i2c: core: Add reset Joe Komlodi
2024-01-10 21:26 ` [PATCH 2/4] hw/i2c/smbus_slave: Add object path on error prints Joe Komlodi
2024-01-10 21:26 ` [PATCH 3/4] hw/i2c: smbus_slave: Reset state on reset Joe Komlodi
2024-01-10 21:26 ` [PATCH 4/4] hw/i2c: smbus: mux: Reset SMBusDevice " Joe Komlodi
2024-01-10 21:32 ` [PATCH 0/4] hw/i2c: smbus: Reset fixes Joe Komlodi
2024-01-11 14:03 ` Corey Minyard [this message]
2024-01-24 17:39 ` Joe Komlodi
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=ZZ/1J4q1TEFmc72P@mail.minyard.net \
--to=minyard@acm.org \
--cc=cminyard@google.com \
--cc=komlodi@google.com \
--cc=qemu-devel@nongnu.org \
--cc=venture@google.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;
as well as URLs for NNTP newsgroup(s).