All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: btusb: Fix atheros firmware download error
@ 2016-10-06  6:44 Ethan Hsieh
  2016-10-06 10:17 ` Marcel Holtmann
  0 siblings, 1 reply; 4+ messages in thread
From: Ethan Hsieh @ 2016-10-06  6:44 UTC (permalink / raw)
  To: linux-bluetooth, Marcel Holtmann; +Cc: Ethan Hsieh

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>
---
 drivers/bluetooth/btusb.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 8896233..2f633df 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -1043,6 +1043,10 @@ static int btusb_open(struct hci_dev *hdev)

        BT_DBG("%s", hdev->name);

+       err = usb_autopm_get_interface(data->intf);
+       if (err < 0)
+               return err;
+
        /* Patching USB firmware files prior to starting any URBs of HCI path
         * It is more safe to use USB bulk channel for downloading USB patch
         */
@@ -1052,10 +1056,6 @@ static int btusb_open(struct hci_dev *hdev)
                        return err;
        }

-       err = usb_autopm_get_interface(data->intf);
-       if (err < 0)
-               return err;
-
        data->intf->needs_remote_wakeup = 1;

        if (test_and_set_bit(BTUSB_INTR_RUNNING, &data->flags))

-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Bluetooth: btusb: Fix atheros firmware download error
  2016-10-06  6:44 [PATCH] Bluetooth: btusb: Fix atheros firmware download error Ethan Hsieh
@ 2016-10-06 10:17 ` Marcel Holtmann
  0 siblings, 0 replies; 4+ messages in thread
From: Marcel Holtmann @ 2016-10-06 10:17 UTC (permalink / raw)
  To: Ethan Hsieh; +Cc: linux-bluetooth

Hi Ethan,

> 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>
> ---
> drivers/bluetooth/btusb.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)

the patch does not apply. Please send one that actually applies against bluetooth-next tree.

Regards

Marcel


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Bluetooth: btusb: Fix atheros firmware download error
  2016-10-07  4:06 Ethan Hsieh
@ 2016-10-07  7:41 ` Marcel Holtmann
  0 siblings, 0 replies; 4+ messages in thread
From: Marcel Holtmann @ 2016-10-07  7:41 UTC (permalink / raw)
  To: Ethan Hsieh; +Cc: linux-bluetooth

Hi Ethan,

> 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>
> ---
> drivers/bluetooth/btusb.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] Bluetooth: btusb: Fix atheros firmware download error
@ 2016-10-07  4:06 Ethan Hsieh
  2016-10-07  7:41 ` Marcel Holtmann
  0 siblings, 1 reply; 4+ messages in thread
From: Ethan Hsieh @ 2016-10-07  4:06 UTC (permalink / raw)
  To: linux-bluetooth

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>
---
 drivers/bluetooth/btusb.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 8896233..2f633df 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -1043,6 +1043,10 @@ static int btusb_open(struct hci_dev *hdev)
 
 	BT_DBG("%s", hdev->name);
 
+	err = usb_autopm_get_interface(data->intf);
+	if (err < 0)
+		return err;
+
 	/* Patching USB firmware files prior to starting any URBs of HCI path
 	 * It is more safe to use USB bulk channel for downloading USB patch
 	 */
@@ -1052,10 +1056,6 @@ static int btusb_open(struct hci_dev *hdev)
 			return err;
 	}
 
-	err = usb_autopm_get_interface(data->intf);
-	if (err < 0)
-		return err;
-
 	data->intf->needs_remote_wakeup = 1;
 
 	if (test_and_set_bit(BTUSB_INTR_RUNNING, &data->flags))
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-10-07  7:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-06  6:44 [PATCH] Bluetooth: btusb: Fix atheros firmware download error Ethan Hsieh
2016-10-06 10:17 ` Marcel Holtmann
2016-10-07  4:06 Ethan Hsieh
2016-10-07  7:41 ` Marcel Holtmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.