Return-Path: MIME-Version: 1.0 In-Reply-To: <024FA95B-C70F-42ED-BDBF-69D09AA58203@holtmann.org> References: <300602D8-9DB7-4F8D-AC97-B60924554093@holtmann.org> <38429B86-0E46-4C6A-9954-3260D864B10C@holtmann.org> <024FA95B-C70F-42ED-BDBF-69D09AA58203@holtmann.org> Date: Sat, 18 Apr 2015 12:18:55 +0200 Message-ID: Subject: Re: [V4.1] Regression: Bluetooth mouse not working. From: =?UTF-8?Q?J=C3=B6rg_Otte?= To: Marcel Holtmann Cc: Linus Torvalds , "Gustavo F. Padovan" , Johan Hedberg , "bluez mailin list (linux-bluetooth@vger.kernel.org)" , Linux Kernel Mailing List Content-Type: text/plain; charset=UTF-8 List-ID: What this patch tried to do is to limit it to what userspace is currently actually using. My mistake was to look only at BlueZ 5.x userspace and not at BlueZ 4.x userspace. The fix to not break existing userspace is essentially this: > > diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c > index a05b9dbf14c9..9070dfd6b4ad 100644 > --- a/net/bluetooth/hidp/core.c > +++ b/net/bluetooth/hidp/core.c > @@ -1313,7 +1313,8 @@ int hidp_connection_add(struct hidp_connadd_req *re= q, > struct socket *ctrl_sock, > struct socket *intr_sock) > { > - u32 valid_flags =3D 0; > + u32 valid_flags =3D BIT(HIDP_VIRTUAL_CABLE_UNPLUG) | > + BIT(HIDP_BOOT_PROTOCOL_MODE); > > I ask Joerg to test this patch, but looking at old userspace is that is w= hat is happening there. > I think the last 3 lines are missing, the complete patch is: diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c index a05b9db..02298bc 100644 --- a/net/bluetooth/hidp/core.c +++ b/net/bluetooth/hidp/core.c @@ -1313,7 +1313,8 @@ int hidp_connection_add(struct hidp_connadd_req *req, struct socket *ctrl_sock, struct socket *intr_sock) { - u32 valid_flags =3D 0; + u32 valid_flags =3D BIT(HIDP_VIRTUAL_CABLE_UNPLUG) | + BIT(HIDP_BOOT_PROTOCOL_MODE); struct hidp_session *session; struct l2cap_conn *conn; struct l2cap_chan *chan; that patch works for me. Thanks, J=C3=B6rg