]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC r314328:
authorhselasky <hselasky@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 14 Mar 2017 15:58:01 +0000 (15:58 +0000)
committerhselasky <hselasky@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 14 Mar 2017 15:58:01 +0000 (15:58 +0000)
commitc5c5881979378a64ecf935ee2f1ebf2a3788ee1a
tree15da72247e4a3957f1d71a20e601a275326311a3
parenta9258b482b785911dcd7d1725e0d7cb1b1503042
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/8@315266 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/dev/acpica/acpi_cmbat.c