Bluetooth: btusb: Fix not being able to reconnect after suspend

This partially reverts 81b3e33bb054 ("Bluetooth: btusb: Don't fail
external suspend requests") as it introduced a call to hci_suspend_dev
that assumes the system-suspend which doesn't work well when just the
device is being suspended because wakeup flag is only set for remote
devices that can wakeup the system.

Reported-by: Rafael J. Wysocki <rafael@kernel.org>
Reported-by: Heiner Kallweit <hkallweit1@gmail.com>
Reported-by: Kenneth Crudup <kenny@panix.com>
Fixes: 610712298b11 ("Bluetooth: btusb: Don't fail external suspend requests")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tested-by: Rafael J. Wysocki <rafael@kernel.org>

Changed files
-14
drivers
bluetooth
-14
drivers/bluetooth/btusb.c
··· 4038 4038 static int btusb_suspend(struct usb_interface *intf, pm_message_t message) 4039 4039 { 4040 4040 struct btusb_data *data = usb_get_intfdata(intf); 4041 - int err; 4042 4041 4043 4042 BT_DBG("intf %p", intf); 4044 4043 ··· 4050 4051 if (data->suspend_count++) 4051 4052 return 0; 4052 4053 4053 - /* Notify Host stack to suspend; this has to be done before stopping 4054 - * the traffic since the hci_suspend_dev itself may generate some 4055 - * traffic. 4056 - */ 4057 - err = hci_suspend_dev(data->hdev); 4058 - if (err) { 4059 - data->suspend_count--; 4060 - return err; 4061 - } 4062 - 4063 4054 spin_lock_irq(&data->txlock); 4064 4055 if (!(PMSG_IS_AUTO(message) && data->tx_in_flight)) { 4065 4056 set_bit(BTUSB_SUSPENDING, &data->flags); ··· 4057 4068 } else { 4058 4069 spin_unlock_irq(&data->txlock); 4059 4070 data->suspend_count--; 4060 - hci_resume_dev(data->hdev); 4061 4071 return -EBUSY; 4062 4072 } 4063 4073 ··· 4176 4188 clear_bit(BTUSB_SUSPENDING, &data->flags); 4177 4189 spin_unlock_irq(&data->txlock); 4178 4190 schedule_work(&data->work); 4179 - 4180 - hci_resume_dev(data->hdev); 4181 4191 4182 4192 return 0; 4183 4193