Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Nov 2018 21:02:01 -0800
From:      Ben Widawsky <bwidawsk@freebsd.org>
To:        Samy Mahmoudi <samy.mahmoudi@gmail.com>
Cc:        matias@pizarro.net, freebsd-current@freebsd.org
Subject:   Re: ACPI Error: No handler for Region [ECOR]
Message-ID:  <20181123050201.63kv32vnjomkeqid@smtp.freebsd.org>
In-Reply-To: <CAFigVTNNJ9hiTCCd4Jq0uC9f7mQrMv74onne65k2ptvMsSdbAQ@mail.gmail.com>
References:  <75fb681f321cd2913f17e8eceffa4cb9@pizarro.net> <CAFigVTMrcm%2B84EBiJg5cKgoN=-D6z_c=EqEQZ=bNsWR0i4Av4Q@mail.gmail.com> <CAFigVTNNJ9hiTCCd4Jq0uC9f7mQrMv74onne65k2ptvMsSdbAQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Thanks both of you. Here's another shot at roughly the same thing I asked the
first reporter to try (that patch was wrong). If it doesn't work, can you please
post the dmesg?

diff --git a/sys/dev/acpica/acpi_ec.c b/sys/dev/acpica/acpi_ec.c
index a21dbc963af..666aba2b3c8 100644
--- a/sys/dev/acpica/acpi_ec.c
+++ b/sys/dev/acpica/acpi_ec.c
@@ -362,7 +362,8 @@ acpi_ec_probe(device_t dev)
 	    ret = 0;

 	goto out;
-    }
+    } else
+	ecdt = 0;

     ret = ACPI_ID_PROBE(device_get_parent(dev), dev, ec_ids, NULL);
     if (ret > 0)
@@ -382,6 +383,17 @@ acpi_ec_probe(device_t dev)
     if (ACPI_FAILURE(status))
 	params->uid = 0;

+    /*
+     * Check for a duplicate probe. This can happen when a probe via ECDT
+     * succeeded already. If this is a duplicate, disable this device.
+     */
+    peer = devclass_get_device(acpi_ec_devclass, params->uid);
+    if (peer && device_is_alive(peer)) {
+	device_disable(dev);
+	ret = ENXIO;
+	goto out;
+    }
+
     status = acpi_GetInteger(h, "_GLK", &params->glk);
     if (ACPI_FAILURE(status))
 	params->glk = 0;
@@ -422,16 +434,6 @@ acpi_ec_probe(device_t dev)
     /* Store the values we got from the namespace for attach. */
     acpi_set_private(dev, params);

-    /*
-     * Check for a duplicate probe. This can happen when a probe via ECDT
-     * succeeded already. If this is a duplicate, disable this device.
-     */
-    peer = devclass_get_device(acpi_ec_devclass, params->uid);
-    if (peer == NULL || !device_is_alive(peer))
-	ret = 0;
-    else
-	device_disable(dev);
-
     if (buf.Pointer)
 	AcpiOsFree(buf.Pointer);
 out:


On 18-11-21 17:08:15, Samy Mahmoudi wrote:
> Hi again,
> 
> Please find the requested files:
> 
> http://imp.ovh/18.2.0/acpidump_-dt_output
> http://imp.ovh/18.2.0/acpi_ec_values
> http://imp.ovh/18.2.0/dmesg_output
> 
> Best regards,
> Samy
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20181123050201.63kv32vnjomkeqid>