Bluetooth: btmrvl: wait for HOST_SLEEP_ENABLE event in suspend
authorChin-Ran Lo <crlo@marvell.com>
Tue, 1 Jul 2014 21:00:14 +0000 (14:00 -0700)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 3 Jul 2014 15:42:54 +0000 (17:42 +0200)
commit396e04f4bb9afefb0744715dc76d9abe18ee5fb0
tree0492fff5438d6a4b094489e8faa4536cb5d46689
parent4df82b5911c0e380d8b308958f158c3e7b365467
Bluetooth: btmrvl: wait for HOST_SLEEP_ENABLE event in suspend

After BT_CMD_HOST_SLEEP_ENABLE command finishes, driver should
wait until getting BT_EVENT_HOST_SLEEP_ENABLE event to complete
suspend procedure.
Without this patch the suspend handler would return success
earlier. By the time when the BT_EVENT_HOST_SLEEP_ENABLE event
comes in the controller driver could have already turned off the
bus clock. This causes kernel crash or system reboot eventually.

Cc: <stable@vger.kernel.org> # 3.13+
Signed-off-by: Chin-Ran Lo <crlo@marvell.com>
Signed-off-by: Jeff CF Chen <jeffc@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/btmrvl_drv.h
drivers/bluetooth/btmrvl_main.c