All of lore.kernel.org
 help / color / mirror / Atom feed
* [BUG] Bluetooth broken post rc7
@ 2011-07-15  3:18 Ed Tomlinson
  2011-07-15 10:11 ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 6+ messages in thread
From: Ed Tomlinson @ 2011-07-15  3:18 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-bluetooth, Gustavo F. Padovan, Ilia Kolomisnky, David Miller

Hi,

I booted to todays linux git and bluetooth is no longer working.  My magic mouse will not connect correctly.

Reverting: 

commit 9fa7e4f76f3658ba1f44fbdb95c77e7df3f53f95
Author: Gustavo F. Padovan <padovan@profusion.mobi>
Date:   Thu Jun 30 16:11:30 2011 -0300

    Bluetooth: Fix regression with incoming L2CAP connections
    
    PTS test A2DP/SRC/SRC_SET/TC_SRC_SET_BV_02_I revealed that
    ( probably after the df3c3931e commit ) the l2cap connection
    could not be established in case when the "Auth Complete" HCI
    event does not arive before the initiator send "Configuration
    request", in which case l2cap replies with "Command rejected"
    since the channel is still in BT_CONNECT2 state.
    
    Based on patch from: Ilia Kolomisnky <iliak@ti.com>
    
    Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>

Fixes the bug here (things work like rc7).

Do we really need 9fa7e4f76f3658ba1f44fbdb95c77e7df3f53f95 in 3.0?

Thanks,

Ed Tomlinson

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

* Re: [BUG] Bluetooth broken post rc7
  2011-07-15  3:18 [BUG] Bluetooth broken post rc7 Ed Tomlinson
@ 2011-07-15 10:11 ` Luiz Augusto von Dentz
  2011-07-15 11:28   ` Ed Tomlinson
  0 siblings, 1 reply; 6+ messages in thread
From: Luiz Augusto von Dentz @ 2011-07-15 10:11 UTC (permalink / raw)
  To: Ed Tomlinson
  Cc: linux-kernel, linux-bluetooth, Gustavo F. Padovan,
	Ilia Kolomisnky, David Miller

Hi,

On Fri, Jul 15, 2011 at 6:18 AM, Ed Tomlinson <edt@aei.ca> wrote:
> Hi,
>
> I booted to todays linux git and bluetooth is no longer working.  My magic mouse will not connect correctly.
>
> Reverting:
>
> commit 9fa7e4f76f3658ba1f44fbdb95c77e7df3f53f95
> Author: Gustavo F. Padovan <padovan@profusion.mobi>
> Date:   Thu Jun 30 16:11:30 2011 -0300
>
>    Bluetooth: Fix regression with incoming L2CAP connections
>
>    PTS test A2DP/SRC/SRC_SET/TC_SRC_SET_BV_02_I revealed that
>    ( probably after the df3c3931e commit ) the l2cap connection
>    could not be established in case when the "Auth Complete" HCI
>    event does not arive before the initiator send "Configuration
>    request", in which case l2cap replies with "Command rejected"
>    since the channel is still in BT_CONNECT2 state.
>
>    Based on patch from: Ilia Kolomisnky <iliak@ti.com>
>
>    Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
>
> Fixes the bug here (things work like rc7).
>
> Do we really need 9fa7e4f76f3658ba1f44fbdb95c77e7df3f53f95 in 3.0?
>
> Thanks,
>
> Ed Tomlinson
> --

I've changed the check to something like this:

diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index ebff14c..f88b9c8 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -2323,8 +2323,7 @@ static inline int l2cap_config_req(struct
l2cap_conn *conn, struct l2cap_cmd_hdr

        sk = chan->sk;

-       if ((bt_sk(sk)->defer_setup && sk->sk_state != BT_CONNECT2) ||
-                (!bt_sk(sk)->defer_setup && sk->sk_state != BT_CONFIG)) {
+       if ((sk->sk_state != BT_CONNECT2) && (sk->sk_state != BT_CONFIG)) {
                struct l2cap_cmd_rej rej;

                rej.reason = cpu_to_le16(0x0002);

Seems to work fine.

-- 
Luiz Augusto von Dentz

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

* Re: [BUG] Bluetooth broken post rc7
  2011-07-15 10:11 ` Luiz Augusto von Dentz
@ 2011-07-15 11:28   ` Ed Tomlinson
  2011-07-16 19:43     ` Jiri Kosina
  0 siblings, 1 reply; 6+ messages in thread
From: Ed Tomlinson @ 2011-07-15 11:28 UTC (permalink / raw)
  To: Luiz Augusto von Dentz
  Cc: linux-kernel, linux-bluetooth, Gustavo F. Padovan,
	Ilia Kolomisnky, David Miller

On Friday 15 July 2011 06:11:04 Luiz Augusto von Dentz wrote:
> Hi,
> 
> On Fri, Jul 15, 2011 at 6:18 AM, Ed Tomlinson <edt@aei.ca> wrote:
> > Hi,
> >
> > I booted to todays linux git and bluetooth is no longer working.  My magic mouse will not connect correctly.
> >
> > Reverting:
> >
> > commit 9fa7e4f76f3658ba1f44fbdb95c77e7df3f53f95
> > Author: Gustavo F. Padovan <padovan@profusion.mobi>
> > Date:   Thu Jun 30 16:11:30 2011 -0300
> >
> >    Bluetooth: Fix regression with incoming L2CAP connections
> >
> >    PTS test A2DP/SRC/SRC_SET/TC_SRC_SET_BV_02_I revealed that
> >    ( probably after the df3c3931e commit ) the l2cap connection
> >    could not be established in case when the "Auth Complete" HCI
> >    event does not arive before the initiator send "Configuration
> >    request", in which case l2cap replies with "Command rejected"
> >    since the channel is still in BT_CONNECT2 state.
> >
> >    Based on patch from: Ilia Kolomisnky <iliak@ti.com>
> >
> >    Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
> >
> > Fixes the bug here (things work like rc7).
> >
> > Do we really need 9fa7e4f76f3658ba1f44fbdb95c77e7df3f53f95 in 3.0?
> >
> > Thanks,
> >
> > Ed Tomlinson
> > --
> 
> I've changed the check to something like this:
> 
> diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
> index ebff14c..f88b9c8 100644
> --- a/net/bluetooth/l2cap_core.c
> +++ b/net/bluetooth/l2cap_core.c
> @@ -2323,8 +2323,7 @@ static inline int l2cap_config_req(struct
> l2cap_conn *conn, struct l2cap_cmd_hdr
> 
>         sk = chan->sk;
> 
> -       if ((bt_sk(sk)->defer_setup && sk->sk_state != BT_CONNECT2) ||
> -                (!bt_sk(sk)->defer_setup && sk->sk_state != BT_CONFIG)) {
> +       if ((sk->sk_state != BT_CONNECT2) && (sk->sk_state != BT_CONFIG)) {
>                 struct l2cap_cmd_rej rej;
> 
>                 rej.reason = cpu_to_le16(0x0002);
> 
> Seems to work fine.

And here too.  You can can my tested by
 
Tested By: Ed Tomlinson <edt@aei.ca>

IMHO this should be in 3.0.0

Thanks!
Ed Tomlinson


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

* Re: [BUG] Bluetooth broken post rc7
  2011-07-15 11:28   ` Ed Tomlinson
@ 2011-07-16 19:43     ` Jiri Kosina
  2011-07-16 20:17       ` David Miller
  0 siblings, 1 reply; 6+ messages in thread
From: Jiri Kosina @ 2011-07-16 19:43 UTC (permalink / raw)
  To: Ed Tomlinson
  Cc: Luiz Augusto von Dentz, linux-kernel, linux-bluetooth,
	Gustavo F. Padovan, Ilia Kolomisnky, David Miller,
	Linus Torvalds


[ adding Linus to CC ... would be good to have this fixed before 3.0-final 
  indeed ]

On Fri, 15 Jul 2011, Ed Tomlinson wrote:

> > > I booted to todays linux git and bluetooth is no longer working.  
> > > My magic mouse will not connect correctly.
> > >
> > > Reverting:
> > >
> > > commit 9fa7e4f76f3658ba1f44fbdb95c77e7df3f53f95
> > > Author: Gustavo F. Padovan <padovan@profusion.mobi>
> > > Date:   Thu Jun 30 16:11:30 2011 -0300
> > >
> > >    Bluetooth: Fix regression with incoming L2CAP connections
> > >
> > >    PTS test A2DP/SRC/SRC_SET/TC_SRC_SET_BV_02_I revealed that
> > >    ( probably after the df3c3931e commit ) the l2cap connection
> > >    could not be established in case when the "Auth Complete" HCI
> > >    event does not arive before the initiator send "Configuration
> > >    request", in which case l2cap replies with "Command rejected"
> > >    since the channel is still in BT_CONNECT2 state.
> > >
> > >    Based on patch from: Ilia Kolomisnky <iliak@ti.com>
> > >
> > >    Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
> > >
> > > Fixes the bug here (things work like rc7).
> > >
> > > Do we really need 9fa7e4f76f3658ba1f44fbdb95c77e7df3f53f95 in 3.0?
> > >
> > > Thanks,
> > >
> > > Ed Tomlinson
> > > --
> > 
> > I've changed the check to something like this:
> > 
> > diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
> > index ebff14c..f88b9c8 100644
> > --- a/net/bluetooth/l2cap_core.c
> > +++ b/net/bluetooth/l2cap_core.c
> > @@ -2323,8 +2323,7 @@ static inline int l2cap_config_req(struct
> > l2cap_conn *conn, struct l2cap_cmd_hdr
> > 
> >         sk = chan->sk;
> > 
> > -       if ((bt_sk(sk)->defer_setup && sk->sk_state != BT_CONNECT2) ||
> > -                (!bt_sk(sk)->defer_setup && sk->sk_state != BT_CONFIG)) {
> > +       if ((sk->sk_state != BT_CONNECT2) && (sk->sk_state != BT_CONFIG)) {
> >                 struct l2cap_cmd_rej rej;
> > 
> >                 rej.reason = cpu_to_le16(0x0002);
> > 
> > Seems to work fine.
> 
> And here too.  You can can my tested by
>  
> Tested By: Ed Tomlinson <edt@aei.ca>
> 
> IMHO this should be in 3.0.0
> 
> Thanks!
> Ed Tomlinson

Luiz,

could you please repost the patch with proper changelog and your 
Signed-off-by, so that it could (hopefully) be applied for 3.0 still?

Thanks,

-- 
Jiri Kosina
SUSE Labs


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

* Re: [BUG] Bluetooth broken post rc7
  2011-07-16 19:43     ` Jiri Kosina
@ 2011-07-16 20:17       ` David Miller
  2011-07-19 18:58         ` Pavan Savoy
  0 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2011-07-16 20:17 UTC (permalink / raw)
  To: jkosina
  Cc: edt, luiz.dentz, linux-kernel, linux-bluetooth, padovan, iliak, torvalds

From: Jiri Kosina <jkosina@suse.cz>
Date: Sat, 16 Jul 2011 21:43:06 +0200 (CEST)

> could you please repost the patch with proper changelog and your 
> Signed-off-by, so that it could (hopefully) be applied for 3.0 still?

It's already in my networking tree and on the way to Linus, and has
been so for half a day.

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

* Re: [BUG] Bluetooth broken post rc7
  2011-07-16 20:17       ` David Miller
@ 2011-07-19 18:58         ` Pavan Savoy
  0 siblings, 0 replies; 6+ messages in thread
From: Pavan Savoy @ 2011-07-19 18:58 UTC (permalink / raw)
  To: David Miller
  Cc: jkosina, edt, luiz.dentz, linux-kernel, linux-bluetooth, padovan,
	iliak, torvalds

On Sat, Jul 16, 2011 at 3:17 PM, David Miller <davem@davemloft.net> wrote:
> From: Jiri Kosina <jkosina@suse.cz>
> Date: Sat, 16 Jul 2011 21:43:06 +0200 (CEST)
>
>> could you please repost the patch with proper changelog and your
>> Signed-off-by, so that it could (hopefully) be applied for 3.0 still?
>
> It's already in my networking tree and on the way to Linus, and has
> been so for half a day.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

I can't seem to get BNEP working, and I have a feeling it has got to
do something with this patch.
I actually hit the error condition NULL @ [ 8882.843017] chan->scid 64
[ 8882.845977] Bluetooth: parent is NULL
[ 8882.850067] conn e53e5e00, code 0x03, ident 0x66, len 8
[ 8882.855895] code 0x03
[ 8882.858581] hci0: type 2 len 21

which is at +//
parent->sk_data_ready(parent, 0);
+                                       if (parent) {
+                                               BT_ERR("hitting condition @\
+                                               %d", __LINE__);
+                                               parent->sk_data_ready(parent,
+                                               0);
+                                       } else {
+                                               BT_ERR("parent is NULL");
+                                       }

my l2cap_config_req does say this now,
@@ -2524,7 +2525,7 @@ static inline int l2cap_config_req(struct
l2cap_conn *conn, struct l2cap_cmd_hdr

        sk = chan->sk;

-       if (chan->state != BT_CONFIG) {
+       if (chan->state != BT_CONFIG && sk->sk_state != BT_CONNECT2) {
                struct l2cap_cmd_rej rej;


However, I can seem to connect because of the following reason,
[ 8887.914703] l2cap_chan_timeout: reason: 110
[ 8887.919342] chan e26fc800 state 6 socket cfc38a00
[ 8887.924560] conn e53e5e00, code 0x03, ident 0x66, len 8
[ 8887.930328] code 0x03
[ 8887.932830] chan e26fc800 state 8
[ 8887.936614] chan e26fc800, conn e53e5e00, err 110
[ 8887.941925] hci0: type 2 len 21
[ 8891.047576] hcon d44c7000 reason 19
[ 8891.051666] hcon d44c7000 conn e53e5e00, err 104
[ 8942.897979] chan e26fc800 state 9 socket cfc38a00


Any suggestions ??

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

end of thread, other threads:[~2011-07-19 18:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-15  3:18 [BUG] Bluetooth broken post rc7 Ed Tomlinson
2011-07-15 10:11 ` Luiz Augusto von Dentz
2011-07-15 11:28   ` Ed Tomlinson
2011-07-16 19:43     ` Jiri Kosina
2011-07-16 20:17       ` David Miller
2011-07-19 18:58         ` Pavan Savoy

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.