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: <87fcba54-b54a-ea20-63ba-f447f4d34506@linux.intel.com>
Date:   Thu, 10 Feb 2022 16:43:48 +0200
From:   Jarkko Nikula <jarkko.nikula@...ux.intel.com>
To:     Jan Dąbroś <jsd@...ihalf.com>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-i2c <linux-i2c@...r.kernel.org>,
        Mika Westerberg <mika.westerberg@...ux.intel.com>,
        Hans de Goede <hdegoede@...hat.com>,
        Wolfram Sang <wsa@...nel.org>,
        Raul E Rangel <rrangel@...omium.org>,
        Marcin Wojtas <mw@...ihalf.com>,
        Grzegorz Jaszczyk <jaz@...ihalf.com>, upstream@...ihalf.com,
        Tom Lendacky <thomas.lendacky@....com>,
        "Deucher, Alexander" <alexander.deucher@....com>,
        "Easow, Nimesh" <Nimesh.Easow@....com>,
        "Limonciello, Mario" <mario.limonciello@....com>
Subject: Re: [PATCH v4 2/2] i2c: designware: Add AMD PSP I2C bus support

On 2/10/22 10:18, Jan Dąbroś wrote:
> śr., 9 lut 2022 o 16:28 Andy Shevchenko
> <andriy.shevchenko@...ux.intel.com> napisał(a):
>>
>> On Tue, Feb 08, 2022 at 03:12:18PM +0100, Jan Dabros wrote:
>>
>> ...
>>
>> I have noticed code duplication.
>>
>>> +     status = psp_send_i2c_req(PSP_I2C_REQ_ACQUIRE);
>>> +     if (status) {
>>> +             if (status == -ETIMEDOUT)
>>> +                     dev_err(psp_i2c_dev, "Timed out waiting for PSP to release I2C bus\n");
>>> +             else
>>> +                     dev_err(psp_i2c_dev, "PSP communication error\n");
>>> +
>>> +             dev_err(psp_i2c_dev, "Assume i2c bus is for exclusive host usage\n");
>>> +             psp_i2c_mbox_fail = true;
>>> +             goto cleanup;
>>> +     }
>>
>>> +     /* Send a release command to PSP */
>>> +     status = psp_send_i2c_req(PSP_I2C_REQ_RELEASE);
>>> +     if (status) {
>>> +             if (status == -ETIMEDOUT)
>>> +                     dev_err(psp_i2c_dev, "Timed out waiting for PSP to acquire I2C bus\n");
>>> +             else
>>> +                     dev_err(psp_i2c_dev, "PSP communication error\n");
>>> +
>>> +             dev_err(psp_i2c_dev, "Assume i2c bus is for exclusive host usage\n");
>>> +             psp_i2c_mbox_fail = true;
>>> +             goto cleanup;
>>> +     }
>>
>> If you are going to update the series, consider to introduce a common helper.
>> Otherwise, consider a follow up.
> 
> Thanks for your comment. Since Jarkko is running some long-lasting
> tests with v4 patchset, I would like to keep this as is for now (and
> make a follow up commit). If there will be some additional comments
> for v4 from him and will spin v5 - I will introduce a common helper
> function then.
> 
Test run fine overnight, although I wasn't expecting this breaking 
Baytrail since patch is practically touching only semaphore detection at 
probe time on Baytrail. I'm up to you would you address Andy's comments 
as a follow up or as v5.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ