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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Sep 2014 16:19:22 +0000 (09:19 -0700)
commit247640a32c08cb65dcbcab98721497e41796e58f
tree8299e64be59c9c482180a0825556f38f058096e5
parent30f6a1fb4287de9dce822012bd4da1fbdf00cd73
Bluetooth: btmrvl: wait for HOST_SLEEP_ENABLE event in suspend

commit 396e04f4bb9afefb0744715dc76d9abe18ee5fb0 upstream.

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.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/bluetooth/btmrvl_drv.h
drivers/bluetooth/btmrvl_main.c