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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOtMz3OeLzvtJ_T6w9v-OYCbTTxpfQjLsajN-a439QuETod7hQ@mail.gmail.com>
Date:   Thu, 28 Apr 2022 15:42:11 +0200
From:   Jan Dąbroś <jsd@...ihalf.com>
To:     Jarkko Nikula <jarkko.nikula@...ux.intel.com>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-i2c <linux-i2c@...r.kernel.org>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Mika Westerberg <mika.westerberg@...ux.intel.com>,
        Raul E Rangel <rrangel@...omium.org>,
        "Easow, Nimesh" <Nimesh.Easow@....com>, upstream@...ihalf.com
Subject: Re: [PATCH] i2c: designware: Modify timing parameters for amdpsp mailbox

czw., 28 kwi 2022 o 15:07 Jarkko Nikula
<jarkko.nikula@...ux.intel.com> napisał(a):
>
> On 4/28/22 15:26, Jan Dabros wrote:
> > Adjust retry period and timeout values for x86-PSP mailbox based on the
> > typical I2C traffic generated by PSP. In order to limit the possibility
> > of timeouts, x86 should reduce the interval between retries as well as
> > increase overall time after which it gives up.
> >
> > Signed-off-by: Jan Dabros <jsd@...ihalf.com>
> > ---
> >   drivers/i2c/busses/i2c-designware-amdpsp.c | 4 ++--
> >   1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/i2c/busses/i2c-designware-amdpsp.c b/drivers/i2c/busses/i2c-designware-amdpsp.c
> > index 9b37f2b95abc..b624356c945f 100644
> > --- a/drivers/i2c/busses/i2c-designware-amdpsp.c
> > +++ b/drivers/i2c/busses/i2c-designware-amdpsp.c
> > @@ -16,8 +16,8 @@
> >   #define PSP_CMD_TIMEOUT_US  (500 * USEC_PER_MSEC)
> >
> >   #define PSP_I2C_REQ_BUS_CMD         0x64
> > -#define PSP_I2C_REQ_RETRY_CNT                10
> > -#define PSP_I2C_REQ_RETRY_DELAY_US   (50 * USEC_PER_MSEC)
> > +#define PSP_I2C_REQ_RETRY_CNT                400
> > +#define PSP_I2C_REQ_RETRY_DELAY_US   (25 * USEC_PER_MSEC)
> >   #define PSP_I2C_REQ_STS_OK          0x0
> >   #define PSP_I2C_REQ_STS_BUS_BUSY    0x1
> >   #define PSP_I2C_REQ_STS_INV_PARAM   0x3
>
> Out of curiosity, can it be up to 400 * 25 ms = 10 s?

Right, worst case x86 is trying to take arbitration of the bus for
10s. But this is very unlikely (margin of safety).

> Acked-by: Jarkko Nikula <jarkko.nikula@...ux.intel.com>

Thanks!

Best Regards,
Jan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ