linux-stable/drivers/bluetooth
Hans de Goede b09c61522c Revert "Bluetooth: hci_bcm: Streamline runtime PM code"
This reverts commit 43fff76834 ("Bluetooth: hci_bcm: Streamline runtime
PM code"). The commit msg for this commit states "No functional change
intended.", but replacing:

 pm_runtime_get();
 pm_runtime_mark_last_busy();
 pm_runtime_put_autosuspend();

with:

 pm_request_resume();

Does result in a functional change, pm_request_resume() only calls
pm_runtime_mark_last_busy() if the device was suspended before the call.

This results in the following happening:

1) Device is runtime suspended
2) Device drives host_wake IRQ logically high as it starts receiving data
3) bcm_host_wake() gets called, causes the device to runtime-resume,
   current time gets marked as last_busy time
4) After 5 seconds the autosuspend timer expires and the dev autosuspends
   as no one has been calling pm_runtime_mark_last_busy(), the device was
   resumed during those 5 seconds, so all the pm_request_resume() calls
   while receiving data and/or bcm_host_wake() calls were nops
5) If 4) happens while the device has (just received) data in its buffer to
   be read by the host the IRQ line is *already* / still logically high
   when we autosuspend and since we use an edge triggered IRQ, the IRQ
   will never trigger, causing the device to get stuck in suspend

Therefor this commit has to be reverted, so that we avoid the device
getting stuck in suspend.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2018-03-15 19:39:37 +01:00
..
ath3k.c Bluetooth: Style fix - align block comments 2017-07-22 08:39:39 +02:00
bcm203x.c Bluetooth: mark expected switch fall-throughs 2017-10-14 09:25:51 +02:00
bfusb.c networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
bluecard_cs.c Bluetooth: Fix a possible sleep-in-atomic bug in bluecard_write_wakeup 2017-12-13 14:38:59 +01:00
bpa10x.c Bluetooth: bpa10x: make array 'req' static, shrinks object size 2018-01-08 21:44:22 +01:00
bt3c_cs.c Bluetooth: Use bt_dev_err and bt_dev_info when possible 2017-10-30 12:25:45 +02:00
btbcm.c Bluetooth: btbcm: Add entry for BCM4343A0 UART bluetooth 2018-01-18 10:24:38 +01:00
btbcm.h Bluetooth: btbcm: Fix sleep mode struct ordering 2018-01-10 19:00:14 +01:00
btintel.c Bluetooth: btintel: Create common function for firmware download 2018-01-25 09:28:40 +01:00
btintel.h Bluetooth: btintel: Create common function for firmware download 2018-01-25 09:28:40 +01:00
btmrvl_debugfs.c Bluetooth: btmrvl add firmware dump support 2014-12-03 17:35:51 +01:00
btmrvl_drv.h Bluetooth: btmrvl: drop duplicate header slab.h 2016-12-08 07:44:56 +01:00
btmrvl_main.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-07-05 12:31:59 -07:00
btmrvl_sdio.c Bluetooth: btmrvl: *_err() and *_info() strings should end with newlines 2017-10-06 20:35:47 +02:00
btmrvl_sdio.h btmrvl: add platform specific wakeup interrupt support 2016-05-02 19:26:15 +02:00
btqca.c Bluetooth: Use bt_dev_err and bt_dev_info when possible 2017-10-30 12:25:45 +02:00
btqca.h Bluetooth: btqca: Introduce generic QCA ROME support 2015-08-10 23:52:20 +02:00
btqcomsmd.c Bluetooth: btqcomsmd: Fix skb double free corruption 2017-12-13 00:28:41 +01:00
btrtl.c Bluetooth: Use bt_dev_err and bt_dev_info when possible 2017-10-30 12:25:45 +02:00
btrtl.h Bluetooth: btrtl: Create separate module for Realtek BT driver 2015-05-14 12:04:12 +02:00
btsdio.c Bluetooth: btsdio: Do not bind to non-removable BCM43341 2017-12-13 00:28:41 +01:00
btuart_cs.c Bluetooth: Style fix - align block comments 2017-07-22 08:39:39 +02:00
btusb.c Bluetooth: btusb: Fix quirk for Atheros 1525/QCA6174 2018-03-15 19:39:15 +01:00
btwilink.c Bluetooth: Style fix - align block comments 2017-07-22 08:39:39 +02:00
dtl1_cs.c networking: add and use skb_put_u8() 2017-06-16 11:48:40 -04:00
hci_ag6xx.c Bluetooth: hci_uart: Add diag and address support for Intel/AG6xx 2016-02-29 19:25:22 +02:00
hci_ath.c Bluetooth: Use bt_dev_err and bt_dev_info when possible 2017-10-30 12:25:45 +02:00
hci_bcm.c Revert "Bluetooth: hci_bcm: Streamline runtime PM code" 2018-03-15 19:39:37 +01:00
hci_bcsp.c Bluetooth: Convert timers to use timer_setup() 2017-10-06 20:37:11 +02:00
hci_h4.c Bluetooth: Use bt_dev_err and bt_dev_info when possible 2017-10-30 12:25:45 +02:00
hci_h5.c Bluetooth: Convert timers to use timer_setup() 2017-10-06 20:37:11 +02:00
hci_intel.c Bluetooth: btintel: Create common function for firmware download 2018-01-25 09:28:40 +01:00
hci_ldisc.c the rest of drivers/*: annotate ->poll() instances 2017-11-28 11:06:58 -05:00
hci_ll.c Bluetooth: hci_ll: add "ti,cc2560" compatible string 2017-12-13 09:38:34 +01:00
hci_mrvl.c networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
hci_nokia.c Bluetooth: hci_nokia: Use new hci_uart_unregister_device() function 2017-07-20 11:18:36 +02:00
hci_qca.c Bluetooth: hci_qca: Avoid setup failure on missing rampatch 2017-12-13 00:28:40 +01:00
hci_serdev.c Bluetooth: hci_serdev: Init hci_uart proto_lock to avoid oops 2017-12-13 00:28:41 +01:00
hci_uart.h Bluetooth: hci_ldisc: Allow sleeping while proto locks are held. 2017-10-29 14:03:28 +01:00
hci_vhci.c vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
Kconfig Bluetooth: Depend on rather than select GPIOLIB 2018-01-08 21:44:22 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00