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]
Date:   Sat, 11 Mar 2017 00:11:32 +0200
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Hans de Goede <hdegoede@...hat.com>
Cc:     MyungJoo Ham <myungjoo.ham@...sung.com>,
        Chanwoo Choi <cw00.choi@...sung.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Subject: Re: [PATCH 2/2] extcon: int3496: Explicitly set the id pin to direction-input

On Fri, Mar 10, 2017 at 10:52 PM, Hans de Goede <hdegoede@...hat.com> wrote:
> With the new more strict ACPI gpio code the dsdt's IoRestriction
> flags are honored on gpiod_get, but in some dsdt's it is wrong,
> so explicitly call gpiod_direction_input on the id gpio.
>
> This fixes the following errors when the int3496 code is used
> together with the new more strict ACPI gpio code:
>
> [ 2382.484415] gpio gpiochip1: (INT33FF:01): gpiochip_lock_as_irq: tried to flag a GPIO set as output for IRQ
> [ 2382.484425] gpio gpiochip1: (INT33FF:01): unable to lock HW IRQ 3 for IRQ
> [ 2382.484429] genirq: Failed to request resources for INT3496:00 (irq 174) on irqchip chv-gpio
> [ 2382.484518] intel-int3496 INT3496:00: can't request IRQ for USB ID GPIO: -22
> [ 2382.500359] intel-int3496: probe of INT3496:00 failed with error -22

Because my patches are not yet upstreamed I think this would be postponed.
I can take it into my branch and send together with the rest. What do you think?

> --- a/drivers/extcon/extcon-intel-int3496.c
> +++ b/drivers/extcon/extcon-intel-int3496.c
> @@ -113,6 +113,7 @@ static int int3496_probe(struct platform_device *pdev)
>                 dev_err(dev, "can't request USB ID GPIO: %d\n", ret);
>                 return ret;
>         }

It would be nice to check the direction here and complain to the user
loudly the firmware has a bug.

> +       gpiod_direction_input(data->gpio_usb_id);

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ