All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Packham <judge.packham@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] i2c: Fix deselection of muxes
Date: Wed, 3 Dec 2014 20:35:59 +1300	[thread overview]
Message-ID: <CAFOYHZARfh-58WccgRP=aB+Gr+mynj0mw9j3tCVkkNhDWof84Q@mail.gmail.com> (raw)
In-Reply-To: <1417463359-3796-1-git-send-email-mark.tomlinson@alliedtelesis.co.nz>

Hi Mark,

This might get more attention if Heiko was on the Cc list.

On Tue, Dec 2, 2014 at 8:49 AM, Mark Tomlinson
<mark.tomlinson@alliedtelesis.co.nz> wrote:
> Due to an uninitialised variable, when muxes were deselected, any value
> could be written to the mux control register. On the PCA9548, this could
> result in multiple channels being selected, thus enabling multiple
> pull-up resistors, and much bus capacitance.
>
> The fix is simply to initialise the written value to zero.
>
> Signed-off-by: Mark Tomlinson <mark.tomlinson@alliedtelesis.co.nz>
> ---
>  drivers/i2c/i2c_core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/i2c_core.c b/drivers/i2c/i2c_core.c
> index d34b749..4539667 100644
> --- a/drivers/i2c/i2c_core.c
> +++ b/drivers/i2c/i2c_core.c
> @@ -178,7 +178,7 @@ static int i2c_mux_disconnet_all(void)
>  {
>         struct  i2c_bus_hose *i2c_bus_tmp = &i2c_bus[I2C_BUS];
>         int     i;
> -       uint8_t buf;
> +       uint8_t buf = 0;
>
>         if (I2C_ADAP->init_done == 0)
>                 return 0;
> --
> 1.9.1
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

      parent reply	other threads:[~2014-12-03  7:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-01 19:49 [U-Boot] [PATCH 1/2] i2c: Fix deselection of muxes Mark Tomlinson
2014-12-01 19:49 ` [U-Boot] [PATCH 2/2] i2c: Correct spelling error Mark Tomlinson
2014-12-03  7:36   ` Chris Packham
2014-12-03  7:35 ` Chris Packham [this message]

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='CAFOYHZARfh-58WccgRP=aB+Gr+mynj0mw9j3tCVkkNhDWof84Q@mail.gmail.com' \
    --to=judge.packham@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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.