linux/drivers/bluetooth
Luiz Augusto von Dentz 610712298b Bluetooth: btusb: Don't fail external suspend requests
Commit 4e0a1d8b06
("Bluetooth: btusb: Don't suspend when there are connections")
introduces a check for connections to prevent auto-suspend but that
actually ignored the fact the .suspend callback can be called for
external suspend requests which
Documentation/driver-api/usb/power-management.rst states the following:

 'External suspend calls should never be allowed to fail in this way,
 only autosuspend calls.  The driver can tell them apart by applying
 the :c:func:`PMSG_IS_AUTO` macro to the message argument to the
 ``suspend`` method; it will return True for internal PM events
 (autosuspend) and False for external PM events.'

In addition to that align system suspend with USB suspend by using
hci_suspend_dev since otherwise the stack would be expecting events
such as advertising reports which may not be delivered while the
transport is suspended.

Fixes: 4e0a1d8b06 ("Bluetooth: btusb: Don't suspend when there are connections")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tested-by: Kiran K <kiran.k@intel.com>
2024-10-04 16:54:25 -04:00
..
ath3k.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
bcm203x.c
bfusb.c
bluecard_cs.c
bpa10x.c
bt3c_cs.c
btbcm.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
btbcm.h
btintel.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
btintel.h
btintel_pcie.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
btintel_pcie.h
btmrvl_debugfs.c
btmrvl_drv.h
btmrvl_main.c
btmrvl_sdio.c
btmrvl_sdio.h
btmtk.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
btmtk.h
btmtksdio.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
btmtkuart.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
btnxpuart.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
btqca.c
btqca.h
btqcomsmd.c
btrsi.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
btrtl.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
btrtl.h
btsdio.c
btusb.c Bluetooth: btusb: Don't fail external suspend requests 2024-10-04 16:54:25 -04:00
dtl1_cs.c
h4_recv.h move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
hci_ag6xx.c
hci_aml.c
hci_ath.c
hci_bcm.c
hci_bcm4377.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
hci_bcsp.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
hci_h4.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
hci_h5.c
hci_intel.c
hci_ldisc.c
hci_ll.c
hci_mrvl.c
hci_nokia.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
hci_qca.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
hci_serdev.c
hci_uart.h
hci_vhci.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
Kconfig
Makefile
virtio_bt.c