Commit 6107122
committed
Bluetooth: btusb: Don't fail external suspend requests
Commit 4e0a1d8
("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: 4e0a1d8 ("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>1 parent 18fd04a commit 6107122
1 file changed
+18
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4038 | 4038 | | |
4039 | 4039 | | |
4040 | 4040 | | |
| 4041 | + | |
4041 | 4042 | | |
4042 | 4043 | | |
4043 | 4044 | | |
4044 | | - | |
4045 | | - | |
| 4045 | + | |
| 4046 | + | |
| 4047 | + | |
| 4048 | + | |
4046 | 4049 | | |
4047 | 4050 | | |
4048 | 4051 | | |
4049 | 4052 | | |
4050 | 4053 | | |
| 4054 | + | |
| 4055 | + | |
| 4056 | + | |
| 4057 | + | |
| 4058 | + | |
| 4059 | + | |
| 4060 | + | |
| 4061 | + | |
| 4062 | + | |
| 4063 | + | |
4051 | 4064 | | |
4052 | 4065 | | |
4053 | 4066 | | |
4054 | 4067 | | |
4055 | 4068 | | |
4056 | 4069 | | |
4057 | 4070 | | |
| 4071 | + | |
4058 | 4072 | | |
4059 | 4073 | | |
4060 | 4074 | | |
| |||
4175 | 4189 | | |
4176 | 4190 | | |
4177 | 4191 | | |
| 4192 | + | |
| 4193 | + | |
4178 | 4194 | | |
4179 | 4195 | | |
4180 | 4196 | | |
| |||
0 commit comments