Linux bluetooth development
 help / color / mirror / Atom feed
* Re: double Connect req: psm 1 scid 0x0040 ?
From: Andrei Emeltchenko @ 2010-06-16 14:14 UTC (permalink / raw)
  To: Ed Tsang; +Cc: Marcel Holtmann, Bluettooth Linux, liejuntao001
In-Reply-To: <497946.31108.qm@web52603.mail.re2.yahoo.com>

On Wed, Jun 16, 2010 at 4:39 PM, Ed Tsang <netdesign_98@yahoo.com> wrote:
> Anrel, =A0what kernel version are you using?
> Previously it was happening with a Blackberry on 2.6.31-17. I was plannin=
g to dig into it, then I upgraded my ubuntu with (2.6.32-22) and the proble=
m disappeared. I am guessing it might be a raising condition with certain p=
hone during certain circumstance. I think Liejun Tao <liejuntao001@gmail.co=
m> has investigate this one too.

I guess that new kernel have different timing. This condition is not
easy to get as several packets have milliseconds between each other
...

We are using kernel 2.6.32-xx and it is a bit different since several
patches which fixes kernel crashes are not yet in bluez ...

Regards,
Andrei Emeltchenko
MeeGo Devices

>
> Cheers,
> Ed
>
>
>
> ----- Original Message ----
> From: Andrei Emeltchenko <andrei.emeltchenko.news@gmail.com>
> To: Marcel Holtmann <marcel@holtmann.org>
> Cc: Ed Tsang <netdesign_98@yahoo.com>; Bluettooth Linux <linux-bluetooth@=
vger.kernel.org>
> Sent: Wed, June 16, 2010 6:21:55 AM
> Subject: Re: double Connect req: psm 1 scid 0x0040 ?
>
> Hi,
>
> On Wed, Feb 3, 2010 at 6:07 PM, Marcel Holtmann <marcel@holtmann.org> wro=
te:
>>> >> In hcidump I seem to see a problem in #3. After the Encrypt Change t=
here seem to be 2 >con. req. psm 1 scid 0x0040
>>>
>>> >what kernel version is this? I think we fixed that already.
>>> It is a ubutunu distribution. 2.6.31-17-generic.
>>
>> can you test with a 2.6.33-rc6 vanilla kernel. I really thing this got
>> fixed and you might see a side effect or bad patch here.
>
> Marcel we are seeing "double L2CAP connect also" when connecting to
> some smartphones using contran profile. What about following patch
> proposal:
>
> The idea is to use existing flag L2CAP_CONF_CONNECT_PEND to mark that
> L2CAP request has been sent.
>
> Currently it is durty hack, I will send modified patch later today.
>
> diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
> index fc81acb..27bff6e 100644
> --- a/net/bluetooth/l2cap.c
> +++ b/net/bluetooth/l2cap.c
> @@ -394,6 +394,12 @@ static void l2cap_do_start(struct sock *sk)
>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0l2cap_pi(sk)->ident =3D l2=
cap_get_ident(conn);
>
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (l2cap_pi(sk)->conf_stat=
e &
> L2CAP_CONF_CONNECT_PEND) {
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 printk(KERN=
_ERR "\n!!! %s: Connection
> pending !!!\n", __FUNCTION__);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 return;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 }
> +
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 l2cap_pi(sk)->conf_state |=
=3D L2CAP_CONF_CONNECT_PEND;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0l2cap_send_cmd(conn, l2cap=
_pi(sk)->ident,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0L2CAP_CONN_REQ, sizeof(req), &req);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0}
> @@ -448,6 +454,13 @@ static void l2cap_conn_start(struct l2cap_conn *conn=
)
>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0l2cap_pi(s=
k)->ident =3D l2cap_get_ident(conn);
>
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (l2cap_p=
i(sk)->conf_state &
> L2CAP_CONF_CONNECT_PEND) {
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A0 printk(KERN_ERR "\n!!! %s:
> Connection pending !!!\n", __FUNCTION__);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A0 bh_unlock_sock(sk);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A0 continue;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 }
> +
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 l2cap_pi(sk=
)->conf_state |=3D
> L2CAP_CONF_CONNECT_PEND;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0l2cap_send=
_cmd(conn, l2cap_pi(sk)->ident,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0L2CAP_CONN_REQ, sizeof(req), &req);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0}
> @@ -3809,6 +3822,7 @@ static int l2cap_security_cfm(struct hci_conn
> *hcon, u8 status, u8 encrypt)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0bh_lock_sock(sk);
>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (l2cap_pi(sk)->conf_state & L2CAP_CONF_=
CONNECT_PEND) {
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 printk(KERN_ERR "\n!!! %s: =
Connection pending
> !!!\n", __FUNCTION__);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0bh_unlock_sock(sk);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0continue;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0}
> @@ -3828,6 +3842,7 @@ static int l2cap_security_cfm(struct hci_conn
> *hcon, u8 status, u8 encrypt)
>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0l2cap_pi(s=
k)->ident =3D l2cap_get_ident(conn);
>
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 l2cap_pi(sk=
)->conf_state |=3D
> L2CAP_CONF_CONNECT_PEND;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0l2cap_send=
_cmd(conn, l2cap_pi(sk)->ident,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0L2CAP_CONN_REQ, sizeof(req), &req);
>
>
>
>>
>> Regards
>>
>> Marcel
>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-bluetoot=
h" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at =A0http://vger.kernel.org/majordomo-info.html
>>
>
>
>
>

^ permalink raw reply

* Re: double Connect req: psm 1 scid 0x0040 ?
From: Ed Tsang @ 2010-06-16 13:39 UTC (permalink / raw)
  To: Andrei Emeltchenko, Marcel Holtmann; +Cc: Bluettooth Linux, liejuntao001
In-Reply-To: <AANLkTikNH3_CC3OottoqMnZEwu4sbqvchFxZ2Q7-GlRZ@mail.gmail.com>

Anrel,  what kernel version are you using?
Previously it was happening with a Blackberry on 2.6.31-17. I was planning to dig into it, then I upgraded my ubuntu with (2.6.32-22) and the problem disappeared. I am guessing it might be a raising condition with certain phone during certain circumstance. I think Liejun Tao <liejuntao001@gmail.com> has investigate this one too.

Cheers,
Ed



----- Original Message ----
From: Andrei Emeltchenko <andrei.emeltchenko.news@gmail.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: Ed Tsang <netdesign_98@yahoo.com>; Bluettooth Linux <linux-bluetooth@vger.kernel.org>
Sent: Wed, June 16, 2010 6:21:55 AM
Subject: Re: double Connect req: psm 1 scid 0x0040 ?

Hi,

On Wed, Feb 3, 2010 at 6:07 PM, Marcel Holtmann <marcel@holtmann.org> wrote:
>> >> In hcidump I seem to see a problem in #3. After the Encrypt Change there seem to be 2 >con. req. psm 1 scid 0x0040
>>
>> >what kernel version is this? I think we fixed that already.
>> It is a ubutunu distribution. 2.6.31-17-generic.
>
> can you test with a 2.6.33-rc6 vanilla kernel. I really thing this got
> fixed and you might see a side effect or bad patch here.

Marcel we are seeing "double L2CAP connect also" when connecting to
some smartphones using contran profile. What about following patch
proposal:

The idea is to use existing flag L2CAP_CONF_CONNECT_PEND to mark that
L2CAP request has been sent.

Currently it is durty hack, I will send modified patch later today.

diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index fc81acb..27bff6e 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -394,6 +394,12 @@ static void l2cap_do_start(struct sock *sk)

                        l2cap_pi(sk)->ident = l2cap_get_ident(conn);

+                       if (l2cap_pi(sk)->conf_state &
L2CAP_CONF_CONNECT_PEND) {
+                               printk(KERN_ERR "\n!!! %s: Connection
pending !!!\n", __FUNCTION__);
+                               return;
+                       }
+
+                       l2cap_pi(sk)->conf_state |= L2CAP_CONF_CONNECT_PEND;
                        l2cap_send_cmd(conn, l2cap_pi(sk)->ident,
                                        L2CAP_CONN_REQ, sizeof(req), &req);
                }
@@ -448,6 +454,13 @@ static void l2cap_conn_start(struct l2cap_conn *conn)

                                l2cap_pi(sk)->ident = l2cap_get_ident(conn);

+                               if (l2cap_pi(sk)->conf_state &
L2CAP_CONF_CONNECT_PEND) {
+                                       printk(KERN_ERR "\n!!! %s:
Connection pending !!!\n", __FUNCTION__);
+                                       bh_unlock_sock(sk);
+                                       continue;
+                               }
+
+                               l2cap_pi(sk)->conf_state |=
L2CAP_CONF_CONNECT_PEND;
                                l2cap_send_cmd(conn, l2cap_pi(sk)->ident,
                                        L2CAP_CONN_REQ, sizeof(req), &req);
                        }
@@ -3809,6 +3822,7 @@ static int l2cap_security_cfm(struct hci_conn
*hcon, u8 status, u8 encrypt)
                bh_lock_sock(sk);

                if (l2cap_pi(sk)->conf_state & L2CAP_CONF_CONNECT_PEND) {
+                       printk(KERN_ERR "\n!!! %s: Connection pending
!!!\n", __FUNCTION__);
                        bh_unlock_sock(sk);
                        continue;
                }
@@ -3828,6 +3842,7 @@ static int l2cap_security_cfm(struct hci_conn
*hcon, u8 status, u8 encrypt)

                                l2cap_pi(sk)->ident = l2cap_get_ident(conn);

+                               l2cap_pi(sk)->conf_state |=
L2CAP_CONF_CONNECT_PEND;
                                l2cap_send_cmd(conn, l2cap_pi(sk)->ident,
                                        L2CAP_CONN_REQ, sizeof(req), &req);



>
> Regards
>
> Marcel
>
>
> --
> 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
>

^ permalink raw reply related

* Re: [PATCH] Adding support for bluetooth controller shipped with iMac i5
From: Marcel Holtmann @ 2010-06-16 13:33 UTC (permalink / raw)
  To: Cyril Lacoux (Yack); +Cc: linux-bluetooth
In-Reply-To: <201006161443.50587.clacoux@ifeelgood.org>

Hi,

> I recently bought an iMac i5 with bluetooth keyboard and mouse.
> 
> The bluetooth controller seems to be a BCM2046 (rebranded), but the 
> bDeviceClass is wrong.
> 
> Attached patch make it working on my system (Debian Sid / 2.6.34), could you 
> please apply it ?

please show the output of /proc/bus/usb/devices or usb-devices script
for this device.

And I want a proper kernel patch from git format-patch.

Regards

Marcel



^ permalink raw reply

* Re: [PATCH 1/2] log: Add function to get/set debug_string
From: Marcel Holtmann @ 2010-06-16 13:31 UTC (permalink / raw)
  To: Gustavo F. Padovan; +Cc: linux-bluetooth
In-Reply-To: <1276673478-9273-1-git-send-email-gustavo@padovan.org>

Hi Gustavo,

>  src/log.c |   53 +++++++++++++++++++++++++++++++++++++++++------------
>  src/log.h |    2 ++
>  2 files changed, 43 insertions(+), 12 deletions(-)
> 
> diff --git a/src/log.c b/src/log.c
> index ed6e428..f53ace3 100644
> --- a/src/log.c
> +++ b/src/log.c
> @@ -71,6 +71,8 @@ extern struct btd_debug_desc __stop___debug[];
>  
>  static gchar **enabled = NULL;
>  
> +static char *debug_string = NULL;
> +

can you please stop messing around with this so much. This looks all so
heavily complicated and convoluted. The log.c is not storing the current
debug command line parameter. It doesn't care about that. So why should
it bother.

Just have a function __btd_enable_debug(const char *debug) and make that
work. You can even use that one from the SIGUSR2 with just "*" as
parameter.

If the D-Bus API wants to present a read-able value of what is the
current string, then that is up to the D-Bus manager object and not the
logging code.

Right now I am actually inclined to just say we don't bother with
changing debug options via D-Bus at all. So I want a simple and clean
patch or we should just not do it at all.

Regards

Marcel



^ permalink raw reply

* [PATCH] Bluetooth: check l2cap pending status before sending l2cap connect request
From: Emeltchenko Andrei @ 2010-06-16 12:52 UTC (permalink / raw)
  To: linux-bluetooth

From: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>

Due to race condition in L2CAP state machine L2CAP Connection Request
may be sent twice for SDP with the same source channel id. Problems
reported connecting to Apple products, some carkit, Blackberry phones.

...
2010-06-07 21:18:03.651031 < ACL data: handle 1 flags 0x02 dlen 12
    L2CAP(s): Connect req: psm 1 scid 0x0040
2010-06-07 21:18:03.653473 > HCI Event: Number of Completed Packets (0x13) plen 5
    handle 1 packets 1
2010-06-07 21:18:03.653808 > HCI Event: Auth Complete (0x06) plen 3
    status 0x00 handle 1
2010-06-07 21:18:03.653869 < ACL data: handle 1 flags 0x02 dlen 12
    L2CAP(s): Connect req: psm 1 scid 0x0040
...

Patch uses L2CAP_CONF_CONNECT_PEND flag to mark that L2CAP Connection
Request has been sent.

Modified version of Ville Tervo patch.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
---
 net/bluetooth/l2cap.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index fc81acb..1ed51ad 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -387,13 +387,16 @@ static void l2cap_do_start(struct sock *sk)
 		if (!(conn->info_state & L2CAP_INFO_FEAT_MASK_REQ_DONE))
 			return;
 
-		if (l2cap_check_security(sk)) {
+		if (l2cap_check_security(sk) &&
+				! l2cap_pi(sk)->conf_state &
+				L2CAP_CONF_CONNECT_PEND) {
 			struct l2cap_conn_req req;
 			req.scid = cpu_to_le16(l2cap_pi(sk)->scid);
 			req.psm  = l2cap_pi(sk)->psm;
 
 			l2cap_pi(sk)->ident = l2cap_get_ident(conn);
 
+			l2cap_pi(sk)->conf_state |= L2CAP_CONF_CONNECT_PEND;
 			l2cap_send_cmd(conn, l2cap_pi(sk)->ident,
 					L2CAP_CONN_REQ, sizeof(req), &req);
 		}
@@ -441,13 +444,16 @@ static void l2cap_conn_start(struct l2cap_conn *conn)
 		}
 
 		if (sk->sk_state == BT_CONNECT) {
-			if (l2cap_check_security(sk)) {
+			if (l2cap_check_security(sk) &&
+					! l2cap_pi(sk)->conf_state &
+					L2CAP_CONF_CONNECT_PEND) {
 				struct l2cap_conn_req req;
 				req.scid = cpu_to_le16(l2cap_pi(sk)->scid);
 				req.psm  = l2cap_pi(sk)->psm;
 
 				l2cap_pi(sk)->ident = l2cap_get_ident(conn);
 
+				l2cap_pi(sk)->conf_state |= L2CAP_CONF_CONNECT_PEND;
 				l2cap_send_cmd(conn, l2cap_pi(sk)->ident,
 					L2CAP_CONN_REQ, sizeof(req), &req);
 			}
@@ -3828,6 +3834,7 @@ static int l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt)
 
 				l2cap_pi(sk)->ident = l2cap_get_ident(conn);
 
+				l2cap_pi(sk)->conf_state |= L2CAP_CONF_CONNECT_PEND;
 				l2cap_send_cmd(conn, l2cap_pi(sk)->ident,
 					L2CAP_CONN_REQ, sizeof(req), &req);
 			} else {
-- 
1.7.0.4


^ permalink raw reply related

* Re: Software caused connection abort (103 )
From: john michelle @ 2010-06-16 12:11 UTC (permalink / raw)
  To: Gustavo F. Padovan, linux-bluetooth; +Cc: marcel
In-Reply-To: <AANLkTin0B-f2i5e2TvDVDLuRZ7eRND-u4lVor1GSIhGT@mail.gmail.com>

On Sun, May 30, 2010 at 1:12 PM, john michelle <jhnmichelle@gmail.com> wrot=
e:
> Hi Gustavo,
>
>>> Please post the output of hcidump when the connection abort happens.
>>>
>
> Below is the output of hcidump the moments the software caused connection=
 abort
>
> Dongle 1:
>> HCI Event: Number of Completed Packets (0x13) plen 5
> =A0. * . . .
> < HCI Command: Reset (0x03|0x0003) plen 0
> device: disconnected
>
> Dongle 2:
>> HCI Event: Number of Completed Packets (0x13) plen 5
> =A0. * . . .
> < HCI Command: Reset (0x03|0x0003) plen 0
> device: disconnected
>
>
> I think something triggers hci reset which causes this problem, but what =
exactly
> Triggers it i don't know.
>
>
> John
>
>


Hi all,

Is anyone going to give this problem a try, it has been like a month now
This is a real problem in the bluez stack and someone have to look in this
Issue.

John

> On Mon, May 17, 2010 at 5:21 PM, john michelle <jhnmichelle@gmail.com> wr=
ote:
>>> Hi Jonh,
>>>
>>> First of all, don't do top posting in this mailing list. ;)
>>>
>>
>> Thanks for the advise , will keep that in mind for future posts.
>>
>>> In which bluez/kernel version the problem started? Any hardware update
>>> during this time? The problem happens when you are already tranfering
>>> SCO data?
>>>
>>
>> I tried bluez versions 3.XX =A0and kernel 2.6.26(I think) the problem
>> occurs and the kernel panics with no core dumps.then i tried with
>> bluez 4.53-4.62 with
>> Kernel 2.6.31 and 2.6.32. the connection abort problem occurs but the
>> kernel doesn't
>> Panic. regarding the hardware update you mean the dongle or the box.Anyw=
ay
>> i changed both and tried different box's, this even happens on a box
>> with 2 giga ram
>> And core2 processor . as for the dongles i am using trust
>>
>> http://www.twenga.co.uk/prices-Bluetooth-2-USB-Adapter-10m-BT-2250p-TRUS=
T-Wireless-network-card-adapter-176178-0
>>
>> =A0and also using no name dongles all the same problem.
>>
>>> Please post the output of hcidump when the connection abort happens.
>>>
>>
>> well that is going to be a hard one since i have more than one dongle in=
 place
>> And very hard to predict which one will crash.i will work on this and up=
date
>> You as soon as i have the hcidump log.
>>
>>
>>
>>> I tried reproduce this issue in L2CAP but it is a bit hard, lets
>>> say it happen once in a thousand, so it's not easy to track it. I have
>>> to try reproduce that using the SCO, but I'm not used to that layer yet=
.
>>> ;)
>>
>> I hoped that it happens 1 in 1000 in SCO , but it actually happens 1 in =
15
>>
>>
>> John
>>
>>
>>
>>>
>>> Regards,
>>>
>>>>
>>>> John
>>>>
>>>> On Fri, May 7, 2010 at 3:53 PM, Gustavo F. Padovan <gustavo@padovan.or=
g> wrote:
>>>> > * john michelle <jhnmichelle@gmail.com> [2010-05-07 15:49:05 -0400]:
>>>> >
>>>> >> Hi Bluetooth hackers,
>>>> >>
>>>> >> i am having this consistent problem with bluez , from time to time =
i
>>>> >> get the error Software caused connection abort (103 )
>>>> >> And the bluetooth stick seems to disconnect and reconnects. this
>>>> >> happens during an sco connection and it occurs even
>>>> >> More when i am having the voice stream comming through the internet
>>>> >> rather than the lan.i don't know what exact
>>>> >> Details you need to solve this problem please tell me and i will gi=
ve
>>>> >> you an immediate reply . i have linux kernel 2.6.33 and bluez 4.62
>>>> >
>>>> > I get the same problem sometimes when testing ERTM with l2test. So t=
he
>>>> > problem is on l2cap too. I didn't have time to debug this yet. Now t=
hat
>>>> > someone else have confirmed it too, I'll to take a look at the probl=
em.
>>>> >
>>>> >>
>>>
>>> --
>>> Gustavo F. Padovan
>>> http://padovan.org
>>>
>>
>

^ permalink raw reply

* Re: RFC: Allow Bluez to select flushable or non-flushable ACL packets with L2CAP_LM_RELIABLE
From: Suraj @ 2010-06-16 12:04 UTC (permalink / raw)
  To: Luiz Augusto von Dentz
  Cc: Marcel Holtmann, Nick Pelly, linux-bluetooth@vger.kernel.org
In-Reply-To: <AANLkTinOFG0NcADz2ewxyaPWiLpe52MFLP8GCEvFna2a@mail.gmail.com>

Hi Luis,

On 6/16/2010 5:10 PM, Luiz Augusto von Dentz wrote:
> Hi,
>
> On Tue, Mar 9, 2010 at 11:45 PM, Marcel Holtmann<marcel@holtmann.org>  wrote:
>> Hi Nick,
>>
>>>>>>>> Right now Bluez always requests flushable ACL packets (but does not
>>>>>>>> set a flush timeout, so effectively they are non-flushable):
>>>>>>>>
>>>>>>>> However it is desirable to use an ACL flush timeout on A2DP packets so
>>>>>>>> that if the ACL packets block for some reason then the LM can flush
>>>>>>>> them to make room for newer packets.
>>>>>>>>
>>>>>>>> Is it reasonable for Bluez to use the 0x00 ACL packet boundary flag by
>>>>>>>> default (non-flushable packet), and let userspace request flushable
>>>>>>>> packets on A2DP L2CAP sockets with the socket option
>>>>>>>> L2CAP_LM_RELIABLE.
>>>>>>>
>>>>>>> the reliable option has a different meaning. It comes back from the old
>>>>>>> Bluetooth 1.1 qualification days where we had to tests on L2CAP that had
>>>>>>> to confirm that we can detect malformed packets and report them. These
>>>>>>> days it is just fine to drop them.
>>>>>>
>>>>>> Got it, how about introducing
>>>>>>
>>>>>> #define L2CAP_LM_FLUSHABLE 0x0040
>>>>>
>>>>> that l2cap_sock_setsockopt_old() sets this didn't give you a hint that
>>>>> we might wanna deprecate this socket options ;)
>>>>>
>>>>> I need to read up on the flushable stuff, but in the end it deserves its
>>>>> own socket option. Also an ioctl() to actually trigger Enhanced flush
>>>>> might be needed.
>>>>>
>>>>>> struct l2cap_pinfo {
>>>>>>     ...
>>>>>>     __u8 flushable;
>>>>>> }
>>>>>
>>>>> Sure. In the long run we need to turn this into a bitmask. We are just
>>>>> wasting memory here.
>>>>
>>>> Attached is an updated patch, that checks the LMP features bitmask
>>>> before using the new non-flushable packet type.
>>>>
>>>> I am still using L2CAP_LM_FLUSHABLE socket option in
>>>> l2cap_sock_setsockopt_old(), which I don't think you are happy with.
>>>> So how about a new option:
>>>>
>>>> SOL_L2CAP, L2CAP_ACL_FLUSH
>>>> which has a default value of 0, and can be set to 1 to make the ACL
>>>> data sent by this L2CAP socket flushable.
>>>>
>>>> In a later commit we would then add
>>>> SOL_ACL, ACL_FLUSH_TIMEOUT
>>>> That is used to set an automatic flush timeout for the ACL link on a
>>>> L2CAP socket. Note that SOL_ACL is new.
>>>>
>>>> But maybe this is not what you had in mind, so I'm looking for your
>>>> advice before I implement this.
>>>
>>> Attached an updated patch for 2.6.32 kernel. We've been using this
>>> patch successfully on production devices.
>>
>> can see anything wrong with that patch. However we need to use
>> SOL_BLUETOOTH for it of course. So we need to come up with something to
>> make this simple.
>>
>> An additional change I like to see is to use flags for booleans like
>> flushable in the structures. Can you work on changing that.
>>
>> Also do we have decoding support for this in hcidump. It might be nice
>> to include some really simple examples in the commit message.
>>
>> Regards
>
> I would like to play a little bit with this, so is there any missing updates?
>
This is not exactly something related to your question, but there is 
another side effect for the current implementation.

Assume you have 2 ACL links, FTP and A2DP. A2DP streaming and FTP doing 
FTP Put.
When the A2DP packets start blocking, it effectively start blocking the 
packets available for FTP too. But, the host has no idea about it and 
keep pumping in A2DP data until all available buffers are blocked. 
Effectively blocking both A2DP and FTP.

So at the user level you will see your FTP connection stalling as long 
your A2DP connection is stalled (out of range). FTP will restart as soon 
as A2DP comes back in range.

I had raised this issue sometime before, but could not follow it up.

Regards
Suraj


^ permalink raw reply

* RE: Proposed MAP client D-Bus API (was: Proposed MAP API)
From: Counihan, Tom @ 2010-06-16 12:02 UTC (permalink / raw)
  To: Johan Hedberg; +Cc: linux-bluetooth@vger.kernel.org
In-Reply-To: <20100614141605.GA27414@jh-x301>

Thanks Johan,

I'll attempt to get something kick started on gitorious along the lines of your suggestion.

Warm regards
Tom.

>-----Original Message-----
>From: Johan Hedberg [mailto:johan.hedberg@gmail.com]
>Sent: 14 June 2010 15:16
>To: Counihan, Tom
>Cc: linux-bluetooth@vger.kernel.org
>Subject: Re: Proposed MAP client D-Bus API (was: Proposed MAP API)
>
>Hi Tom,
>
>On Mon, Jun 14, 2010, Counihan, Tom wrote:
>> Many thanks for the prompt response Johan,
>
>No problem :)
>
>> Not sure at all really. I had my suspicion, but wanted to start
>somewhere.
>> What you suggest makes perfect sense really - back to the drawing
>> board for me :$ - just need to figure out a logical home for this.
>
>Note that I'm not strictly saying that it can't be D-Bus based. Only
>that there's a considerable risk with that and that you should
>understand the pros and cons of the different alternatives. E.g.
>compared to D-Bus a library would restrict you more in terms of what
>programing languages can be used for the application whereas there's
>quite a plethora of D-Bus bindings out there. You'd also need to
>consider potential multithreading issues and pay close attention in
>designing the API so that it can be conveniently hooked up to whatever
>mainloop the application has, or then simply decide that only one
>mainloop, e.g. the glib one, is supported.
>
>> On an aside, could the same comment be made regarding PBAP re contact
>> pictures?
>
>Yes, I think so.
>
>Johan
--------------------------------------------------------------
Intel Shannon Limited
Registered in Ireland
Registered Office: Collinstown Industrial Park, Leixlip, County Kildare
Registered Number: 308263
Business address: Dromore House, East Park, Shannon, Co. Clare

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.



^ permalink raw reply

* Re: RFC: Allow Bluez to select flushable or non-flushable ACL packets with L2CAP_LM_RELIABLE
From: Luiz Augusto von Dentz @ 2010-06-16 11:40 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: Nick Pelly, linux-bluetooth
In-Reply-To: <1268167524.3712.61.camel@localhost.localdomain>

Hi,

On Tue, Mar 9, 2010 at 11:45 PM, Marcel Holtmann <marcel@holtmann.org> wrot=
e:
> Hi Nick,
>
>> >>> >> Right now Bluez always requests flushable ACL packets (but does n=
ot
>> >>> >> set a flush timeout, so effectively they are non-flushable):
>> >>> >>
>> >>> >> However it is desirable to use an ACL flush timeout on A2DP packe=
ts so
>> >>> >> that if the ACL packets block for some reason then the LM can flu=
sh
>> >>> >> them to make room for newer packets.
>> >>> >>
>> >>> >> Is it reasonable for Bluez to use the 0x00 ACL packet boundary fl=
ag by
>> >>> >> default (non-flushable packet), and let userspace request flushab=
le
>> >>> >> packets on A2DP L2CAP sockets with the socket option
>> >>> >> L2CAP_LM_RELIABLE.
>> >>> >
>> >>> > the reliable option has a different meaning. It comes back from th=
e old
>> >>> > Bluetooth 1.1 qualification days where we had to tests on L2CAP th=
at had
>> >>> > to confirm that we can detect malformed packets and report them. T=
hese
>> >>> > days it is just fine to drop them.
>> >>>
>> >>> Got it, how about introducing
>> >>>
>> >>> #define L2CAP_LM_FLUSHABLE 0x0040
>> >>
>> >> that l2cap_sock_setsockopt_old() sets this didn't give you a hint tha=
t
>> >> we might wanna deprecate this socket options ;)
>> >>
>> >> I need to read up on the flushable stuff, but in the end it deserves =
its
>> >> own socket option. Also an ioctl() to actually trigger Enhanced flush
>> >> might be needed.
>> >>
>> >>> struct l2cap_pinfo {
>> >>> =A0 =A0...
>> >>> =A0 =A0__u8 flushable;
>> >>> }
>> >>
>> >> Sure. In the long run we need to turn this into a bitmask. We are jus=
t
>> >> wasting memory here.
>> >
>> > Attached is an updated patch, that checks the LMP features bitmask
>> > before using the new non-flushable packet type.
>> >
>> > I am still using L2CAP_LM_FLUSHABLE socket option in
>> > l2cap_sock_setsockopt_old(), which I don't think you are happy with.
>> > So how about a new option:
>> >
>> > SOL_L2CAP, L2CAP_ACL_FLUSH
>> > which has a default value of 0, and can be set to 1 to make the ACL
>> > data sent by this L2CAP socket flushable.
>> >
>> > In a later commit we would then add
>> > SOL_ACL, ACL_FLUSH_TIMEOUT
>> > That is used to set an automatic flush timeout for the ACL link on a
>> > L2CAP socket. Note that SOL_ACL is new.
>> >
>> > But maybe this is not what you had in mind, so I'm looking for your
>> > advice before I implement this.
>>
>> Attached an updated patch for 2.6.32 kernel. We've been using this
>> patch successfully on production devices.
>
> can see anything wrong with that patch. However we need to use
> SOL_BLUETOOTH for it of course. So we need to come up with something to
> make this simple.
>
> An additional change I like to see is to use flags for booleans like
> flushable in the structures. Can you work on changing that.
>
> Also do we have decoding support for this in hcidump. It might be nice
> to include some really simple examples in the commit message.
>
> Regards

I would like to play a little bit with this, so is there any missing update=
s?

--=20
Luiz Augusto von Dentz
Computer Engineer

^ permalink raw reply

* [PATCH] Adding support for bluetooth controller shipped with iMac i5
From: Cyril Lacoux (Yack) @ 2010-06-16 10:43 UTC (permalink / raw)
  To: linux-bluetooth

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

Hi,

I recently bought an iMac i5 with bluetooth keyboard and mouse.

The bluetooth controller seems to be a BCM2046 (rebranded), but the 
bDeviceClass is wrong.

Attached patch make it working on my system (Debian Sid / 2.6.34), could you 
please apply it ?

PS: Please CC me on any replies.

Regards,
-- 
Cyril Lacoux -- BOFH excuse #300:

Digital Manipulator exceeding velocity parameters

[-- Attachment #2: lsusb.txt --]
[-- Type: text/plain, Size: 71169 bytes --]


Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         0 Full speed (or root) hub
  bMaxPacketSize0        64
  idVendor           0x1d6b Linux Foundation
  idProduct          0x0001 1.1 root hub
  bcdDevice            2.06
  iManufacturer           3 Linux 2.6.34-yack uhci_hcd
  iProduct                2 UHCI Host Controller
  iSerial                 1 0000:00:1d.0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0 Full speed (or root) hub
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0002  1x 2 bytes
        bInterval             255
Hub Descriptor:
  bLength               9
  bDescriptorType      41
  nNbrPorts             2
  wHubCharacteristic 0x000a
    No power switching (usb 1.0)
    Per-port overcurrent protection
  bPwrOn2PwrGood        1 * 2 milli seconds
  bHubContrCurrent      0 milli Ampere
  DeviceRemovable    0x00
  PortPwrCtrlMask    0xff
 Hub Port Status:
   Port 1: 0000.0100 power
   Port 2: 0000.0100 power
Device Status:     0x0003
  Self Powered
  Remote Wakeup Enabled

Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         0 Full speed (or root) hub
  bMaxPacketSize0        64
  idVendor           0x1d6b Linux Foundation
  idProduct          0x0001 1.1 root hub
  bcdDevice            2.06
  iManufacturer           3 Linux 2.6.34-yack uhci_hcd
  iProduct                2 UHCI Host Controller
  iSerial                 1 0000:00:1a.0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0 Full speed (or root) hub
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0002  1x 2 bytes
        bInterval             255
Hub Descriptor:
  bLength               9
  bDescriptorType      41
  nNbrPorts             2
  wHubCharacteristic 0x000a
    No power switching (usb 1.0)
    Per-port overcurrent protection
  bPwrOn2PwrGood        1 * 2 milli seconds
  bHubContrCurrent      0 milli Ampere
  DeviceRemovable    0x00
  PortPwrCtrlMask    0xff
 Hub Port Status:
   Port 1: 0000.0100 power
   Port 2: 0000.0100 power
Device Status:     0x0003
  Self Powered
  Remote Wakeup Enabled

Bus 002 Device 005: ID 046d:c051 Logitech, Inc. G3 (MX518) Optical Mouse
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x046d Logitech, Inc.
  idProduct          0xc051 G3 (MX518) Optical Mouse
  bcdDevice           30.00
  iManufacturer           1 Logitech
  iProduct                2 USB-PS/2 Optical Mouse
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           34
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower               98mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      2 Mouse
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      77
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval              10
Device Status:     0x0000
  (Bus Powered)

Bus 002 Device 004: ID 05ac:8242 Apple, Inc. IR Receiver [built-in]
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x05ac Apple, Inc.
  idProduct          0x8242 IR Receiver [built-in]
  bcdDevice            0.16
  iManufacturer           1 Apple Computer, Inc.
  iProduct                2 IR Receiver
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           34
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          1 Apple Computer, Inc.
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      42
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval              10
Device Status:     0x0000
  (Bus Powered)

Bus 002 Device 003: ID 05ac:8502 Apple, Inc. Built-in iSight
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          239 Miscellaneous Device
  bDeviceSubClass         2 ?
  bDeviceProtocol         1 Interface Association
  bMaxPacketSize0        64
  idVendor           0x05ac Apple, Inc.
  idProduct          0x8502 Built-in iSight
  bcdDevice            2.30
  iManufacturer           1 Apple Inc.
  iProduct                2 Built-in iSight
  iSerial                 3 8TA23JE2B77K3L00
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength         1398
    bNumInterfaces          3
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         0
      bInterfaceCount         2
      bFunctionClass         14 Video
      bFunctionSubClass       3 Video Interface Collection
      bFunctionProtocol       0 
      iFunction               2 Built-in iSight
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      1 Video Control
      bInterfaceProtocol      0 
      iInterface              2 Built-in iSight
      VideoControl Interface Descriptor:
        bLength                13
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdUVC               1.00
        wTotalLength           51
        dwClockFrequency        4.000000MHz
        bInCollection           1
        baInterfaceNr( 0)       1
      VideoControl Interface Descriptor:
        bLength                18
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             1
        wTerminalType      0x0201 Camera Sensor
        bAssocTerminal          0
        iTerminal               0 
        wObjectiveFocalLengthMin      0
        wObjectiveFocalLengthMax      0
        wOcularFocalLength            0
        bControlSize                  3
        bmControls           0x0000000a
          Auto-Exposure Mode
          Exposure Time (Absolute)
      VideoControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID             2
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bSourceID               3
        iTerminal               0 
      VideoControl Interface Descriptor:
        bLength                11
        bDescriptorType        36
        bDescriptorSubtype      5 (PROCESSING_UNIT)
      Warning: Descriptor too short
        bUnitID                 3
        bSourceID               1
        wMaxMultiplier          0
        bControlSize            2
        bmControls     0x0000157f
          Brightness
          Contrast
          Hue
          Saturation
          Sharpness
          Gamma
          White Balance Temperature
          Backlight Compensation
          Power Line Frequency
          White Balance Temperature, Auto
        iProcessing             0 
        bmVideoStandards     0x 0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               6
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      VideoStreaming Interface Descriptor:
        bLength                            15
        bDescriptorType                    36
        bDescriptorSubtype                  1 (INPUT_HEADER)
        bNumFormats                         2
        wTotalLength                     1179
        bEndPointAddress                  130
        bmInfo                              0
        bTerminalLink                       2
        bStillCaptureMethod                 2
        bTriggerSupport                     0
        bTriggerUsage                       0
        bControlSize                        1
        bmaControls( 0)                    27
        bmaControls( 1)                    27
      VideoStreaming Interface Descriptor:
        bLength                            27
        bDescriptorType                    36
        bDescriptorSubtype                  4 (FORMAT_UNCOMPRESSED)
        bFormatIndex                        1
        bNumFrameDescriptors                7
        guidFormat                            {59555932-0000-1000-8000-00aa00389b71}
        bBitsPerPixel                      16
        bDefaultFrameIndex                  5
        bAspectRatioX                       0
        bAspectRatioY                       0
        bmInterlaceFlags                 0x00
          Interlaced stream or variable: No
          Fields per frame: 1 fields
          Field 1 first: No
          Field pattern: Field 1 only
          bCopyProtect                      0
      VideoStreaming Interface Descriptor:
        bLength                            70
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         1
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            160
        wHeight                           120
        dwMinBitRate                 24576000
        dwMaxBitRate                147456000
        dwMaxVideoFrameBufferSize       38400
        dwDefaultFrameInterval         333333
        bFrameIntervalType                 11
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            363636
        dwFrameInterval( 2)            400000
        dwFrameInterval( 3)            444444
        dwFrameInterval( 4)            500000
        dwFrameInterval( 5)            571428
        dwFrameInterval( 6)            666667
        dwFrameInterval( 7)            800000
        dwFrameInterval( 8)           1000000
        dwFrameInterval( 9)           1333333
        dwFrameInterval(10)           2000000
      VideoStreaming Interface Descriptor:
        bLength                            70
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         2
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            176
        wHeight                           144
        dwMinBitRate                 24576000
        dwMaxBitRate                147456000
        dwMaxVideoFrameBufferSize       50688
        dwDefaultFrameInterval         333333
        bFrameIntervalType                 11
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            363636
        dwFrameInterval( 2)            400000
        dwFrameInterval( 3)            444444
        dwFrameInterval( 4)            500000
        dwFrameInterval( 5)            571428
        dwFrameInterval( 6)            666667
        dwFrameInterval( 7)            800000
        dwFrameInterval( 8)           1000000
        dwFrameInterval( 9)           1333333
        dwFrameInterval(10)           2000000
      VideoStreaming Interface Descriptor:
        bLength                            70
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         3
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            320
        wHeight                           240
        dwMinBitRate                 24576000
        dwMaxBitRate                147456000
        dwMaxVideoFrameBufferSize      153600
        dwDefaultFrameInterval         333333
        bFrameIntervalType                 11
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            363636
        dwFrameInterval( 2)            400000
        dwFrameInterval( 3)            444444
        dwFrameInterval( 4)            500000
        dwFrameInterval( 5)            571428
        dwFrameInterval( 6)            666667
        dwFrameInterval( 7)            800000
        dwFrameInterval( 8)           1000000
        dwFrameInterval( 9)           1333333
        dwFrameInterval(10)           2000000
      VideoStreaming Interface Descriptor:
        bLength                            70
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         4
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            352
        wHeight                           288
        dwMinBitRate                 24576000
        dwMaxBitRate                147456000
        dwMaxVideoFrameBufferSize      202752
        dwDefaultFrameInterval         333333
        bFrameIntervalType                 11
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            363636
        dwFrameInterval( 2)            400000
        dwFrameInterval( 3)            444444
        dwFrameInterval( 4)            500000
        dwFrameInterval( 5)            571428
        dwFrameInterval( 6)            666667
        dwFrameInterval( 7)            800000
        dwFrameInterval( 8)           1000000
        dwFrameInterval( 9)           1333333
        dwFrameInterval(10)           2000000
      VideoStreaming Interface Descriptor:
        bLength                            70
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         5
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            640
        wHeight                           480
        dwMinBitRate                 24576000
        dwMaxBitRate                147456000
        dwMaxVideoFrameBufferSize      614400
        dwDefaultFrameInterval         333333
        bFrameIntervalType                 11
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            363636
        dwFrameInterval( 2)            400000
        dwFrameInterval( 3)            444444
        dwFrameInterval( 4)            500000
        dwFrameInterval( 5)            571428
        dwFrameInterval( 6)            666667
        dwFrameInterval( 7)            800000
        dwFrameInterval( 8)           1000000
        dwFrameInterval( 9)           1333333
        dwFrameInterval(10)           2000000
      VideoStreaming Interface Descriptor:
        bLength                            62
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         6
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            720
        wHeight                           480
        dwMinBitRate                 24576000
        dwMaxBitRate                147456000
        dwMaxVideoFrameBufferSize      691200
        dwDefaultFrameInterval         400000
        bFrameIntervalType                  9
        dwFrameInterval( 0)            400000
        dwFrameInterval( 1)            444444
        dwFrameInterval( 2)            500000
        dwFrameInterval( 3)            571428
        dwFrameInterval( 4)            666667
        dwFrameInterval( 5)            800000
        dwFrameInterval( 6)           1000000
        dwFrameInterval( 7)           1333333
        dwFrameInterval( 8)           2000000
      VideoStreaming Interface Descriptor:
        bLength                            62
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         7
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            704
        wHeight                           576
        dwMinBitRate                 24576000
        dwMaxBitRate                147456000
        dwMaxVideoFrameBufferSize      811008
        dwDefaultFrameInterval         400000
        bFrameIntervalType                  9
        dwFrameInterval( 0)            400000
        dwFrameInterval( 1)            444444
        dwFrameInterval( 2)            500000
        dwFrameInterval( 3)            571428
        dwFrameInterval( 4)            666667
        dwFrameInterval( 5)            800000
        dwFrameInterval( 6)           1000000
        dwFrameInterval( 7)           1333333
        dwFrameInterval( 8)           2000000
      VideoStreaming Interface Descriptor:
        bLength                            34
        bDescriptorType                    36
        bDescriptorSubtype                  3 (STILL_IMAGE_FRAME)
        bEndpointAddress                    0
        bNumImageSizePatterns               7
        wWidth( 0)                        160
        wHeight( 0)                       120
        wWidth( 1)                        176
        wHeight( 1)                       144
        wWidth( 2)                        320
        wHeight( 2)                       240
        wWidth( 3)                        352
        wHeight( 3)                       288
        wWidth( 4)                        640
        wHeight( 4)                       480
        wWidth( 5)                        720
        wHeight( 5)                       480
        wWidth( 6)                        704
        wHeight( 6)                       576
        bNumCompressionPatterns             7
      VideoStreaming Interface Descriptor:
        bLength                             6
        bDescriptorType                    36
        bDescriptorSubtype                 13 (COLORFORMAT)
        bColorPrimaries                     1 (BT.709,sRGB)
        bTransferCharacteristics            1 (BT.709)
        bMatrixCoefficients                 1 (BT.709)
      VideoStreaming Interface Descriptor:
        bLength                            11
        bDescriptorType                    36
        bDescriptorSubtype                  6 (FORMAT_MJPEG)
        bFormatIndex                        2
        bNumFrameDescriptors                8
        bFlags                              0
          Fixed-size samples: No
        bDefaultFrameIndex                  1
        bAspectRatioX                       0
        bAspectRatioY                       0
        bmInterlaceFlags                 0x00
          Interlaced stream or variable: No
          Fields per frame: 1 fields
          Field 1 first: No
          Field pattern: Field 1 only
          bCopyProtect                      0
      VideoStreaming Interface Descriptor:
        bLength                            74
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         1
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            640
        wHeight                           480
        dwMinBitRate                 24576000
        dwMaxBitRate                147456000
        dwMaxVideoFrameBufferSize      614400
        dwDefaultFrameInterval         333333
        bFrameIntervalType                 12
        dwFrameInterval( 0)            166667
        dwFrameInterval( 1)            333333
        dwFrameInterval( 2)            363636
        dwFrameInterval( 3)            400000
        dwFrameInterval( 4)            444444
        dwFrameInterval( 5)            500000
        dwFrameInterval( 6)            571428
        dwFrameInterval( 7)            666667
        dwFrameInterval( 8)            800000
        dwFrameInterval( 9)           1000000
        dwFrameInterval(10)           1333333
        dwFrameInterval(11)           2000000
      VideoStreaming Interface Descriptor:
        bLength                            74
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         2
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            720
        wHeight                           480
        dwMinBitRate                 24576000
        dwMaxBitRate                147456000
        dwMaxVideoFrameBufferSize      691200
        dwDefaultFrameInterval         333333
        bFrameIntervalType                 12
        dwFrameInterval( 0)            166667
        dwFrameInterval( 1)            333333
        dwFrameInterval( 2)            363636
        dwFrameInterval( 3)            400000
        dwFrameInterval( 4)            444444
        dwFrameInterval( 5)            500000
        dwFrameInterval( 6)            571428
        dwFrameInterval( 7)            666667
        dwFrameInterval( 8)            800000
        dwFrameInterval( 9)           1000000
        dwFrameInterval(10)           1333333
        dwFrameInterval(11)           2000000
      VideoStreaming Interface Descriptor:
        bLength                            70
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         3
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            800
        wHeight                           600
        dwMinBitRate                 24576000
        dwMaxBitRate                147456000
        dwMaxVideoFrameBufferSize      960000
        dwDefaultFrameInterval         333333
        bFrameIntervalType                 11
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            363636
        dwFrameInterval( 2)            400000
        dwFrameInterval( 3)            444444
        dwFrameInterval( 4)            500000
        dwFrameInterval( 5)            571428
        dwFrameInterval( 6)            666667
        dwFrameInterval( 7)            800000
        dwFrameInterval( 8)           1000000
        dwFrameInterval( 9)           1333333
        dwFrameInterval(10)           2000000
      VideoStreaming Interface Descriptor:
        bLength                            70
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         4
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                           1024
        wHeight                           576
        dwMinBitRate                 24576000
        dwMaxBitRate                147456000
        dwMaxVideoFrameBufferSize     1179648
        dwDefaultFrameInterval         333333
        bFrameIntervalType                 11
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            363636
        dwFrameInterval( 2)            400000
        dwFrameInterval( 3)            444444
        dwFrameInterval( 4)            500000
        dwFrameInterval( 5)            571428
        dwFrameInterval( 6)            666667
        dwFrameInterval( 7)            800000
        dwFrameInterval( 8)           1000000
        dwFrameInterval( 9)           1333333
        dwFrameInterval(10)           2000000
      VideoStreaming Interface Descriptor:
        bLength                            70
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         5
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                           1024
        wHeight                           768
        dwMinBitRate                 24576000
        dwMaxBitRate                147456000
        dwMaxVideoFrameBufferSize     1572864
        dwDefaultFrameInterval         333333
        bFrameIntervalType                 11
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            363636
        dwFrameInterval( 2)            400000
        dwFrameInterval( 3)            444444
        dwFrameInterval( 4)            500000
        dwFrameInterval( 5)            571428
        dwFrameInterval( 6)            666667
        dwFrameInterval( 7)            800000
        dwFrameInterval( 8)           1000000
        dwFrameInterval( 9)           1333333
        dwFrameInterval(10)           2000000
      VideoStreaming Interface Descriptor:
        bLength                            70
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         6
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                           1280
        wHeight                           720
        dwMinBitRate                 24576000
        dwMaxBitRate                147456000
        dwMaxVideoFrameBufferSize     1843200
        dwDefaultFrameInterval         333333
        bFrameIntervalType                 11
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            363636
        dwFrameInterval( 2)            400000
        dwFrameInterval( 3)            444444
        dwFrameInterval( 4)            500000
        dwFrameInterval( 5)            571428
        dwFrameInterval( 6)            666667
        dwFrameInterval( 7)            800000
        dwFrameInterval( 8)           1000000
        dwFrameInterval( 9)           1333333
        dwFrameInterval(10)           2000000
      VideoStreaming Interface Descriptor:
        bLength                            70
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         7
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                           1280
        wHeight                           960
        dwMinBitRate                 24576000
        dwMaxBitRate                147456000
        dwMaxVideoFrameBufferSize     2457600
        dwDefaultFrameInterval         333333
        bFrameIntervalType                 11
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            363636
        dwFrameInterval( 2)            400000
        dwFrameInterval( 3)            444444
        dwFrameInterval( 4)            500000
        dwFrameInterval( 5)            571428
        dwFrameInterval( 6)            666667
        dwFrameInterval( 7)            800000
        dwFrameInterval( 8)           1000000
        dwFrameInterval( 9)           1333333
        dwFrameInterval(10)           2000000
      VideoStreaming Interface Descriptor:
        bLength                            70
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         8
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                           1280
        wHeight                          1024
        dwMinBitRate                 24576000
        dwMaxBitRate                147456000
        dwMaxVideoFrameBufferSize     2621440
        dwDefaultFrameInterval         333333
        bFrameIntervalType                 11
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            363636
        dwFrameInterval( 2)            400000
        dwFrameInterval( 3)            444444
        dwFrameInterval( 4)            500000
        dwFrameInterval( 5)            571428
        dwFrameInterval( 6)            666667
        dwFrameInterval( 7)            800000
        dwFrameInterval( 8)           1000000
        dwFrameInterval( 9)           1333333
        dwFrameInterval(10)           2000000
      VideoStreaming Interface Descriptor:
        bLength                            38
        bDescriptorType                    36
        bDescriptorSubtype                  3 (STILL_IMAGE_FRAME)
        bEndpointAddress                    0
        bNumImageSizePatterns               8
        wWidth( 0)                        640
        wHeight( 0)                       480
        wWidth( 1)                        720
        wHeight( 1)                       480
        wWidth( 2)                        800
        wHeight( 2)                       600
        wWidth( 3)                       1024
        wHeight( 3)                       576
        wWidth( 4)                       1024
        wHeight( 4)                       768
        wWidth( 5)                       1280
        wHeight( 5)                       720
        wWidth( 6)                       1280
        wHeight( 6)                       960
        wWidth( 7)                       1280
        wHeight( 7)                      1024
        bNumCompressionPatterns             8
      VideoStreaming Interface Descriptor:
        bLength                             6
        bDescriptorType                    36
        bDescriptorSubtype                 13 (COLORFORMAT)
        bColorPrimaries                     1 (BT.709,sRGB)
        bTransferCharacteristics            1 (BT.709)
        bMatrixCoefficients                 1 (BT.709)
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0080  1x 128 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       2
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       3
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       4
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0b00  2x 768 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       5
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0c00  2x 1024 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       6
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x1380  3x 896 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       7
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x1400  3x 1024 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass          239 Miscellaneous Device
  bDeviceSubClass         2 ?
  bDeviceProtocol         1 Interface Association
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)

Bus 002 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         2 TT per port
  bMaxPacketSize0        64
  idVendor           0x0424 Standard Microsystems Corp.
  idProduct          0x2514 USB 2.0 Hub
  bcdDevice            0.03
  iManufacturer           0 
  iProduct                0 
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           41
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                2mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      1 Single TT
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0001  1x 1 bytes
        bInterval              12
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      2 TT per port
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0001  1x 1 bytes
        bInterval              12
Hub Descriptor:
  bLength               9
  bDescriptorType      41
  nNbrPorts             4
  wHubCharacteristic 0x000d
    Per-port power switching
    Compound device
    Per-port overcurrent protection
    TT think time 8 FS bits
  bPwrOn2PwrGood       50 * 2 milli seconds
  bHubContrCurrent      1 milli Ampere
  DeviceRemovable    0x06
  PortPwrCtrlMask    0xff
 Hub Port Status:
   Port 1: 0000.0503 highspeed power enable connect
   Port 2: 0000.0303 lowspeed power enable connect
   Port 3: 0000.0303 lowspeed power enable connect
   Port 4: 0000.0100 power
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         0 Full speed (or root) hub
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0001
  Self Powered

Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         0 Full speed (or root) hub
  bMaxPacketSize0        64
  idVendor           0x1d6b Linux Foundation
  idProduct          0x0002 2.0 root hub
  bcdDevice            2.06
  iManufacturer           3 Linux 2.6.34-yack ehci_hcd
  iProduct                2 EHCI Host Controller
  iSerial                 1 0000:00:1d.7
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0 Full speed (or root) hub
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0004  1x 4 bytes
        bInterval              12
Hub Descriptor:
  bLength              11
  bDescriptorType      41
  nNbrPorts             8
  wHubCharacteristic 0x000a
    No power switching (usb 1.0)
    Per-port overcurrent protection
  bPwrOn2PwrGood       10 * 2 milli seconds
  bHubContrCurrent      0 milli Ampere
  DeviceRemovable    0x00 0x00
  PortPwrCtrlMask    0xff 0xff
 Hub Port Status:
   Port 1: 0000.0503 highspeed power enable connect
   Port 2: 0000.0100 power
   Port 3: 0000.0100 power
   Port 4: 0000.0100 power
   Port 5: 0000.0100 power
   Port 6: 0000.0100 power
   Port 7: 0000.0100 power
   Port 8: 0000.0100 power
Device Status:     0x0003
  Self Powered
  Remote Wakeup Enabled

Bus 001 Device 009: ID 0472:0065 Chicony Electronics Co., Ltd PFU-65 Keyboard
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x0472 Chicony Electronics Co., Ltd
  idProduct          0x0065 PFU-65 Keyboard
  bcdDevice            1.00
  iManufacturer           3 Chicony 
  iProduct                4 PFU-65 USB Keyboard
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           34
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          4 PFU-65 USB Keyboard
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      1 Keyboard
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.00
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      65
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval              24
Device Status:     0x0003
  Self Powered
  Remote Wakeup Enabled

Bus 001 Device 006: ID 05ac:8215 Apple, Inc. Bluetooth USB Host Controller
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          255 Vendor Specific Class
  bDeviceSubClass         1 
  bDeviceProtocol         1 
  bMaxPacketSize0        64
  idVendor           0x05ac Apple, Inc.
  idProduct          0x8215 Bluetooth USB Host Controller
  bcdDevice            1.82
  iManufacturer           1 Apple Inc.
  iProduct                2 Bluetooth USB Host Controller
  iSerial                 3 7C6D62936607
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          216
    bNumInterfaces          4
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      1 
      bInterfaceProtocol      1 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      1 Bluetooth
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0000  1x 0 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0000  1x 0 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           2
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      1 Bluetooth
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0009  1x 9 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0009  1x 9 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       2
      bNumEndpoints           2
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      1 Bluetooth
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0011  1x 17 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0011  1x 17 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       3
      bNumEndpoints           2
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      1 Bluetooth
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0020  1x 32 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0020  1x 32 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       4
      bNumEndpoints           2
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      1 Bluetooth
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       5
      bNumEndpoints           2
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      1 Bluetooth
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0020  1x 32 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x04  EP 4 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0020  1x 32 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass       254 Application Specific Interface
      bInterfaceSubClass      1 Device Firmware Update
      bInterfaceProtocol      0 
      iInterface              0 
      Device Firmware Upgrade Interface Descriptor:
        bLength                             7
        bDescriptorType                    33
        bmAttributes                        7
          Will Not Detach
          Manifestation Tolerant
          Upload Supported
          Download Supported
        wDetachTimeout                   5000 milliseconds
        wTransferSize                      64 bytes
Device Status:     0x0001
  Self Powered

Bus 001 Device 005: ID 0472:0065 Chicony Electronics Co., Ltd PFU-65 Keyboard
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         0 Full speed (or root) hub
  bMaxPacketSize0         8
  idVendor           0x0472 Chicony Electronics Co., Ltd
  idProduct          0x0065 PFU-65 Keyboard
  bcdDevice            1.00
  iManufacturer           1 Chicony 
  iProduct                2 Generic USB Hub
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower               90mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0 Full speed (or root) hub
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0001  1x 1 bytes
        bInterval             255
Hub Descriptor:
  bLength               9
  bDescriptorType      41
  nNbrPorts             3
  wHubCharacteristic 0x000d
    Per-port power switching
    Compound device
    Per-port overcurrent protection
  bPwrOn2PwrGood       50 * 2 milli seconds
  bHubContrCurrent     90 milli Ampere
  DeviceRemovable    0x02
  PortPwrCtrlMask    0xff
 Hub Port Status:
   Port 1: 0000.0103 power enable connect
   Port 2: 0000.0100 power
   Port 3: 0000.0100 power
Device Status:     0x0002
  (Bus Powered)
  Remote Wakeup Enabled

Bus 001 Device 004: ID 05ac:8403 Apple, Inc. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x05ac Apple, Inc.
  idProduct          0x8403 
  bcdDevice           98.33
  iManufacturer           3 Apple
  iProduct                4 Card Reader
  iSerial                 2 000000009833
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk (Zip)
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)

Bus 001 Device 003: ID 0a5c:4500 Broadcom Corp. BCM2046B1 USB 2.0 Hub (part of BCM2046 Bluetooth)
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         0 Full speed (or root) hub
  bMaxPacketSize0         8
  idVendor           0x0a5c Broadcom Corp.
  idProduct          0x4500 BCM2046B1 USB 2.0 Hub (part of BCM2046 Bluetooth)
  bcdDevice            1.00
  iManufacturer           1 Apple Inc.
  iProduct                2 BRCM2046 Hub
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0 Full speed (or root) hub
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0001  1x 1 bytes
        bInterval             255
Hub Descriptor:
  bLength               9
  bDescriptorType      41
  nNbrPorts             3
  wHubCharacteristic 0x0004
    Ganged power switching
    Compound device
    Ganged overcurrent protection
  bPwrOn2PwrGood       50 * 2 milli seconds
  bHubContrCurrent    100 milli Ampere
  DeviceRemovable    0x0e
  PortPwrCtrlMask    0xff
 Hub Port Status:
   Port 1: 0000.0103 power enable connect
   Port 2: 0000.0100 power
   Port 3: 0000.0100 power
Device Status:     0x0001
  Self Powered

Bus 001 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         2 TT per port
  bMaxPacketSize0        64
  idVendor           0x0424 Standard Microsystems Corp.
  idProduct          0x2514 USB 2.0 Hub
  bcdDevice            0.03
  iManufacturer           0 
  iProduct                0 
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           41
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                2mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      1 Single TT
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0001  1x 1 bytes
        bInterval              12
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      2 TT per port
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0001  1x 1 bytes
        bInterval              12
Hub Descriptor:
  bLength               9
  bDescriptorType      41
  nNbrPorts             4
  wHubCharacteristic 0x000d
    Per-port power switching
    Compound device
    Per-port overcurrent protection
    TT think time 8 FS bits
  bPwrOn2PwrGood       50 * 2 milli seconds
  bHubContrCurrent      1 milli Ampere
  DeviceRemovable    0x06
  PortPwrCtrlMask    0xff
 Hub Port Status:
   Port 1: 0000.0103 power enable connect
   Port 2: 0000.0503 highspeed power enable connect
   Port 3: 0000.0103 power enable connect
   Port 4: 0000.0100 power
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         0 Full speed (or root) hub
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0001
  Self Powered

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         0 Full speed (or root) hub
  bMaxPacketSize0        64
  idVendor           0x1d6b Linux Foundation
  idProduct          0x0002 2.0 root hub
  bcdDevice            2.06
  iManufacturer           3 Linux 2.6.34-yack ehci_hcd
  iProduct                2 EHCI Host Controller
  iSerial                 1 0000:00:1a.7
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0 Full speed (or root) hub
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0004  1x 4 bytes
        bInterval              12
Hub Descriptor:
  bLength               9
  bDescriptorType      41
  nNbrPorts             6
  wHubCharacteristic 0x000a
    No power switching (usb 1.0)
    Per-port overcurrent protection
  bPwrOn2PwrGood       10 * 2 milli seconds
  bHubContrCurrent      0 milli Ampere
  DeviceRemovable    0x00
  PortPwrCtrlMask    0xff
 Hub Port Status:
   Port 1: 0000.0503 highspeed power enable connect
   Port 2: 0000.0100 power
   Port 3: 0000.0100 power
   Port 4: 0000.0100 power
   Port 5: 0000.0100 power
   Port 6: 0000.0100 power
Device Status:     0x0003
  Self Powered
  Remote Wakeup Enabled

[-- Attachment #3: btusb.patch --]
[-- Type: text/x-patch, Size: 349 bytes --]

--- drivers/bluetooth/btusb.c.orig	2010-06-08 13:56:24.795854799 +0400
+++ drivers/bluetooth/btusb.c	2010-06-08 12:32:28.143014319 +0400
@@ -75,6 +75,9 @@
 	/* Canyon CN-BTU1 with HID interfaces */
 	{ USB_DEVICE(0x0c10, 0x0000) },
 
+	/* Apple iMac11,1 with HID interfaces */
+	{ USB_DEVICE(0x05ac, 0x8215) },
+
 	{ }	/* Terminating entry */
 };
 

^ permalink raw reply

* RE: [PATCH] Don't handle Changed Combination Link Key for a temporary keys.
From: Waldemar.Rymarkiewicz @ 2010-06-16 10:39 UTC (permalink / raw)
  To: johan.hedberg; +Cc: linux-bluetooth, par-gunnar.p.hjalmdahl
In-Reply-To: <20100616102558.GA6512@jh-x301>


Yes. That's exactly this situation. 

Thanks,
/Waldek



-----Original Message-----
From: Johan Hedberg [mailto:johan.hedberg@gmail.com] 
Sent: Wednesday, June 16, 2010 12:26 PM
To: Rymarkiewicz Waldemar
Cc: linux-bluetooth@vger.kernel.org; par-gunnar.p.hjalmdahl@stericsson.com
Subject: Re: [PATCH] Don't handle Changed Combination Link Key for a temporary keys.

Hi,

On Wed, Jun 16, 2010, Waldemar.Rymarkiewicz@tieto.com wrote:
> Patch on behalf of ST-Ericsson SA
> 
> This patch prevents from storing Changed Combination Link Key type for 
> temporary keys.  Getting Changed Combination Link Key remote auth 
> requirements are already set to 0xff (bonding has finished) and that 
> lets the system to store the key type of Changed Combination (0x06). 
> For temporary keys we don't have to care about Change Link Key event.
> ---
>  src/dbus-hci.c |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)

Thanks for the patch. It has been pushed upstream. In the future please fix your git author name since it was set to your email address (I fixed it manually this time).

Just to get this clear, this takes care of the situation where we had a link key with a "No Bonding" requirement and get a renewed key for the connection in which case we should still honor the no bonding requirement by not storing the renewed key, right? That's the only other type of "temporary" link key that I can think of in addition to debug keys (which we already take care of).

Johan

^ permalink raw reply

* Re: [PATCH 2/2] Add SetProperty method and Debug property
From: Johan Hedberg @ 2010-06-16 10:34 UTC (permalink / raw)
  To: Gustavo F. Padovan; +Cc: linux-bluetooth
In-Reply-To: <1276673478-9273-2-git-send-email-gustavo@padovan.org>

Hi Gustavo,

On Wed, Jun 16, 2010, Gustavo F. Padovan wrote:
> +static DBusMessage *set_debug(DBusConnection *conn, DBusMessage *msg,
> +					const char *debug_string, void *data)
> +{
> +	char *old_string;
> +
> +	if (!g_utf8_validate(debug_string, -1, NULL)) {
> +		error("DebugString change failed: supplied string "
> +							"isn't valid UTF-8");
> +		return invalid_args(msg);
> +	}
> +
> +	old_string = __btd_get_debug();
> +
> +	if (strcmp((char *)debug_string, old_string) == 0)

At least according to my manpage of strcmp the input is already const so
the case is unnecessary here. You might also want to use g_str_equal in
this case.

> +	if (!__btd_set_debug((char *)debug_string))

Since __btd_set_debug g_strdup's the input the right fix is to declare
its input parameter as const, and then the need to do a cast here goes
away.

Johan

^ permalink raw reply

* Re: [PATCH 1/2] log: Add function to get/set debug_string
From: Johan Hedberg @ 2010-06-16 10:29 UTC (permalink / raw)
  To: Gustavo F. Padovan; +Cc: linux-bluetooth
In-Reply-To: <1276673478-9273-1-git-send-email-gustavo@padovan.org>

Hi Gustavo,

On Wed, Jun 16, 2010, Gustavo F. Padovan wrote:
> +void __btd_log_init(const char *debug, int detach)
> +{
> +	int option = LOG_NDELAY | LOG_PID;
> +
> +	debug_string = (char *)debug;

This doesn't look right. Either the function declares the parameter as
const for a reason (i.e. it promises not to mess around with it) or then
the const should go away. I think the former is correct in this case,
i.e. you should probably be doing g_strdup on the input parameter.

Johan

^ permalink raw reply

* Re: [PATCH] Don't handle Changed Combination Link Key for a temporary keys.
From: Johan Hedberg @ 2010-06-16 10:25 UTC (permalink / raw)
  To: Waldemar.Rymarkiewicz; +Cc: linux-bluetooth, par-gunnar.p.hjalmdahl
In-Reply-To: <99B09243E1A5DA4898CDD8B70011144809696FDFB0@EXMB04.eu.tieto.com>

Hi,

On Wed, Jun 16, 2010, Waldemar.Rymarkiewicz@tieto.com wrote:
> Patch on behalf of ST-Ericsson SA
> 
> This patch prevents from storing Changed Combination Link Key type
> for temporary keys.  Getting Changed Combination Link Key remote
> auth requirements are already set to 0xff (bonding has finished)
> and that lets the system to store the key type of Changed
> Combination (0x06). For temporary keys we don't have to care about
> Change Link Key event.
> ---
>  src/dbus-hci.c |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)

Thanks for the patch. It has been pushed upstream. In the future please
fix your git author name since it was set to your email address (I fixed
it manually this time).

Just to get this clear, this takes care of the situation where we had a
link key with a "No Bonding" requirement and get a renewed key for the
connection in which case we should still honor the no bonding
requirement by not storing the renewed key, right? That's the only other
type of "temporary" link key that I can think of in addition to debug
keys (which we already take care of).

Johan

^ permalink raw reply

* Re: double Connect req: psm 1 scid 0x0040 ?
From: Andrei Emeltchenko @ 2010-06-16 10:21 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: Ed Tsang, Bluettooth Linux
In-Reply-To: <1265209673.31341.116.camel@localhost.localdomain>

Hi,

On Wed, Feb 3, 2010 at 6:07 PM, Marcel Holtmann <marcel@holtmann.org> wrote=
:
>> >> In hcidump I seem to see a problem in #3. After the Encrypt Change th=
ere seem to be 2 >con. req. psm 1 scid 0x0040
>>
>> >what kernel version is this? I think we fixed that already.
>> It is a ubutunu distribution. 2.6.31-17-generic.
>
> can you test with a 2.6.33-rc6 vanilla kernel. I really thing this got
> fixed and you might see a side effect or bad patch here.

Marcel we are seeing "double L2CAP connect also" when connecting to
some smartphones using contran profile. What about following patch
proposal:

The idea is to use existing flag L2CAP_CONF_CONNECT_PEND to mark that
L2CAP request has been sent.

Currently it is durty hack, I will send modified patch later today.

diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index fc81acb..27bff6e 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -394,6 +394,12 @@ static void l2cap_do_start(struct sock *sk)

                        l2cap_pi(sk)->ident =3D l2cap_get_ident(conn);

+                       if (l2cap_pi(sk)->conf_state &
L2CAP_CONF_CONNECT_PEND) {
+                               printk(KERN_ERR "\n!!! %s: Connection
pending !!!\n", __FUNCTION__);
+                               return;
+                       }
+
+                       l2cap_pi(sk)->conf_state |=3D L2CAP_CONF_CONNECT_PE=
ND;
                        l2cap_send_cmd(conn, l2cap_pi(sk)->ident,
                                        L2CAP_CONN_REQ, sizeof(req), &req);
                }
@@ -448,6 +454,13 @@ static void l2cap_conn_start(struct l2cap_conn *conn)

                                l2cap_pi(sk)->ident =3D l2cap_get_ident(con=
n);

+                               if (l2cap_pi(sk)->conf_state &
L2CAP_CONF_CONNECT_PEND) {
+                                       printk(KERN_ERR "\n!!! %s:
Connection pending !!!\n", __FUNCTION__);
+                                       bh_unlock_sock(sk);
+                                       continue;
+                               }
+
+                               l2cap_pi(sk)->conf_state |=3D
L2CAP_CONF_CONNECT_PEND;
                                l2cap_send_cmd(conn, l2cap_pi(sk)->ident,
                                        L2CAP_CONN_REQ, sizeof(req), &req);
                        }
@@ -3809,6 +3822,7 @@ static int l2cap_security_cfm(struct hci_conn
*hcon, u8 status, u8 encrypt)
                bh_lock_sock(sk);

                if (l2cap_pi(sk)->conf_state & L2CAP_CONF_CONNECT_PEND) {
+                       printk(KERN_ERR "\n!!! %s: Connection pending
!!!\n", __FUNCTION__);
                        bh_unlock_sock(sk);
                        continue;
                }
@@ -3828,6 +3842,7 @@ static int l2cap_security_cfm(struct hci_conn
*hcon, u8 status, u8 encrypt)

                                l2cap_pi(sk)->ident =3D l2cap_get_ident(con=
n);

+                               l2cap_pi(sk)->conf_state |=3D
L2CAP_CONF_CONNECT_PEND;
                                l2cap_send_cmd(conn, l2cap_pi(sk)->ident,
                                        L2CAP_CONN_REQ, sizeof(req), &req);



>
> Regards
>
> Marcel
>
>
> --
> 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 =A0http://vger.kernel.org/majordomo-info.html
>

^ permalink raw reply related

* [PATCH] Don't handle Changed Combination Link Key for a temporary keys.
From: Waldemar.Rymarkiewicz @ 2010-06-16  8:53 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: par-gunnar.p.hjalmdahl

Patch on behalf of ST-Ericsson SA

This patch prevents from storing Changed Combination Link Key type
for temporary keys.  Getting Changed Combination Link Key remote
auth requirements are already set to 0xff (bonding has finished)
and that lets the system to store the key type of Changed
Combination (0x06). For temporary keys we don't have to care about
Change Link Key event.
---
 src/dbus-hci.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/dbus-hci.c b/src/dbus-hci.c
index 19748a7..a3fd557 100644
--- a/src/dbus-hci.c
+++ b/src/dbus-hci.c
@@ -681,12 +681,19 @@ int hcid_dbus_link_key_notify(bdaddr_t *local, bdaddr_t *peer,
 			old_key_type = 0x03;
 		if (old_key_type != 0xff)
 			new_key_type = old_key_type;
+		else
+			/* This is Changed Combination Link Key for
+			 * a temporary link key.*/
+			return 0;
 	}
 
 	get_auth_requirements(local, peer, &local_auth);
 	remote_auth = device_get_auth(device);
 	bonding = device_is_bonding(device, NULL);
 
+	DBG("key type 0x%02x old key type 0x%02x new key type 0x%02x",
+					key_type, old_key_type, new_key_type);
+
 	DBG("local auth 0x%02x and remote auth 0x%02x",
 					local_auth, remote_auth);
 
-- 
1.7.0.4
 

^ permalink raw reply related

* [PATCH 2/2] Add SetProperty method and Debug property
From: Gustavo F. Padovan @ 2010-06-16  7:31 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: gustavo
In-Reply-To: <1276673478-9273-1-git-send-email-gustavo@padovan.org>

---
 doc/manager-api.txt |   16 ++++++++++++
 src/manager.c       |   65 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 81 insertions(+), 0 deletions(-)

diff --git a/doc/manager-api.txt b/doc/manager-api.txt
index d2c1caf..22ee912 100644
--- a/doc/manager-api.txt
+++ b/doc/manager-api.txt
@@ -22,6 +22,15 @@ Methods		dict GetProperties()
 			Possible Errors: org.bluez.Error.DoesNotExist
 					 org.bluez.Error.InvalidArguments
 
+		void SetProperty(string name, variant value)
+
+			Changes the value of the specified property. Only
+			properties that are listed a read-write are changeable.
+			On success this will emit a PropertyChanged signal.
+
+			Possible Errors: org.bluez.Error.DoesNotExist
+					 org.bluez.Error.InvalidArguments
+
 		object DefaultAdapter()
 
 			Returns object path for the default adapter.
@@ -72,3 +81,10 @@ Signals		PropertyChanged(string name, variant value)
 Properties	array{object} Adapters [readonly]
 
 			List of adapter object paths.
+
+		string Debug [readwrite]
+
+			Change the dynamic debug match string. Use it to
+			restrict debug to specific files. The default value is
+			"*" to debug all files. The "" string switch debug
+			off.
diff --git a/src/manager.c b/src/manager.c
index cbbca1e..d146e4c 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -80,6 +80,31 @@ static inline DBusMessage *no_such_adapter(DBusMessage *msg)
 			"No such adapter");
 }
 
+static DBusMessage *set_debug(DBusConnection *conn, DBusMessage *msg,
+					const char *debug_string, void *data)
+{
+	char *old_string;
+
+	if (!g_utf8_validate(debug_string, -1, NULL)) {
+		error("DebugString change failed: supplied string "
+							"isn't valid UTF-8");
+		return invalid_args(msg);
+	}
+
+	old_string = __btd_get_debug();
+
+	if (strcmp((char *)debug_string, old_string) == 0)
+		return dbus_message_new_method_return(msg);
+
+	if (!__btd_set_debug((char *)debug_string))
+		return g_dbus_create_error(msg, ERROR_INTERFACE ".Failed",
+							strerror(ENOMEM));
+	emit_property_changed(connection, "/", MANAGER_INTERFACE,
+				"Debug", DBUS_TYPE_STRING, &debug_string);
+
+	return dbus_message_new_method_return(msg);
+}
+
 static DBusMessage *default_adapter(DBusConnection *conn,
 					DBusMessage *msg, void *data)
 {
@@ -183,6 +208,7 @@ static DBusMessage *get_properties(DBusConnection *conn,
 	DBusMessageIter dict;
 	GSList *list;
 	char **array;
+	char *debug_string;
 	int i;
 
 	reply = dbus_message_new_method_return(msg);
@@ -208,13 +234,52 @@ static DBusMessage *get_properties(DBusConnection *conn,
 	dict_append_array(&dict, "Adapters", DBUS_TYPE_OBJECT_PATH, &array, i);
 	g_free(array);
 
+	debug_string = __btd_get_debug();
+	dict_append_entry(&dict, "Debug", DBUS_TYPE_STRING,
+							&debug_string);
+
 	dbus_message_iter_close_container(&iter, &dict);
 
 	return reply;
 }
 
+static DBusMessage *set_property(DBusConnection *conn,
+					DBusMessage *msg, void *data)
+{
+	DBusMessageIter iter;
+	DBusMessageIter sub;
+	const char *property;
+
+	if (!dbus_message_iter_init(msg, &iter))
+		return invalid_args(msg);
+
+	if (dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_STRING)
+		return invalid_args(msg);
+
+	dbus_message_iter_get_basic(&iter, &property);
+	dbus_message_iter_next(&iter);
+
+	if (dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_VARIANT)
+		return invalid_args(msg);
+	dbus_message_iter_recurse(&iter, &sub);
+
+	if (g_str_equal("Debug", property)) {
+		const char *string;
+
+		if (dbus_message_iter_get_arg_type(&sub) != DBUS_TYPE_STRING)
+			return invalid_args(msg);
+		dbus_message_iter_get_basic(&sub, &string);
+
+		return set_debug(conn, msg, string, data);
+	}
+
+	return invalid_args(msg);
+}
+
 static GDBusMethodTable manager_methods[] = {
 	{ "GetProperties",	"",	"a{sv}",get_properties	},
+	{ "SetProperty",	"sv",	"",	set_property,
+						G_DBUS_METHOD_FLAG_ASYNC},
 	{ "DefaultAdapter",	"",	"o",	default_adapter	},
 	{ "FindAdapter",	"s",	"o",	find_adapter	},
 	{ "ListAdapters",	"",	"ao",	list_adapters,
-- 
1.7.1


^ permalink raw reply related

* [PATCH 1/2] log: Add function to get/set debug_string
From: Gustavo F. Padovan @ 2010-06-16  7:31 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: gustavo

---
 src/log.c |   53 +++++++++++++++++++++++++++++++++++++++++------------
 src/log.h |    2 ++
 2 files changed, 43 insertions(+), 12 deletions(-)

diff --git a/src/log.c b/src/log.c
index ed6e428..f53ace3 100644
--- a/src/log.c
+++ b/src/log.c
@@ -71,6 +71,8 @@ extern struct btd_debug_desc __stop___debug[];
 
 static gchar **enabled = NULL;
 
+static char *debug_string = NULL;
+
 static gboolean is_enabled(struct btd_debug_desc *desc)
 {
         int i;
@@ -90,22 +92,15 @@ static gboolean is_enabled(struct btd_debug_desc *desc)
         return 0;
 }
 
-void __btd_toggle_debug()
-{
-	struct btd_debug_desc *desc;
-
-	for (desc = __start___debug; desc < __stop___debug; desc++)
-		desc->flags |= BTD_DEBUG_FLAG_PRINT;
-}
-
-void __btd_log_init(const char *debug, int detach)
+static void debug_on()
 {
-	int option = LOG_NDELAY | LOG_PID;
 	struct btd_debug_desc *desc;
 	const char *name = NULL, *file = NULL;
 
-	if (debug != NULL)
-		enabled = g_strsplit_set(debug, ":, ", 0);
+	if (debug_string == NULL)
+		debug_string = g_strdup("");
+
+	enabled = g_strsplit_set(debug_string, ":, ", 0);
 
 	for (desc = __start___debug; desc < __stop___debug; desc++) {
 		if (file != NULL || name != NULL) {
@@ -118,7 +113,41 @@ void __btd_log_init(const char *debug, int detach)
 
 		if (is_enabled(desc))
 			desc->flags |= BTD_DEBUG_FLAG_PRINT;
+		else
+			desc->flags &= ~BTD_DEBUG_FLAG_PRINT;
 	}
+}
+
+char *__btd_get_debug()
+{
+	return debug_string;
+}
+
+char *__btd_set_debug(char *str)
+{
+	g_free(debug_string);
+	debug_string = g_strdup(str);
+
+	debug_on();
+
+	return debug_string;
+}
+
+void __btd_toggle_debug()
+{
+	struct btd_debug_desc *desc;
+
+	for (desc = __start___debug; desc < __stop___debug; desc++)
+		desc->flags |= BTD_DEBUG_FLAG_PRINT;
+}
+
+void __btd_log_init(const char *debug, int detach)
+{
+	int option = LOG_NDELAY | LOG_PID;
+
+	debug_string = (char *)debug;
+
+	debug_on();
 
 	if (!detach)
 		option |= LOG_PERROR;
diff --git a/src/log.h b/src/log.h
index 4e0e518..2dfce8d 100644
--- a/src/log.h
+++ b/src/log.h
@@ -28,6 +28,8 @@ void btd_debug(const char *format, ...) __attribute__((format(printf, 1, 2)));
 
 void __btd_log_init(const char *debug, int detach);
 void __btd_log_cleanup(void);
+char *__btd_get_debug();
+char *__btd_set_debug(char *str);
 void __btd_toggle_debug();
 
 struct btd_debug_desc {
-- 
1.7.1


^ permalink raw reply related

* Re: [PATCH v3 1/3] Implements hci_reassembly to reassemble Rx packets
From: suraj @ 2010-06-16  7:24 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: marcel, Luis.Rodriguez, Jothikumar.Mothilal
In-Reply-To: <1276088748.31226.6.camel@atheros013-desktop>

Hi Marcel,

On Wed, 2010-06-09 at 18:35 +0530, suraj wrote:
> Implements feature to reassemble received HCI frames from any input stream.
> 
> Signed-off-by: Suraj Sumangala <suraj@atheros.com>
> ---
>  net/bluetooth/hci_core.c |  115 ++++++++++++++++++++++++++++++++++++++++++++++
>  1 files changed, 115 insertions(+), 0 deletions(-)
> 
Let me know if you have any comments on this implementation

Regards
Suraj

^ permalink raw reply

* [PATCH] Bluetooth: Update sec_level and auth_type for already existing connections
From: Emeltchenko Andrei @ 2010-06-15 12:56 UTC (permalink / raw)
  To: linux-bluetooth

From: Ville Tervo <ville.tervo@nokia.com>

Update auth level for already existing connections if it is lower
than required by new connection.

Signed-off-by: Ville Tervo <ville.tervo@nokia.com>
Reviewed-by: Emeltchenko Andrei <andrei.emeltchenko@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
---
 net/bluetooth/hci_conn.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index b10e3cd..800b6b9 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -358,6 +358,11 @@ struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst, __u8
 		acl->sec_level = sec_level;
 		acl->auth_type = auth_type;
 		hci_acl_connect(acl);
+	} else {
+		if (acl->sec_level < sec_level)
+			acl->sec_level = sec_level;
+		if (acl->auth_type < auth_type)
+			acl->auth_type = auth_type;
 	}
 
 	if (type == ACL_LINK)
-- 
1.7.0.4


^ permalink raw reply related

* [PATCH 2/8 v2]Bluetooth: Fix warning: variable 'tty' set but not used
From: Justin P. Mattock @ 2010-06-15  1:26 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: gustavo, linux-kernel, Justin P. Mattock

Resend of this patch to fix whitespace issues
The patch below fixes a warning message
when using gcc 4.6.0

  CC [M]  drivers/bluetooth/hci_ldisc.o
drivers/bluetooth/hci_ldisc.c: In function 'hci_uart_send_frame':
drivers/bluetooth/hci_ldisc.c:213:21: warning: variable 'tty' set but not used


 Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
 Reviewed-By: Gustavo F. Padovan <gustavo@padovan.org>

---
 drivers/bluetooth/hci_ldisc.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c
index 76a1abb..e8beffe 100644
--- a/drivers/bluetooth/hci_ldisc.c
+++ b/drivers/bluetooth/hci_ldisc.c
@@ -210,7 +210,6 @@ static int hci_uart_close(struct hci_dev *hdev)
 static int hci_uart_send_frame(struct sk_buff *skb)
 {
 	struct hci_dev* hdev = (struct hci_dev *) skb->dev;
-	struct tty_struct *tty;
 	struct hci_uart *hu;
 
 	if (!hdev) {
@@ -222,7 +221,6 @@ static int hci_uart_send_frame(struct sk_buff *skb)
 		return -EBUSY;
 
 	hu = (struct hci_uart *) hdev->driver_data;
-	tty = hu->tty;
 
 	BT_DBG("%s: type %d len %d", hdev->name, bt_cb(skb)->pkt_type, skb->len);
 
-- 
1.7.1.rc1.21.gf3bd6


^ permalink raw reply related

* Re: [PATCH 2/8]bluetooth/hci_ldisc.c Fix warning: variable 'tty' set but not used
From: Gustavo F. Padovan @ 2010-06-15  0:24 UTC (permalink / raw)
  To: Justin P. Mattock
  Cc: linux-kernel, reiserfs-devel, linux-bluetooth, clemens, debora,
	dri-devel, linux-i2c, linux1394-devel, linux-media
In-Reply-To: <1276547208-26569-3-git-send-email-justinmattock@gmail.com>

Hi Justin,

* Justin P. Mattock <justinmattock@gmail.com> [2010-06-14 13:26:42 -0700]:

> Im getting this while building:
>   CC [M]  drivers/bluetooth/hci_ldisc.o
> drivers/bluetooth/hci_ldisc.c: In function 'hci_uart_send_frame':
> drivers/bluetooth/hci_ldisc.c:213:21: warning: variable 'tty' set but not used
> 
> the below fixed it for me, but am not sure if
> it's correct.


The fix is correct, you just need to fix the trailing whitespace
problem and resend it.
Also we use "Bluetooth:" as part of the commit message on the bluetooth
subsystem. For example:

"Bluetooth: Remove set but not used varible 'tty' 

Or something like that.

-- 
Gustavo F. Padovan
http://padovan.org

^ permalink raw reply

* [PATCH 2/8]bluetooth/hci_ldisc.c Fix warning: variable 'tty' set but not used
From: Justin P. Mattock @ 2010-06-14 20:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: reiserfs-devel, linux-bluetooth, clemens, debora, dri-devel,
	linux-i2c, linux1394-devel, linux-media, Justin P. Mattock
In-Reply-To: <1276547208-26569-1-git-send-email-justinmattock@gmail.com>

Im getting this while building:
  CC [M]  drivers/bluetooth/hci_ldisc.o
drivers/bluetooth/hci_ldisc.c: In function 'hci_uart_send_frame':
drivers/bluetooth/hci_ldisc.c:213:21: warning: variable 'tty' set but not used

the below fixed it for me, but am not sure if
it's correct.

 Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>

---
 drivers/bluetooth/hci_ldisc.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c
index 76a1abb..f693dfe 100644
--- a/drivers/bluetooth/hci_ldisc.c
+++ b/drivers/bluetooth/hci_ldisc.c
@@ -210,7 +210,6 @@ static int hci_uart_close(struct hci_dev *hdev)
 static int hci_uart_send_frame(struct sk_buff *skb)
 {
 	struct hci_dev* hdev = (struct hci_dev *) skb->dev;
-	struct tty_struct *tty;
 	struct hci_uart *hu;
 
 	if (!hdev) {
@@ -222,8 +221,7 @@ static int hci_uart_send_frame(struct sk_buff *skb)
 		return -EBUSY;
 
 	hu = (struct hci_uart *) hdev->driver_data;
-	tty = hu->tty;
-
+	
 	BT_DBG("%s: type %d len %d", hdev->name, bt_cb(skb)->pkt_type, skb->len);
 
 	hu->proto->enqueue(hu, skb);
-- 
1.7.1.rc1.21.gf3bd6


^ permalink raw reply related

* [PATCH 0/8] Fix gcc 4.6.0 set but not used warning messages.
From: Justin P. Mattock @ 2010-06-14 20:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: reiserfs-devel, linux-bluetooth, clemens, debora, dri-devel,
	linux-i2c, linux1394-devel, linux-media




First and foremost, I must
thank anybody taking the time to even
look at these(I know you people have better
things to be doing).

And secondly here is my try at trying
to fix some of the warning messages
spammed by gcc 4.6.0 when building the
kernel. Some of them I removed, and
some of them I just shut off.

Note: Removing the code does seem like a
good approach(if it's actually dead),
but if not then something needs
to be fixed.
As for shutting off the code to shutup gcc
does seem like a temporary fix, but would
rather have a warning message, than see it get
lost in the sands of time.

In any case Thanks for taking the time,
and hopefully we can get fixes for all of
this mess generated by gcc..

Justin P. Mattock


^ permalink raw reply

* Re: Proposed MAP client D-Bus API (was: Proposed MAP API)
From: Johan Hedberg @ 2010-06-14 14:16 UTC (permalink / raw)
  To: Counihan, Tom; +Cc: linux-bluetooth@vger.kernel.org
In-Reply-To: <B09AD526409DF14F8DA79CC5429052C28F7AAD48@irsmsx505.ger.corp.intel.com>

Hi Tom,

On Mon, Jun 14, 2010, Counihan, Tom wrote:
> Many thanks for the prompt response Johan,

No problem :)

> Not sure at all really. I had my suspicion, but wanted to start somewhere.
> What you suggest makes perfect sense really - back to the drawing
> board for me :$ - just need to figure out a logical home for this.

Note that I'm not strictly saying that it can't be D-Bus based. Only
that there's a considerable risk with that and that you should
understand the pros and cons of the different alternatives. E.g.
compared to D-Bus a library would restrict you more in terms of what
programing languages can be used for the application whereas there's
quite a plethora of D-Bus bindings out there. You'd also need to
consider potential multithreading issues and pay close attention in
designing the API so that it can be conveniently hooked up to whatever
mainloop the application has, or then simply decide that only one
mainloop, e.g. the glib one, is supported.

> On an aside, could the same comment be made regarding PBAP re contact
> pictures?

Yes, I think so.

Johan

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox