diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2024-10-01 11:21:37 -0400 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2024-10-04 16:54:25 -0400 |
commit | 610712298b11b2914be00b35abe9326b5dbb62c8 (patch) | |
tree | f880ebd22a2822cbcf91f31d1a33a36fa979b80d /drivers/staging | |
parent | 18fd04ad856df07733f5bb07e7f7168e7443d393 (diff) | |
download | lwn-610712298b11b2914be00b35abe9326b5dbb62c8.tar.gz lwn-610712298b11b2914be00b35abe9326b5dbb62c8.zip |
Bluetooth: btusb: Don't fail external suspend requests
Commit 4e0a1d8b0675
("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: 4e0a1d8b0675 ("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>
Diffstat (limited to 'drivers/staging')
0 files changed, 0 insertions, 0 deletions