Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Bluetooth: btusb: Fix atheros firmware download error

Move usb_autopm_get_interface() ahead of setup_on_usb() to prevent
device from sending usb control message in usb suspend mode.

The error message is as below:

[ 83.944103] btusb 1-2:1.1: usb_suspend_interface: status 0
[ 83.944107] btusb 1-2:1.0: usb_suspend_interface: status 0
[ 83.960132] usb 1-2: usb auto-suspend, wakeup 0
[ 83.976156] usb 1-2: usb_suspend_device: status 0
[ 83.976162] usb 1-2: usb_suspend_both: status 0
[ 298.689106] Bluetooth: hci0
[ 298.689399] Bluetooth: hci0: Failed to access otp area (-113)

Signed-off-by: Ethan Hsieh <ethan.hsieh@canonical.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>

authored by

Ethan Hsieh and committed by
Marcel Holtmann
c7e163fe 1b422066

+4 -4
+4 -4
drivers/bluetooth/btusb.c
··· 1043 1043 1044 1044 BT_DBG("%s", hdev->name); 1045 1045 1046 + err = usb_autopm_get_interface(data->intf); 1047 + if (err < 0) 1048 + return err; 1049 + 1046 1050 /* Patching USB firmware files prior to starting any URBs of HCI path 1047 1051 * It is more safe to use USB bulk channel for downloading USB patch 1048 1052 */ ··· 1055 1051 if (err < 0) 1056 1052 return err; 1057 1053 } 1058 - 1059 - err = usb_autopm_get_interface(data->intf); 1060 - if (err < 0) 1061 - return err; 1062 1054 1063 1055 data->intf->needs_remote_wakeup = 1; 1064 1056