freebsd-dev/sys/dev/acpica
Ben Widawsky ec60b7f929 acpi/ec: Fix regression caused by r340644
After r340644 there were two things wrong in cases where there is both
an ECDT, and an EC device exposed via acpica. The first is a rather
trivial situation where the device desc would say ECDT even when it was
not implicitly created via ECDT (not really sure why the compiler
doesn't seem to warn about this).

The other more pervasive issue is that the code is designed to
essentially not do anything for EC probe when its uid was already
created an EC based on the ECDT's uid. The issue was that probe would
still return 0 in this case, and so we'd end up with some weird
duplication. Now to be honest, I'm not actually sure what exactly broke,
but it was definitely not working as intended. To fix this, all that is
really needed is to make sure we return ENXIO when we're probing the
device already added for the ECDT entry. While here though, move the
check for this earlier to avoid wasted cycles when we know after
obtaining the uid that it's duplicative.

There remains one questionable bit here which I don't want to touch -
when doing probe for PNP0C09, if acquiring _UID for the device fails, 0
is assumed, which is a valid UID used by the implicit ECDT.

Reported by:	Charlie Li, et al.
Reviewed by:	jhb
Differential Revision:	https://reviews.freebsd.org/D18311
2018-11-26 19:41:13 +00:00
..
Osd remove unneeded inclusion of sys/interrupt.h from several files 2018-07-04 09:07:18 +00:00
acpi_acad.c Distinguish _CID match and _HID match and make lower priority probe 2018-10-26 00:05:46 +00:00
acpi_battery.c Add support for none ACPI battery method batteries 2018-11-23 12:03:01 +00:00
acpi_bus_if.m Add the start of INTRNG support for ACPI. 2018-01-11 17:09:12 +00:00
acpi_button.c Distinguish _CID match and _HID match and make lower priority probe 2018-10-26 00:05:46 +00:00
acpi_cmbat.c Distinguish _CID match and _HID match and make lower priority probe 2018-10-26 00:05:46 +00:00
acpi_container.c Distinguish _CID match and _HID match and make lower priority probe 2018-10-26 00:05:46 +00:00
acpi_cpu.c Distinguish _CID match and _HID match and make lower priority probe 2018-10-26 00:05:46 +00:00
acpi_dock.c
acpi_ec.c acpi/ec: Fix regression caused by r340644 2018-11-26 19:41:13 +00:00
acpi_hpet.c Distinguish _CID match and _HID match and make lower priority probe 2018-10-26 00:05:46 +00:00
acpi_hpet.h Implement userspace gettimeofday(2) with HPET timecounter. 2016-08-17 09:52:09 +00:00
acpi_if.m Distinguish _CID match and _HID match and make lower priority probe 2018-10-26 00:05:46 +00:00
acpi_isab.c Distinguish _CID match and _HID match and make lower priority probe 2018-10-26 00:05:46 +00:00
acpi_lid.c Distinguish _CID match and _HID match and make lower priority probe 2018-10-26 00:05:46 +00:00
acpi_package.c acpica: remove a superfluous NULL check 2017-02-16 20:27:22 +00:00
acpi_pci_link.c Distinguish _CID match and _HID match and make lower priority probe 2018-10-26 00:05:46 +00:00
acpi_pci.c Add a new bus method to fetch device-specific CPU sets. 2016-05-09 20:50:21 +00:00
acpi_pcib_acpi.c Add support for NUMA domains to bus dma tags. This causes all memory 2018-01-12 23:34:16 +00:00
acpi_pcib_pci.c Implement a proper detach method for the PCI-PCI bridge driver. 2016-05-20 00:03:22 +00:00
acpi_pcib.c acpica: rework INTRNG interrupts 2018-11-19 03:02:47 +00:00
acpi_pcibvar.h Add a new bus method to fetch device-specific CPU sets. 2016-05-09 20:50:21 +00:00
acpi_pcivar.h Associate device_t objects with ACPI handles via PCI_CHILD_ADDED(). 2016-04-07 17:15:16 +00:00
acpi_perf.c Remove misc NULL checks after M_WAITOK allocations. 2016-05-10 10:26:07 +00:00
acpi_powerres.c
acpi_quirk.c
acpi_quirks
acpi_resource.c pci_host_generic, acpi_resource: drop unneeded code 2018-11-19 03:34:15 +00:00
acpi_smbat.c Distinguish _CID match and _HID match and make lower priority probe 2018-10-26 00:05:46 +00:00
acpi_smbus.h
acpi_thermal.c Make timespecadd(3) and friends public 2018-07-30 15:46:40 +00:00
acpi_throttle.c
acpi_timer.c Use uintmax_t (typedef'd to rman_res_t type) for rman ranges. 2016-03-18 01:28:41 +00:00
acpi_video.c Silence PVS-Studio warning (V595). 2016-02-23 22:55:44 +00:00
acpi.c acpica, pci_host_generic_acpi: redo pci_host_generic_acpi.c 2018-11-19 03:16:16 +00:00
acpiio.h sys/dev: minor spelling fixes. 2016-05-03 03:41:25 +00:00
acpivar.h acpica: rework INTRNG interrupts 2018-11-19 03:02:47 +00:00