lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CA+V-a8t-eZ7nq+-OgzYq+FzpK7GEnSrzBFJJKfTSv-hzBktjpg@mail.gmail.com>
Date: Thu, 2 Jan 2025 10:32:36 +0000
From: "Lad, Prabhakar" <prabhakar.csengg@...il.com>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: Chris Brandt <chris.brandt@...esas.com>, Andi Shyti <andi.shyti@...nel.org>, 
	Geert Uytterhoeven <geert+renesas@...der.be>, Wolfram Sang <wsa+renesas@...g-engineering.com>, 
	Philipp Zabel <p.zabel@...gutronix.de>, linux-renesas-soc@...r.kernel.org, 
	linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org, 
	Biju Das <biju.das.jz@...renesas.com>, 
	Fabrizio Castro <fabrizio.castro.jz@...esas.com>, 
	Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>, 
	Claudiu Beznea <claudiu.beznea.uj@...renesas.com>
Subject: Re: [PATCH v3 8/8] i2c: riic: Add `riic_bus_barrier()` to check bus availability

Hi Andy,

Thank you for the review.

On Sat, Dec 28, 2024 at 11:40 PM Andy Shevchenko
<andy.shevchenko@...il.com> wrote:
>
> Fri, Dec 27, 2024 at 11:51:54AM +0000, Prabhakar kirjoitti:
> > From: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
> >
> > Introduce a new `riic_bus_barrier()` function to verify bus availability
> > before initiating an I2C transfer. This function enhances the bus
> > arbitration check by ensuring that the SDA and SCL lines are not held low,
> > in addition to checking the BBSY flag using `readb_poll_timeout()`.
> >
> > Previously, only the BBSY flag was checked to determine bus availability.
> > However, it is possible for the SDA line to remain low even when BBSY = 0.
> > This new implementation performs an additional check on the SDA and SCL
> > lines to avoid potential bus contention issues.
>
> ...
>
> > +     /*
> > +      * The SDA line can still be low even when BBSY = 0. Therefore, after checking
> > +      * the BBSY flag, also verify that the SDA and SCL lines are not being held low.
> > +      */
> > +     ret = readb_poll_timeout(riic->base + riic->info->regs[RIIC_ICCR2], val,
> > +                              !(val & ICCR2_BBSY), 10, riic->adapter.timeout);
> > +     if (ret)
> > +             return -EBUSY;
>
> Why the return code is shadowed? Is it requirement by ABI?
>
I will propagate the error instead of shadowing it.

Cheers,
Prabhakar

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ