Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753065AbbDRKS7 (ORCPT ); Sat, 18 Apr 2015 06:18:59 -0400 Received: from mail-wg0-f49.google.com ([74.125.82.49]:33665 "EHLO mail-wg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751694AbbDRKS4 convert rfc822-to-8bit (ORCPT ); Sat, 18 Apr 2015 06:18:56 -0400 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 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1718 Lines: 45 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 *req, > struct socket *ctrl_sock, > struct socket *intr_sock) > { > - u32 valid_flags = 0; > + u32 valid_flags = 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 what 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 = 0; + u32 valid_flags = 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örg -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/