All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: BALATON Zoltan <balaton@eik.bme.hu>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: Corey Minyard <cminyard@mvista.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	Alistair Francis <alistair@alistair23.me>,
	qemu-devel@nongnu.org, qemu-ppc@nongnu.org,
	Frederic Konrad <konrad@adacore.com>,
	David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [RFC PATCH v2 3/3] hw/misc/auxbus: Fix MOT/classic I2C mode
Date: Tue, 23 Jun 2020 13:06:56 +0200 (CEST)	[thread overview]
Message-ID: <alpine.BSF.2.22.395.2006231304300.23200@zero.eik.bme.hu> (raw)
In-Reply-To: <20200623063123.20776-4-f4bug@amsat.org>

[-- Attachment #1: Type: text/plain, Size: 2166 bytes --]

On Tue, 23 Jun 2020, Philippe Mathieu-Daudé wrote:
> Since its introduction in commit 6fc7f77fd2 i2c_start_transfer()
> uses incorrectly the direction of the transfer. Fix it now.
>
> Fixes: 6fc7f77fd2 ("introduce aux-bus")
> Reported-by: BALATON Zoltan <balaton@eik.bme.hu>
> Suggested-by: BALATON Zoltan <balaton@eik.bme.hu>

One of the above is probably enough, maybe Reported-by because I wasn't 
sure what's the solution. I'm also happy with your changes to the whole 
series, thanks for fixing it.

Regards,
BALATON Zoltan

> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> RFC because untested (probably never was anyway)
> Cc: Frederic Konrad <konrad@adacore.com>
> Cc: Alistair Francis <alistair@alistair23.me>
> Cc: Peter Maydell <peter.maydell@linaro.org>
> ---
> hw/misc/auxbus.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/hw/misc/auxbus.c b/hw/misc/auxbus.c
> index cef0d0d6d0..dc4a5dd10d 100644
> --- a/hw/misc/auxbus.c
> +++ b/hw/misc/auxbus.c
> @@ -141,7 +141,7 @@ AUXReply aux_request(AUXBus *bus, AUXCommand cmd, uint32_t address,
>             i2c_end_transfer(i2c_bus);
>         }
>
> -        if (i2c_start_transfer(i2c_bus, address, is_write)) {
> +        if (i2c_start_transfer(i2c_bus, address, !is_write)) {
>             ret = AUX_I2C_NACK;
>             break;
>         }
> @@ -172,7 +172,7 @@ AUXReply aux_request(AUXBus *bus, AUXCommand cmd, uint32_t address,
>             /*
>              * No transactions started..
>              */
> -            if (i2c_start_transfer(i2c_bus, address, is_write)) {
> +            if (i2c_start_transfer(i2c_bus, address, !is_write)) {
>                 break;
>             }
>         } else if ((address != bus->last_i2c_address) ||
> @@ -181,7 +181,7 @@ AUXReply aux_request(AUXBus *bus, AUXCommand cmd, uint32_t address,
>              * Transaction started but we need to restart..
>              */
>             i2c_end_transfer(i2c_bus);
> -            if (i2c_start_transfer(i2c_bus, address, is_write)) {
> +            if (i2c_start_transfer(i2c_bus, address, !is_write)) {
>                 break;
>             }
>         }
>

  reply	other threads:[~2020-06-23 11:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-23  6:31 [PATCH v2 0/3] i2c: Match parameters of i2c_start_transfer and i2c_send_recv Philippe Mathieu-Daudé
2020-06-23  6:31 ` [PATCH v2 1/3] " Philippe Mathieu-Daudé
2020-06-23  6:31 ` [PATCH v2 2/3] i2c: Make i2c_start_transfer() direction argument a boolean Philippe Mathieu-Daudé
2020-06-23  6:31 ` [RFC PATCH v2 3/3] hw/misc/auxbus: Fix MOT/classic I2C mode Philippe Mathieu-Daudé
2020-06-23 11:06   ` BALATON Zoltan [this message]
2020-07-04 16:54     ` Philippe Mathieu-Daudé
2020-07-04 16:54 ` [PATCH v2 0/3] i2c: Match parameters of i2c_start_transfer and i2c_send_recv Philippe Mathieu-Daudé
2021-06-12 19:33 ` BALATON Zoltan
2021-06-14  9:56   ` Philippe Mathieu-Daudé
2021-06-14 10:02     ` BALATON Zoltan
2021-06-14 16:48       ` Philippe Mathieu-Daudé
2021-06-14 19:34         ` Corey Minyard
2021-06-16 15:09           ` Philippe Mathieu-Daudé

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=alpine.BSF.2.22.395.2006231304300.23200@zero.eik.bme.hu \
    --to=balaton@eik.bme.hu \
    --cc=alistair@alistair23.me \
    --cc=cminyard@mvista.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=f4bug@amsat.org \
    --cc=konrad@adacore.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /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.