Created attachment 204618 [details] acpi_dock(4): Notify devd(8) on dock status change patch If devd(8) is running, it notifies devd(8) when the computer is docked and undocked. Original patch taken from: https://people.freebsd.org/~iwasaki/acpi/acpi_dock_devd-20080204.diff Tested personally on my Thinkpad X220 with Ultrabase Docking station. Are there any other changes required? Thanks.
Looks unobjectionable to me.
It would be nice to document this in devd.conf(5).
Created attachment 204619 [details] devd.conf(5): Document the Dock subsystem patch Hi, I've added another patch to document it in devd.conf(5). Thanks.
(In reply to Muhammad Kaisar Arkhan from comment #3) Thanks. I applied the patches to my tree. A couple more comments: - Please use tabs for indentation next time. The style(9) man page documents the kernel coding style. Admittedly, some of the ACPI code does not follow it very well. - Why do you check for a running devd? Other ACPI subsystems don't bother. The event message is non-blocking and we will simply free the message if devd isn't running. We save some unnecessary work by checking first, but I'd rather be consistent with the rest of the kernel unless there's a good reason here.
Created attachment 204738 [details] acpi_dock(4): Notify devd(8) on dock status change I've merged both patches into one and applied your suggestions. Thanks :)
A commit references this bug: Author: markj Date: Fri May 31 15:44:34 UTC 2019 New revision: 348459 URL: https://svnweb.freebsd.org/changeset/base/348459 Log: acpi_dock(4): Notify devd(8) on dock status change. PR: 238138 Submitted by: Muhammad Kaisar Arkhan <hi@yukiisbo.red> MFC after: 2 weeks Changes: head/sbin/devd/devd.conf.5 head/sys/dev/acpica/acpi_dock.c
A commit references this bug: Author: markj Date: Mon Jun 17 15:11:55 UTC 2019 New revision: 349140 URL: https://svnweb.freebsd.org/changeset/base/349140 Log: MFC r348459: acpi_dock(4): Notify devd(8) on dock status change. PR: 238138 Changes: _U stable/12/ stable/12/sbin/devd/devd.conf.5 stable/12/sys/dev/acpica/acpi_dock.c
Thanks for the patch.