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: <241a8d75-c0d7-0045-49ee-22072e8588b8@gmail.com>
Date:   Mon, 8 Mar 2021 17:43:30 +0100
From:   Maximilian Luz <luzmaximilian@...il.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     Mika Westerberg <mika.westerberg@...ux.intel.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Daniel Scally <djrscally@...il.com>,
        linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Revert "pinctrl: intel: Split
 intel_pinctrl_add_padgroups() for better maintenance"

On 3/8/21 5:31 PM, Andy Shevchenko wrote:
> On Mon, Mar 08, 2021 at 05:35:59PM +0200, Andy Shevchenko wrote:
>> On Mon, Mar 08, 2021 at 04:25:05PM +0100, Maximilian Luz wrote:
>>> Following commit 036e126c72eb ("pinctrl: intel: Split
>>> intel_pinctrl_add_padgroups() for better maintenance"),
>>> gpiochip_get_desc() is broken on some Kaby Lake R devices (specifically
>>> a Microsoft Surface Book 2), returning -EINVAL for GPIOs that in reality
>>> should be there (they are defined in ACPI and have been accessible
>>> previously). Due to this, gpiod_get() fails with -ENOENT.
>>>
>>> Reverting this commit fixes that issue and the GPIOs in question are
>>> accessible again.
>>
>> I would like to have more information.
>> Can you enable PINCTRL and GPIO debug options in the kernel, and show dmesg
>> output (when kernel command line has 'ignore_loglevel' option) for both working
>> and non-working cases?
>>
>> Also if it's possible to have DSDT.dsl of the device in question along with
>> output of `grep -H 15 /sys/bus/acpi/devices/*/status`.
>>
>>> There is probably a better option than straight up reverting this, so
>>> consider this more of a bug-report.
>>
>> Indeed.
> 
> 
> Can you test if the below helps (probably you have to apply it by editing
> the file manually):
> 
> --- a/drivers/pinctrl/intel/pinctrl-intel.c
> +++ b/drivers/pinctrl/intel/pinctrl-intel.c
> @@ -1392,6 +1392,7 @@ static int intel_pinctrl_add_padgroups_by_size(struct intel_pinctrl *pctrl,
>   	gpps[i].size = min(gpp_size, npins);
>   	npins -= gpps[i].size;
>   
> +	gpps[i].gpio_base = gpps[i].base;
>   	gpps[i].padown_num = padown_num;
>   
> 

That does fix the issue! Thanks for the fast response and fix!

Regards,
Max

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ