From: Hao Wu <wuhaotsh@google.com>
To: peter.maydell@linaro.org
Cc: richard.henderson@linaro.org, qemu-arm@nongnu.org,
qemu-devel@nongnu.org, wuhaotsh@google.com, venture@google.com,
Avi.Fishman@nuvoton.com, kfting@nuvoton.com,
hskinnemoen@google.com, f4bug@amsat.org, bin.meng@windriver.com,
qemu-block@nongnu.org, armbru@redhat.com, thuth@redhat.com,
Titus Rwantare <titusr@google.com>
Subject: [PATCH 1/8] hw/i2c: Clear ACK bit in NPCM7xx SMBus module
Date: Thu, 14 Jul 2022 11:27:40 -0700 [thread overview]
Message-ID: <20220714182756.85664-2-wuhaotsh@google.com> (raw)
In-Reply-To: <20220714182756.85664-1-wuhaotsh@google.com>
The ACK bit in NPCM7XX SMBus module should be cleared each time it
sends out a NACK signal. This patch fixes the bug that it fails to
do so.
Signed-off-by: Hao Wu <wuhaotsh@google.com>
Reviewed-by: Titus Rwantare <titusr@google.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
---
hw/i2c/npcm7xx_smbus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/i2c/npcm7xx_smbus.c b/hw/i2c/npcm7xx_smbus.c
index e7e0ba66fe..f18e311556 100644
--- a/hw/i2c/npcm7xx_smbus.c
+++ b/hw/i2c/npcm7xx_smbus.c
@@ -270,7 +270,7 @@ static void npcm7xx_smbus_recv_byte(NPCM7xxSMBusState *s)
if (s->st & NPCM7XX_SMBCTL1_ACK) {
trace_npcm7xx_smbus_nack(DEVICE(s)->canonical_path);
i2c_nack(s->bus);
- s->st &= NPCM7XX_SMBCTL1_ACK;
+ s->st &= ~NPCM7XX_SMBCTL1_ACK;
}
trace_npcm7xx_smbus_recv_byte((DEVICE(s)->canonical_path), s->sda);
npcm7xx_smbus_update_irq(s);
--
2.37.0.170.g444d1eabd0-goog
next prev parent reply other threads:[~2022-07-14 18:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-14 18:27 [PATCH 0/8] Misc NPCM7XX patches Hao Wu
2022-07-14 18:27 ` Hao Wu [this message]
2022-07-14 18:27 ` [PATCH 2/8] hw/i2c: Read FIFO during RXF_CTL change in NPCM7XX SMBus Hao Wu
2022-07-14 18:27 ` [PATCH 3/8] hw/adc: Fix CONV bit in NPCM7XX ADC CON register Hao Wu
2022-07-14 18:27 ` [PATCH 4/8] hw/adc: Make adci[*] R/W in NPCM7XX ADC Hao Wu
2022-07-14 18:27 ` [PATCH 5/8] blockdev: Add a new IF type IF_OTHER Hao Wu
-- strict thread matches above, loose matches on Subject: below --
2022-07-14 17:59 [PATCH 0/8] Misc NPCM7XX patches Hao Wu
2022-07-14 17:59 ` [PATCH 1/8] hw/i2c: Clear ACK bit in NPCM7xx SMBus module Hao Wu
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=20220714182756.85664-2-wuhaotsh@google.com \
--to=wuhaotsh@google.com \
--cc=Avi.Fishman@nuvoton.com \
--cc=armbru@redhat.com \
--cc=bin.meng@windriver.com \
--cc=f4bug@amsat.org \
--cc=hskinnemoen@google.com \
--cc=kfting@nuvoton.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=thuth@redhat.com \
--cc=titusr@google.com \
--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).