Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2578538ybl; Mon, 19 Aug 2019 04:28:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqzsF8Y4vlz14B763qdG5tHDt0mHb8DGwRNhmezzVi7SuQvRTd0db3DvciWuvzGqV9RFQTGT X-Received: by 2002:a17:902:f213:: with SMTP id gn19mr22088704plb.152.1566214102672; Mon, 19 Aug 2019 04:28:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566214102; cv=none; d=google.com; s=arc-20160816; b=pzbQiKEwD+QgGj9Y8ZCQ9g15XqRxQRx09yGx09JLbdwMux24aomlUP4qaE8ZWJN9MO WKAPZOw9i0NQG3gtERwlk1bND4AgqWQM1BgjGqOeasm3hPuO5VNi7i0rMUX8uWIUDALK jUqTSzSw1jXUch/hs6/nZbKjGMIo6uoV9GdrJjDXTaMTBTLQZMa8fUd0xT9J5FTcU+Fz CuOcU5o5OdyaRcZkNx9oki7SV6wjBhjUBUBtjMe0xNb7DA/uwU6PMxCc5PGNsAoVOIUN mhM3q6QHnd8NkTy3nC2oRUvpqmZ3dzM8v5bCvV4Nw04hEFl3CZy4K4wTbkbyzAEPljp+ I7mA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=vRVye6B8XFgwGVUEF0GcA194DZPYgp0SHGUoR6zegFI=; b=IPqeb288bjPezESxWV8Gd2/LI96RvdHfpx8TXvdtV4Mh9TRxuaCBCplsXnYKs+Hj+x pFR0U/JTVqquXb9wpjYSwKeqWprbbyoch8mF7h7RXEzxwbSyLh/lTipoBahU/Y5ertbs HNytdPSe65HL4qcTnCKvqREAAC28UwRaYpfO2bse4riF4HEX18O+j2Mypm5fX7hCxNvZ ymRH3gj3n5hnsFsFaw4ADjd9QsXZ6S8LFdQyM/Ma7KO+yArs/ImJ8Qfn6im0krYz454l zLSaO4XI4RH2kJPLqXJwUaq5hVquO8A9XyVUF03cLYswrXcINxjsne1671AAp1bg17Nd iZSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=eoOeXs46; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s187si10058597pfb.92.2019.08.19.04.28.08; Mon, 19 Aug 2019 04:28:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=eoOeXs46; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727544AbfHSL1A (ORCPT + 99 others); Mon, 19 Aug 2019 07:27:00 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:39659 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727308AbfHSL07 (ORCPT ); Mon, 19 Aug 2019 07:26:59 -0400 Received: by mail-pg1-f193.google.com with SMTP id u17so1053607pgi.6; Mon, 19 Aug 2019 04:26:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=vRVye6B8XFgwGVUEF0GcA194DZPYgp0SHGUoR6zegFI=; b=eoOeXs46jigQlSjUrPijc/oAUBkYCMh5h7wy7K5rCwFMCI6NX5c67Ftrq7DQTgNEYA rhi6pWmJ5wOab8uC9xZ60knm73pwug1ubUJMCgbe7BdN4k1fXliPgHEnzR4mUFSkWLJD NOmdvihYR1oLgfDoHKMYrzC3xG6cacVYOabtrv8imr9G2I0nK57rf0i3nh2WEr2/wTOn sF5SSNdCz1QC0wihKUP46q7IailDx74HUxS6VDxAJp9SmWLSChgz73DEkX153UQyAeIa fwRkZwhx/JOA4l0QMpZ4n7p018JBE6g9pJmPelQXbDKwAD/2U0eObhWrL7T1LNy9k1Vh Mb4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=vRVye6B8XFgwGVUEF0GcA194DZPYgp0SHGUoR6zegFI=; b=PHhZKsenuZ8VDfaRm4iwVLt+8Qn5qJF8ULrcYeSczlstt0ChQ+eQRh7nezoNZG1abm Ty+8WaiUWmWkwWzCkHNe9QKlaaeka68N0Q+JVKBKfpuw88+1z3EvsZ8n3LM8gm7gYU1f 6nyuZv8CDwC4j8I3ASjvhMs3Q91KlQiIMFLSJCbI04pISYL6BkTEAQKZ6drGGetN9OE3 iqlUKeQjP/NL+WNZmjBlgcG7gxtQt+fsEaQucMZFz+nX/J03vrToXLHxaktF5TAd7i3s JiJPm8+Tj2OkrgDIPKTs+a2p4/wgGVQnl1bleHCy9HVo01iX8znW5H0rFiZC7dF7wXif 9IoQ== X-Gm-Message-State: APjAAAV/noRaT2NJnyl9cfnPhJSqa7OtZQ59831L910ommbrKK6naZOm yDPEll/sk1aXhOFJKap82cI= X-Received: by 2002:a63:194f:: with SMTP id 15mr19939402pgz.382.1566214018788; Mon, 19 Aug 2019 04:26:58 -0700 (PDT) Received: from localhost.localdomain ([58.173.144.54]) by smtp.googlemail.com with ESMTPSA id br18sm13826091pjb.20.2019.08.19.04.26.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Aug 2019 04:26:58 -0700 (PDT) From: Ian W MORRISON To: benjamin.tissoires@redhat.com, hdegoede@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, Ian W MORRISON Subject: [PATCH v2] Skip deferred request irqs for devices known to fail Date: Mon, 19 Aug 2019 21:26:37 +1000 Message-Id: <20190819112637.29943-1-ianwmorrison@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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; } -- 2.17.1