Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751762AbbFUEX2 (ORCPT ); Sun, 21 Jun 2015 00:23:28 -0400 Received: from blu004-omc1s5.hotmail.com ([65.55.116.16]:50760 "EHLO BLU004-OMC1S5.hotmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750948AbbFUEXV (ORCPT ); Sun, 21 Jun 2015 00:23:21 -0400 X-TMN: [aZjqPgBmqwdeYbPUcvjDbWI/eo/tVczq] X-Originating-Email: [xry111@outlook.com] Message-ID: Date: Sun, 21 Jun 2015 12:23:07 +0800 From: Xi Ruoyao User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Larry Finger , Marcel Holtmann CC: "Gustavo F. Padovan" , Johan Hedberg , Linux Bluetooth Maillist , Linux Kernel Maillist , Daniel Drake , Xi Ruoyao Subject: Re: [PATCH] Bluetooth: btusb: Add Realtek devices into module device table References: <55860F8C.4050205@lwfinger.net> In-Reply-To: Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 21 Jun 2015 04:23:19.0478 (UTC) FILETIME=[0095C560:01D0ABDA] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3057 Lines: 79 On 06/21/2015 12:11 PM, Xi Ruoyao wrote: > On 06/21/2015 09:12 AM, Larry Finger wrote: >> On 06/20/2015 04:58 PM, Marcel Holtmann wrote: >>> Hi Xi, >>> >>>> In 'commit a2698a9bf9b0 ("Bluetooth: btusb: Add Realtek >>>> 8723A/8723B/8761A/8821A support"), support of some Realtek >>>> devices was added to the Generic Bluetooth USB driver in kernel. >>>> However, these devices are not in the module device table of >>>> btusb.ko, so the kernel wouldn't probe them at all. >>>> >>>> To fix this, add four entries in the device table btusb_table, >>>> based on code from >>>> ('new' branch). >>>> >>>> This enables bluetooth support in the Lenovo Ideapad Yoga 13 >>>> which has RTL8723AU USB device, with product ID 0bda:1724. >>>> >>>> Signed-off-by: Xi Ruoyao >>>> --- >>>> drivers/bluetooth/btusb.c | 6 ++++++ >>>> 1 file changed, 6 insertions(+) >>>> >>>> diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c >>>> index 3c10d4d..dd87623 100644 >>>> --- a/drivers/bluetooth/btusb.c >>>> +++ b/drivers/bluetooth/btusb.c >>>> @@ -148,6 +148,12 @@ static const struct usb_device_id >>>> btusb_table[] = { >>>> { USB_DEVICE(0x8087, 0x0a5a), >>>> .driver_info = BTUSB_INTEL_BOOT | BTUSB_BROKEN_ISOC }, >>>> >>>> + /* Realtek Bluetooth */ >>>> + { USB_VENDOR_AND_INTERFACE_INFO(0x0bda, 0xe0, 0x01, 0x01) }, >>>> + { USB_VENDOR_AND_INTERFACE_INFO(0x0bd5, 0xe0, 0x01, 0x01) }, >>>> + { USB_VENDOR_AND_INTERFACE_INFO(0x13d3, 0xe0, 0x01, 0x01) }, >>>> + { USB_VENDOR_AND_INTERFACE_INFO(0x0489, 0xe0, 0x01, 0x01) }, >>>> + >>> >>> I highly doubt these are needed. There is a generic entry for an USB >>> transport that is already covering these. >> >> Something changed in recent kernels, and the generic USB transport >> entries do not seem to be recognized in the case where a wifi and BT >> device share a single USB ID. As the OP's tablet has such a case, I >> suggest that 0bda line be accepted, but not the others. If I had a >> computer with an RTL8723AU, I would have a chance at debugging what >> changed, but sadly, that is not the case. >> >> Larry >> > > I viewed the output of 'lsusb -d 0bda:1724 -v | less', and I found > that my RTL8723AU has 'bDeviceClass' 239 (0xef, means 'Miscellaneous > Device') > but 'bInterfaceClass' 224 (0xe0, means 'Wireless'). > > So maybe the Generic Bluetooth USB device entry should be > '{ USB_INTERFACE_INFO(0xe0, 0x01, 0x01) },' > instead of > '{ USB_DEVICE_INFO(0xe0, 0x01, 0x01) },' > > Now I'm compiling this. > This approach works well on my tablet. So, which way is better, edit Generic Bluetooth USB device entry, or add a new 0bda entry? And below the Generic Bluetooth USB device entry there is Generic Bluetooth AMP device entry. Should we use USB_INTERFACE_INFO on this too? -- Xi Ruoyao School of Aerospace Science and Technology Xidian University, Xi'an, China -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in Please read the FAQ at http://www.tux.org/lkml/