From: Hans de Goede <hdegoede@redhat.com>
To: Ian W MORRISON <ianwmorrison@gmail.com>,
benjamin.tissoires@redhat.com, mika.westerberg@linux.intel.com,
andriy.shevchenko@linux.intel.com, linus.walleij@linaro.org,
bgolaszewski@baylibre.com
Cc: linux-gpio@vger.kernel.org, linux-acpi@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] Skip deferred request irqs for devices known to fail
Date: Fri, 22 Mar 2019 15:45:23 +0100 [thread overview]
Message-ID: <b5a7b895-e08d-f432-8606-4d8c776d4a8a@redhat.com> (raw)
In-Reply-To: <20190322110515.21499-1-ianwmorrison@gmail.com>
Hi,
On 3/22/19 12:05 PM, Ian W MORRISON wrote:
> Patch ca876c7483b6 "gpiolib-acpi: make sure we trigger edge events at
> least once on boot" causes the MINIX family of mini PCs to fail to boot
> resulting in a "black screen".
>
> This patch excludes MINIX devices from executing this trigger in order
> to successfully boot.
>
> Cc: stable@vger.kernel.org
> Signed-off-by: Ian W MORRISON <ianwmorrison@gmail.com>
IMHO we need to root-cause this problem a bit more before applying this
kludge.
Can you provide an ACPI dump of one of the affected machines ?
Regards,
Hans
> ---
> drivers/gpio/gpiolib-acpi.c | 28 +++++++++++++++++++++++-----
> 1 file changed, 23 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c
> index 259cf6ab969b..8d855dc9b020 100644
> --- a/drivers/gpio/gpiolib-acpi.c
> +++ b/drivers/gpio/gpiolib-acpi.c
> @@ -16,9 +16,21 @@
> #include <linux/interrupt.h>
> #include <linux/mutex.h>
> #include <linux/pinctrl/pinctrl.h>
> +#include <linux/dmi.h>
>
> #include "gpiolib.h"
>
> +static const struct dmi_system_id skip_deferred_request_irqs_table[] = {
> + {
> + .ident = "MINIX Z83-4",
> + .matches = {
> + DMI_EXACT_MATCH(DMI_SYS_VENDOR, "MINIX"),
> + DMI_MATCH(DMI_PRODUCT_NAME, "Z83-4"),
> + },
> + },
> + {}
> +};
> +
> /**
> * struct acpi_gpio_event - ACPI GPIO event handler data
> *
> @@ -1219,18 +1231,24 @@ bool acpi_can_fallback_to_crs(struct acpi_device *adev, const char *con_id)
> }
>
> /* Run deferred acpi_gpiochip_request_irqs() */
> +/* but exclude devices known to fail */
> static int acpi_gpio_handle_deferred_request_irqs(void)
> {
> struct acpi_gpio_chip *acpi_gpio, *tmp;
> + const struct dmi_system_id *dmi_id;
>
> - mutex_lock(&acpi_gpio_deferred_req_irqs_lock);
> - list_for_each_entry_safe(acpi_gpio, tmp,
> + dmi_id = dmi_first_match(skip_deferred_request_irqs_table);
> +
> + if (! dmi_id) {
> + mutex_lock(&acpi_gpio_deferred_req_irqs_lock);
> + list_for_each_entry_safe(acpi_gpio, tmp,
> &acpi_gpio_deferred_req_irqs_list,
> deferred_req_irqs_list_entry)
> - acpi_gpiochip_request_irqs(acpi_gpio);
> + acpi_gpiochip_request_irqs(acpi_gpio);
>
> - acpi_gpio_deferred_req_irqs_done = true;
> - mutex_unlock(&acpi_gpio_deferred_req_irqs_lock);
> + acpi_gpio_deferred_req_irqs_done = true;
> + mutex_unlock(&acpi_gpio_deferred_req_irqs_lock);
> + }
>
> return 0;
> }
>
next prev parent reply other threads:[~2019-03-22 14:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-22 11:05 Ian W MORRISON
2019-03-22 11:42 ` Andy Shevchenko
2019-03-22 14:45 ` Hans de Goede [this message]
[not found] ` <CAFXWsS9UYYz0HaYPgLAUZ0OaUE9gb25bT0+PSuexY9Nn05rY8Q@mail.gmail.com>
2019-08-18 18:59 ` Hans de Goede
2019-08-19 11:35 ` Ian W MORRISON
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b5a7b895-e08d-f432-8606-4d8c776d4a8a@redhat.com \
--to=hdegoede@redhat.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=benjamin.tissoires@redhat.com \
--cc=bgolaszewski@baylibre.com \
--cc=ianwmorrison@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®