]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC r314328:
authorhselasky <hselasky@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 14 Mar 2017 15:57:21 +0000 (15:57 +0000)
committerhselasky <hselasky@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 14 Mar 2017 15:57:21 +0000 (15:57 +0000)
commitb8a5c90c0dad8400d7daf4cb3d028c3a8b4f2ba2
tree3c3a7f2bf6a917bf60f812de775622538d697fec
parent65f1a74c40717cca6ac545bc45b98f29995b724f
MFC r314328:

Fix startup race initialising ACPI CM battery structures on MacBookPro.

During acpi_cmbat_attach() the acpi_cmbat_init_battery() notification
handler is registered. It has been observed this notification handler
can be called instantly, before the attach routine has returned. In
the notification handler there is a call to device_is_attached() which
returns false. Because the softc is set we know an attach is in
progress and the fix is simply to wait and try again in this case.

Reviewed by: avg @

git-svn-id: svn://svn.freebsd.org/base/stable/9@315265 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/dev/acpica/acpi_cmbat.c