freebsd-nq/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
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
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
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
acpi_pcib_acpi.c
acpi_pcib_pci.c
acpi_pcib.c acpica: rework INTRNG interrupts 2018-11-19 03:02:47 +00:00
acpi_pcibvar.h
acpi_pcivar.h
acpi_perf.c
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
acpi_video.c
acpi.c acpica, pci_host_generic_acpi: redo pci_host_generic_acpi.c 2018-11-19 03:16:16 +00:00
acpiio.h
acpivar.h acpica: rework INTRNG interrupts 2018-11-19 03:02:47 +00:00