From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A9733C3A5A1 for ; Mon, 19 Aug 2019 11:31:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 88E7720851 for ; Mon, 19 Aug 2019 11:31:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727512AbfHSLbI (ORCPT ); Mon, 19 Aug 2019 07:31:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46488 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727419AbfHSLbI (ORCPT ); Mon, 19 Aug 2019 07:31:08 -0400 Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 73D8ECF20 for ; Mon, 19 Aug 2019 11:31:07 +0000 (UTC) Received: by mail-ed1-f69.google.com with SMTP id l15so1913015edw.15 for ; Mon, 19 Aug 2019 04:31:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=bliPZUwt3rw3R1LnKj87BgdlVnLez+wpqoT9LgfLIh4=; b=Dm5pR4EWL35TwY69XTBgY5pfQsdPnDt1ylxv25qFmg5O0xX0huKdH5OfBac/fHdTwi zwnUAKehPUSOSzEYTOx0kxFCqpkxCVq56ug2Dzkw/9bA34/uf8GmyqJks8ZC/Yfh57Mf c00FDHi9W21gOlCsoLbltT/9nrZ/d7EIHvosC4Lb+znLCqEnrr+MNFCTkyzeldj4EmJb m8WrmXKP5jkvJBzo9w2a3J7RjN6bGw44fTm9gFocS/TEnnqMroUINtiUdkoovFinQFP/ /CuM7/nNGc+D8IUyyA47quAfEj9BmDD8ZcWDsS3/Ec6eJ/F5crIyEtmvjYwXUovwsozy dXiw== X-Gm-Message-State: APjAAAXSTLIr7PKqUIjjVs4bD6JJcUGMIY7kL0Xul0MThYRWnBwzIkOi Xh5QECb0/53LgjhtKNdTDKrv3orWqFfvqMtW/Zt0zSKg3DkwaE1mAJNCwaknl0greuKFTr/gW0t XLU0bgEAuFbYORJgP6JvSEama X-Received: by 2002:a05:6402:1846:: with SMTP id v6mr21352817edy.31.1566214266168; Mon, 19 Aug 2019 04:31:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqwtB82lEWaRANjYOKWEnVE1pjT1fpZpl0OyDkfWNLhxyA5ZSHpuDoLi9/cM3/4ooLELFN4wzA== X-Received: by 2002:a05:6402:1846:: with SMTP id v6mr21352788edy.31.1566214265926; Mon, 19 Aug 2019 04:31:05 -0700 (PDT) Received: from shalem.localdomain (84-106-84-65.cable.dynamic.v4.ziggo.nl. [84.106.84.65]) by smtp.gmail.com with ESMTPSA id i23sm2728772edv.11.2019.08.19.04.31.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 19 Aug 2019 04:31:05 -0700 (PDT) Subject: Re: [PATCH v2] Skip deferred request irqs for devices known to fail To: Ian W MORRISON , 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 References: <20190819112637.29943-1-ianwmorrison@gmail.com> From: Hans de Goede Message-ID: <1bd012ca-9b2f-78c3-abb1-6b5680add404@redhat.com> Date: Mon, 19 Aug 2019 13:31:04 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190819112637.29943-1-ianwmorrison@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi All, On 19-08-19 13:26, 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 > Reviewed-by: Hans de Goede > Reviewed-by: Andy Shevchenko Erm, you cannot just add someone's Reviewed-by tag because they have looked at the patch, you are only supposed to do that when the reviewer actually puts that in his reply, then you can copy the line and add it to your commit msg. Please drop these. Also I might be able to get my hands on a Minix Neo Z83-4 myself in a couple of days and then I can try to reproduce this, so lets wait a bit for that and see how that goes. Regards, Hans > --- > drivers/gpio/gpiolib-acpi.c | 33 +++++++++++++++++++++++++++------ > 1 file changed, 27 insertions(+), 6 deletions(-) > > diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c > index fdee8afa5339..f6c3dcdc91c9 100644 > --- a/drivers/gpio/gpiolib-acpi.c > +++ b/drivers/gpio/gpiolib-acpi.c > @@ -13,6 +13,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -20,6 +21,17 @@ > #include "gpiolib.h" > #include "gpiolib-acpi.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 > * > @@ -1273,19 +1285,28 @@ bool acpi_can_fallback_to_crs(struct acpi_device *adev, const char *con_id) > return con_id == NULL; > } > > -/* Run deferred acpi_gpiochip_request_irqs() */ > +/* > + * 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) > + return 0; > + else { > + 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; > } >