linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Revert "Bluetooth: hci_ll: set operational frequency earlier"
@ 2019-10-02 11:46 Adam Ford
  2019-10-02 20:31 ` Sebastian Reichel
  2019-10-16 18:36 ` Marcel Holtmann
  0 siblings, 2 replies; 8+ messages in thread
From: Adam Ford @ 2019-10-02 11:46 UTC (permalink / raw)
  To: linux-bluetooth
  Cc: marcel, johan.hedberg, linux-kernel, adam.ford, sre, Adam Ford

As nice as it would be to update firmware faster, that patch broke
at least two different boards, an OMAP4+WL1285 based Motorola Droid
4, as reported by Sebasian Reichel and the Logic PD i.MX6Q +
WL1837MOD.

This reverts commit a2e02f38eff84f199c8e32359eb213f81f270047.

Signed-off-by: Adam Ford <aford173@gmail.com>

diff --git a/drivers/bluetooth/hci_ll.c b/drivers/bluetooth/hci_ll.c
index 285706618f8a..d9a4c6c691e0 100644
--- a/drivers/bluetooth/hci_ll.c
+++ b/drivers/bluetooth/hci_ll.c
@@ -621,13 +621,6 @@ static int ll_setup(struct hci_uart *hu)
 
 	serdev_device_set_flow_control(serdev, true);
 
-	if (hu->oper_speed)
-		speed = hu->oper_speed;
-	else if (hu->proto->oper_speed)
-		speed = hu->proto->oper_speed;
-	else
-		speed = 0;
-
 	do {
 		/* Reset the Bluetooth device */
 		gpiod_set_value_cansleep(lldev->enable_gpio, 0);
@@ -639,20 +632,6 @@ static int ll_setup(struct hci_uart *hu)
 			return err;
 		}
 
-		if (speed) {
-			__le32 speed_le = cpu_to_le32(speed);
-			struct sk_buff *skb;
-
-			skb = __hci_cmd_sync(hu->hdev,
-					     HCI_VS_UPDATE_UART_HCI_BAUDRATE,
-					     sizeof(speed_le), &speed_le,
-					     HCI_INIT_TIMEOUT);
-			if (!IS_ERR(skb)) {
-				kfree_skb(skb);
-				serdev_device_set_baudrate(serdev, speed);
-			}
-		}
-
 		err = download_firmware(lldev);
 		if (!err)
 			break;
@@ -677,7 +656,25 @@ static int ll_setup(struct hci_uart *hu)
 	}
 
 	/* Operational speed if any */
+	if (hu->oper_speed)
+		speed = hu->oper_speed;
+	else if (hu->proto->oper_speed)
+		speed = hu->proto->oper_speed;
+	else
+		speed = 0;
+
+	if (speed) {
+		__le32 speed_le = cpu_to_le32(speed);
+		struct sk_buff *skb;
 
+		skb = __hci_cmd_sync(hu->hdev, HCI_VS_UPDATE_UART_HCI_BAUDRATE,
+				     sizeof(speed_le), &speed_le,
+				     HCI_INIT_TIMEOUT);
+		if (!IS_ERR(skb)) {
+			kfree_skb(skb);
+			serdev_device_set_baudrate(serdev, speed);
+		}
+	}
 
 	return 0;
 }
-- 
2.17.1


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

* Re: [PATCH] Revert "Bluetooth: hci_ll: set operational frequency earlier"
  2019-10-02 11:46 [PATCH] Revert "Bluetooth: hci_ll: set operational frequency earlier" Adam Ford
@ 2019-10-02 20:31 ` Sebastian Reichel
  2019-10-16 16:19   ` Adam Ford
  2019-10-16 18:36 ` Marcel Holtmann
  1 sibling, 1 reply; 8+ messages in thread
From: Sebastian Reichel @ 2019-10-02 20:31 UTC (permalink / raw)
  To: Adam Ford; +Cc: linux-bluetooth, marcel, johan.hedberg, linux-kernel, adam.ford

[-- Attachment #1: Type: text/plain, Size: 2324 bytes --]

Hi,

On Wed, Oct 02, 2019 at 06:46:26AM -0500, Adam Ford wrote:
> As nice as it would be to update firmware faster, that patch broke
> at least two different boards, an OMAP4+WL1285 based Motorola Droid
> 4, as reported by Sebasian Reichel and the Logic PD i.MX6Q +
> WL1837MOD.
> 
> This reverts commit a2e02f38eff84f199c8e32359eb213f81f270047.
>
> Signed-off-by: Adam Ford <aford173@gmail.com>

Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com>

This should be backported stable

-- Sebastian

> diff --git a/drivers/bluetooth/hci_ll.c b/drivers/bluetooth/hci_ll.c
> index 285706618f8a..d9a4c6c691e0 100644
> --- a/drivers/bluetooth/hci_ll.c
> +++ b/drivers/bluetooth/hci_ll.c
> @@ -621,13 +621,6 @@ static int ll_setup(struct hci_uart *hu)
>  
>  	serdev_device_set_flow_control(serdev, true);
>  
> -	if (hu->oper_speed)
> -		speed = hu->oper_speed;
> -	else if (hu->proto->oper_speed)
> -		speed = hu->proto->oper_speed;
> -	else
> -		speed = 0;
> -
>  	do {
>  		/* Reset the Bluetooth device */
>  		gpiod_set_value_cansleep(lldev->enable_gpio, 0);
> @@ -639,20 +632,6 @@ static int ll_setup(struct hci_uart *hu)
>  			return err;
>  		}
>  
> -		if (speed) {
> -			__le32 speed_le = cpu_to_le32(speed);
> -			struct sk_buff *skb;
> -
> -			skb = __hci_cmd_sync(hu->hdev,
> -					     HCI_VS_UPDATE_UART_HCI_BAUDRATE,
> -					     sizeof(speed_le), &speed_le,
> -					     HCI_INIT_TIMEOUT);
> -			if (!IS_ERR(skb)) {
> -				kfree_skb(skb);
> -				serdev_device_set_baudrate(serdev, speed);
> -			}
> -		}
> -
>  		err = download_firmware(lldev);
>  		if (!err)
>  			break;
> @@ -677,7 +656,25 @@ static int ll_setup(struct hci_uart *hu)
>  	}
>  
>  	/* Operational speed if any */
> +	if (hu->oper_speed)
> +		speed = hu->oper_speed;
> +	else if (hu->proto->oper_speed)
> +		speed = hu->proto->oper_speed;
> +	else
> +		speed = 0;
> +
> +	if (speed) {
> +		__le32 speed_le = cpu_to_le32(speed);
> +		struct sk_buff *skb;
>  
> +		skb = __hci_cmd_sync(hu->hdev, HCI_VS_UPDATE_UART_HCI_BAUDRATE,
> +				     sizeof(speed_le), &speed_le,
> +				     HCI_INIT_TIMEOUT);
> +		if (!IS_ERR(skb)) {
> +			kfree_skb(skb);
> +			serdev_device_set_baudrate(serdev, speed);
> +		}
> +	}
>  
>  	return 0;
>  }
> -- 
> 2.17.1
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH] Revert "Bluetooth: hci_ll: set operational frequency earlier"
  2019-10-02 20:31 ` Sebastian Reichel
@ 2019-10-16 16:19   ` Adam Ford
  0 siblings, 0 replies; 8+ messages in thread
From: Adam Ford @ 2019-10-16 16:19 UTC (permalink / raw)
  To: Sebastian Reichel
  Cc: open list:BLUETOOTH DRIVERS, Marcel Holtmann, Johan Hedberg,
	Linux Kernel Mailing List, Adam Ford

On Wed, Oct 2, 2019 at 3:31 PM Sebastian Reichel <sre@kernel.org> wrote:
>
> Hi,
>
> On Wed, Oct 02, 2019 at 06:46:26AM -0500, Adam Ford wrote:
> > As nice as it would be to update firmware faster, that patch broke
> > at least two different boards, an OMAP4+WL1285 based Motorola Droid
> > 4, as reported by Sebasian Reichel and the Logic PD i.MX6Q +
> > WL1837MOD.
> >
> > This reverts commit a2e02f38eff84f199c8e32359eb213f81f270047.
> >
> > Signed-off-by: Adam Ford <aford173@gmail.com>
>
> Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com>
>
> This should be backported stable

Is there any chance of this getting picked up for the 5.4 kernel?
It's been a couple weeks, and I haven't seen any responses beyond
Sebastian's Ack and request for backport.

adam

>
> -- Sebastian
>
> > diff --git a/drivers/bluetooth/hci_ll.c b/drivers/bluetooth/hci_ll.c
> > index 285706618f8a..d9a4c6c691e0 100644
> > --- a/drivers/bluetooth/hci_ll.c
> > +++ b/drivers/bluetooth/hci_ll.c
> > @@ -621,13 +621,6 @@ static int ll_setup(struct hci_uart *hu)
> >
> >       serdev_device_set_flow_control(serdev, true);
> >
> > -     if (hu->oper_speed)
> > -             speed = hu->oper_speed;
> > -     else if (hu->proto->oper_speed)
> > -             speed = hu->proto->oper_speed;
> > -     else
> > -             speed = 0;
> > -
> >       do {
> >               /* Reset the Bluetooth device */
> >               gpiod_set_value_cansleep(lldev->enable_gpio, 0);
> > @@ -639,20 +632,6 @@ static int ll_setup(struct hci_uart *hu)
> >                       return err;
> >               }
> >
> > -             if (speed) {
> > -                     __le32 speed_le = cpu_to_le32(speed);
> > -                     struct sk_buff *skb;
> > -
> > -                     skb = __hci_cmd_sync(hu->hdev,
> > -                                          HCI_VS_UPDATE_UART_HCI_BAUDRATE,
> > -                                          sizeof(speed_le), &speed_le,
> > -                                          HCI_INIT_TIMEOUT);
> > -                     if (!IS_ERR(skb)) {
> > -                             kfree_skb(skb);
> > -                             serdev_device_set_baudrate(serdev, speed);
> > -                     }
> > -             }
> > -
> >               err = download_firmware(lldev);
> >               if (!err)
> >                       break;
> > @@ -677,7 +656,25 @@ static int ll_setup(struct hci_uart *hu)
> >       }
> >
> >       /* Operational speed if any */
> > +     if (hu->oper_speed)
> > +             speed = hu->oper_speed;
> > +     else if (hu->proto->oper_speed)
> > +             speed = hu->proto->oper_speed;
> > +     else
> > +             speed = 0;
> > +
> > +     if (speed) {
> > +             __le32 speed_le = cpu_to_le32(speed);
> > +             struct sk_buff *skb;
> >
> > +             skb = __hci_cmd_sync(hu->hdev, HCI_VS_UPDATE_UART_HCI_BAUDRATE,
> > +                                  sizeof(speed_le), &speed_le,
> > +                                  HCI_INIT_TIMEOUT);
> > +             if (!IS_ERR(skb)) {
> > +                     kfree_skb(skb);
> > +                     serdev_device_set_baudrate(serdev, speed);
> > +             }
> > +     }
> >
> >       return 0;
> >  }
> > --
> > 2.17.1
> >

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

* Re: [PATCH] Revert "Bluetooth: hci_ll: set operational frequency earlier"
  2019-10-02 11:46 [PATCH] Revert "Bluetooth: hci_ll: set operational frequency earlier" Adam Ford
  2019-10-02 20:31 ` Sebastian Reichel
@ 2019-10-16 18:36 ` Marcel Holtmann
  2019-10-16 18:37   ` Adam Ford
  2019-10-17 17:57   ` Adam Ford
  1 sibling, 2 replies; 8+ messages in thread
From: Marcel Holtmann @ 2019-10-16 18:36 UTC (permalink / raw)
  To: Adam Ford; +Cc: linux-bluetooth, Johan Hedberg, linux-kernel, adam.ford, sre

Hi Adam,

> As nice as it would be to update firmware faster, that patch broke
> at least two different boards, an OMAP4+WL1285 based Motorola Droid
> 4, as reported by Sebasian Reichel and the Logic PD i.MX6Q +
> WL1837MOD.
> 
> This reverts commit a2e02f38eff84f199c8e32359eb213f81f270047.
> 
> Signed-off-by: Adam Ford <aford173@gmail.com>

patch has been applied to bluetooth-next tree.

Regards

Marcel


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

* Re: [PATCH] Revert "Bluetooth: hci_ll: set operational frequency earlier"
  2019-10-16 18:36 ` Marcel Holtmann
@ 2019-10-16 18:37   ` Adam Ford
  2019-10-17 17:57   ` Adam Ford
  1 sibling, 0 replies; 8+ messages in thread
From: Adam Ford @ 2019-10-16 18:37 UTC (permalink / raw)
  To: Marcel Holtmann
  Cc: open list:BLUETOOTH DRIVERS, Johan Hedberg,
	Linux Kernel Mailing List, Adam Ford, Sebastian Reichel

On Wed, Oct 16, 2019 at 1:36 PM Marcel Holtmann <marcel@holtmann.org> wrote:
>
> Hi Adam,
>
> > As nice as it would be to update firmware faster, that patch broke
> > at least two different boards, an OMAP4+WL1285 based Motorola Droid
> > 4, as reported by Sebasian Reichel and the Logic PD i.MX6Q +
> > WL1837MOD.
> >
> > This reverts commit a2e02f38eff84f199c8e32359eb213f81f270047.
> >
> > Signed-off-by: Adam Ford <aford173@gmail.com>
>
> patch has been applied to bluetooth-next tree.

Thank you very much!

adam
>
> Regards
>
> Marcel
>

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

* Re: [PATCH] Revert "Bluetooth: hci_ll: set operational frequency earlier"
  2019-10-16 18:36 ` Marcel Holtmann
  2019-10-16 18:37   ` Adam Ford
@ 2019-10-17 17:57   ` Adam Ford
  2019-10-23 12:38     ` Adam Ford
  1 sibling, 1 reply; 8+ messages in thread
From: Adam Ford @ 2019-10-17 17:57 UTC (permalink / raw)
  To: Marcel Holtmann
  Cc: open list:BLUETOOTH DRIVERS, Johan Hedberg,
	Linux Kernel Mailing List, Adam Ford, Sebastian Reichel

On Wed, Oct 16, 2019 at 1:36 PM Marcel Holtmann <marcel@holtmann.org> wrote:
>
> Hi Adam,
>
> > As nice as it would be to update firmware faster, that patch broke
> > at least two different boards, an OMAP4+WL1285 based Motorola Droid
> > 4, as reported by Sebasian Reichel and the Logic PD i.MX6Q +
> > WL1837MOD.
> >
> > This reverts commit a2e02f38eff84f199c8e32359eb213f81f270047.
> >
> > Signed-off-by: Adam Ford <aford173@gmail.com>
>
> patch has been applied to bluetooth-next tree.

Any change this can get pushed upstream to stable?  (including 5.4?)

adam
>
> Regards
>
> Marcel
>

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

* Re: [PATCH] Revert "Bluetooth: hci_ll: set operational frequency earlier"
  2019-10-17 17:57   ` Adam Ford
@ 2019-10-23 12:38     ` Adam Ford
  2019-10-23 12:43       ` Marcel Holtmann
  0 siblings, 1 reply; 8+ messages in thread
From: Adam Ford @ 2019-10-23 12:38 UTC (permalink / raw)
  To: Marcel Holtmann
  Cc: open list:BLUETOOTH DRIVERS, Johan Hedberg,
	Linux Kernel Mailing List, Adam Ford, Sebastian Reichel

On Thu, Oct 17, 2019 at 12:57 PM Adam Ford <aford173@gmail.com> wrote:
>
> On Wed, Oct 16, 2019 at 1:36 PM Marcel Holtmann <marcel@holtmann.org> wrote:
> >
> > Hi Adam,
> >
> > > As nice as it would be to update firmware faster, that patch broke
> > > at least two different boards, an OMAP4+WL1285 based Motorola Droid
> > > 4, as reported by Sebasian Reichel and the Logic PD i.MX6Q +
> > > WL1837MOD.
> > >
> > > This reverts commit a2e02f38eff84f199c8e32359eb213f81f270047.
> > >
> > > Signed-off-by: Adam Ford <aford173@gmail.com>
> >
> > patch has been applied to bluetooth-next tree.
>
> Any change this can get pushed upstream to stable?  (including 5.4?)
>

Marcel,  I have confirmed this revert also fixes a regression on my
omap36xx based device using a wl1283 Bluetooth.  At this point, I
believe we've identified at least 3 devices with regressions that this
revert fixes.

adam
> adam
> >
> > Regards
> >
> > Marcel
> >

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

* Re: [PATCH] Revert "Bluetooth: hci_ll: set operational frequency earlier"
  2019-10-23 12:38     ` Adam Ford
@ 2019-10-23 12:43       ` Marcel Holtmann
  0 siblings, 0 replies; 8+ messages in thread
From: Marcel Holtmann @ 2019-10-23 12:43 UTC (permalink / raw)
  To: Adam Ford
  Cc: open list:BLUETOOTH DRIVERS, Johan Hedberg,
	Linux Kernel Mailing List, Adam Ford, Sebastian Reichel

Hi Adam,

>>>> As nice as it would be to update firmware faster, that patch broke
>>>> at least two different boards, an OMAP4+WL1285 based Motorola Droid
>>>> 4, as reported by Sebasian Reichel and the Logic PD i.MX6Q +
>>>> WL1837MOD.
>>>> 
>>>> This reverts commit a2e02f38eff84f199c8e32359eb213f81f270047.
>>>> 
>>>> Signed-off-by: Adam Ford <aford173@gmail.com>
>>> 
>>> patch has been applied to bluetooth-next tree.
>> 
>> Any change this can get pushed upstream to stable?  (including 5.4?)
>> 
> 
> Marcel,  I have confirmed this revert also fixes a regression on my
> omap36xx based device using a wl1283 Bluetooth.  At this point, I
> believe we've identified at least 3 devices with regressions that this
> revert fixes.

as soon as we have done our pull request and this is in Linus’ tree, feel free to suggest it for -stable tree inclusion.

Regards

Marcel


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

end of thread, other threads:[~2019-10-23 12:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-02 11:46 [PATCH] Revert "Bluetooth: hci_ll: set operational frequency earlier" Adam Ford
2019-10-02 20:31 ` Sebastian Reichel
2019-10-16 16:19   ` Adam Ford
2019-10-16 18:36 ` Marcel Holtmann
2019-10-16 18:37   ` Adam Ford
2019-10-17 17:57   ` Adam Ford
2019-10-23 12:38     ` Adam Ford
2019-10-23 12:43       ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).