]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r314328:
authorhselasky <hselasky@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 14 Mar 2017 15:56:19 +0000 (15:56 +0000)
committerhselasky <hselasky@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 14 Mar 2017 15:56:19 +0000 (15:56 +0000)
commitafeeba840813ea5bd825a51b56fcaf4e10227a16
treedc2ebfa2ecd32139768ab3e6e552b9a01bcfa519
parent71d54a853d1148ea1e6f1b222606ee0763bfce30
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/10@315264 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/dev/acpica/acpi_cmbat.c