All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Delevoryas <peterdelevoryas@gmail.com>
Cc: clg@kaod.org, peter.maydell@linaro.org, andrew@aj.id.au,
	joel@jms.id.au, cminyard@mvista.com, titusr@google.com,
	qemu-devel@nongnu.org, qemu-arm@nongnu.org, zhdaniel@fb.com,
	pdel@fb.com
Subject: [PATCH v2 08/13] hw/i2c/pmbus: Reset out buf after switching pages
Date: Tue, 28 Jun 2022 20:36:29 -0700	[thread overview]
Message-ID: <20220629033634.3850922-9-pdel@fb.com> (raw)
In-Reply-To: <20220629033634.3850922-1-pdel@fb.com>

When a pmbus device switches pages, it should clears its output buffer so
that the next transaction doesn't emit data from the previous page.

Fixes: 3746d5c15e70570b ("hw/i2c: add support for PMBus”)
Signed-off-by: Peter Delevoryas <pdel@fb.com>
---
 hw/i2c/pmbus_device.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/i2c/pmbus_device.c b/hw/i2c/pmbus_device.c
index 62885fa6a1..efddc36fd9 100644
--- a/hw/i2c/pmbus_device.c
+++ b/hw/i2c/pmbus_device.c
@@ -1088,6 +1088,7 @@ static int pmbus_write_data(SMBusDevice *smd, uint8_t *buf, uint8_t len)
 
     if (pmdev->code == PMBUS_PAGE) {
         pmdev->page = pmbus_receive8(pmdev);
+        pmdev->out_buf_len = 0;
         return 0;
     }
 
-- 
2.30.2



  parent reply	other threads:[~2022-06-29  3:43 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-29  3:36 [PATCH v2 00/13] hw/i2c/aspeed: Add new-registers DMA slave mode RX support Peter Delevoryas
2022-06-29  3:36 ` [PATCH v2 01/13] hw/i2c/aspeed: Fix R_I2CD_FUN_CTRL reference Peter Delevoryas
2022-06-29  8:31   ` Cédric Le Goater
2022-06-29  3:36 ` [PATCH v2 02/13] hw/i2c/aspeed: Fix DMA len write-enable bit handling Peter Delevoryas
2022-06-29  8:31   ` Cédric Le Goater
2022-06-29  3:36 ` [PATCH v2 03/13] hw/i2c/aspeed: Fix MASTER_EN missing error message Peter Delevoryas
2022-06-29  8:31   ` Cédric Le Goater
2022-06-29  3:36 ` [PATCH v2 04/13] hw/i2c: support multiple masters Peter Delevoryas
2022-06-29  8:35   ` Cédric Le Goater
2022-06-29  3:36 ` [PATCH v2 05/13] hw/i2c: add asynchronous send Peter Delevoryas
2022-06-29  3:36 ` [PATCH v2 06/13] hw/i2c/aspeed: add slave device in old register mode Peter Delevoryas
2022-06-29  3:36 ` [PATCH v2 07/13] hw/i2c/aspeed: Add new-registers DMA slave mode RX support Peter Delevoryas
2022-06-29  3:36 ` Peter Delevoryas [this message]
2022-06-29  8:36   ` [PATCH v2 08/13] hw/i2c/pmbus: Reset out buf after switching pages Cédric Le Goater
2022-06-29 18:05   ` Titus Rwantare
2022-06-29 18:28     ` Peter Delevoryas
2022-06-30  1:43       ` Peter Delevoryas
2022-06-29  3:36 ` [PATCH v2 09/13] hw/i2c/pmbus: Add read-only IC_DEVICE_ID support Peter Delevoryas
2022-06-29  8:40   ` Cédric Le Goater
2022-06-29 16:08     ` Peter Delevoryas
2022-06-29 18:04   ` Titus Rwantare
2022-06-29 18:26     ` Peter Delevoryas
2022-06-30 15:46       ` Patrick Venture
2022-07-01  6:20         ` Cédric Le Goater
2022-06-29  3:36 ` [PATCH v2 10/13] hw/misc/aspeed: Add PECI controller Peter Delevoryas
2022-06-29  9:20   ` Cédric Le Goater
2022-06-29 16:07     ` Peter Delevoryas
2022-06-29 16:44       ` Cédric Le Goater
2022-06-29  3:36 ` [PATCH v2 11/13] hw/misc/aspeed: Add fby35-sb-cpld Peter Delevoryas
2022-06-29  3:36 ` [PATCH v2 12/13] hw/misc/aspeed: Add intel-me Peter Delevoryas
2022-06-29  3:36 ` [PATCH v2 13/13] hw/arm/aspeed: Add oby35-cl machine Peter Delevoryas

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=20220629033634.3850922-9-pdel@fb.com \
    --to=peterdelevoryas@gmail.com \
    --cc=andrew@aj.id.au \
    --cc=clg@kaod.org \
    --cc=cminyard@mvista.com \
    --cc=joel@jms.id.au \
    --cc=pdel@fb.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=titusr@google.com \
    --cc=zhdaniel@fb.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.