Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp4271780pxb; Mon, 4 Oct 2021 22:29:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwl6c1ZYMXmw5TQ4qY0Jn20p1kuht6Faa/d7bgpa+SwIj3Mep3q1/vumX9wPelFs0LT+c1D X-Received: by 2002:a50:9b06:: with SMTP id o6mr23554401edi.284.1633411748895; Mon, 04 Oct 2021 22:29:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633411748; cv=none; d=google.com; s=arc-20160816; b=Frc90CLM7J6yAlbfUDRc1fIE0x07Ssow9yjZKlrggUZMxHtoETphlszX3m3cOwoRFc e9S2mW9wa0DnQxzNFMNU7dfFZ/CC5OBIM0bylicVrMbcpEHp/hzqJr+RBQI769vUwwrA +jXJGOajfW2puRdyj8GzAOk+D0b/DCWqC1zdelbkMgFzfaDRC+i8ytbd8KFK2ZUs/wrh 0474AET5q/2mWxyKc/jwXO5uODq5tps5a0ydzdLvo9NlR5RdrUm3zu3ZzWVebW2CZRvx K4fHo4fqIytOW1oi5aV+72cYF5lB2P8SkmQ26h9/H/F7AjDvATLmU2OgqDZG0HypHUd2 P/7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:authenticated-by; bh=DzNbxoG7Xv7hsPK6r398HWjoOcAQKtaitXnoFYhG+EM=; b=Hu+ODSmMJOKkheFf1PTbl+CCrkjAFZxMSrZxJIMUiygXEH0o1DgnbxopSHPuKI1oAq kuwDxda510Jf44Q0RbXLtLP9SIWuSCdY+alwW6Q7HArVzGm4ZGvRmIPDrjAI/H8WkBny RsHTtDCf5tYHXAbD7i8olEPqy1tDCubCT6fJR16EBgyaN2FSHkpnsuaYsl/Vc4RfCPC5 1W2/1/x2qga628HxO1pBm5EmkW2QK5AaHYGr8Qy/majIJlITDwIb/0YrwUk7PAmEd9ND XRZ41gtCxIpRosL8yhPTlUiGRJLUzvnrC9TCKDIPSsq+f6omY4YtwwCso9ucFjHiqxRi lXiw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cr8si12858226edb.587.2021.10.04.22.28.44; Mon, 04 Oct 2021 22:29:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231740AbhJEF3B convert rfc822-to-8bit (ORCPT + 99 others); Tue, 5 Oct 2021 01:29:01 -0400 Received: from rtits2.realtek.com ([211.75.126.72]:36686 "EHLO rtits2.realtek.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230403AbhJEF3A (ORCPT ); Tue, 5 Oct 2021 01:29:00 -0400 Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.73 with qID 1955QtEsA032285, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36503.realtek.com.tw[172.21.6.25]) by rtits2.realtek.com.tw (8.15.2/2.71/5.88) with ESMTPS id 1955QtEsA032285 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Tue, 5 Oct 2021 13:26:55 +0800 Received: from RTEXDAG02.realtek.com.tw (172.21.6.101) by RTEXH36503.realtek.com.tw (172.21.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.14; Tue, 5 Oct 2021 13:26:54 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXDAG02.realtek.com.tw (172.21.6.101) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.14; Tue, 5 Oct 2021 13:26:53 +0800 Received: from RTEXMBS04.realtek.com.tw ([fe80::cdd5:82a3:e854:7098]) by RTEXMBS04.realtek.com.tw ([fe80::cdd5:82a3:e854:7098%5]) with mapi id 15.01.2106.013; Tue, 5 Oct 2021 13:26:53 +0800 From: Hilda Wu To: Marcel Holtmann CC: Johan Hedberg , Luiz Augusto von Dentz , "linux-bluetooth@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "kai.heng.feng@canonical.com" , "apusaka@chromium.org" , Max Chou , "alex_lu@realsil.com.cn" , KidmanLee Subject: RE: [PATCH] Bluetooth: btrtl: Ask ic_info to drop firmware Thread-Topic: [PATCH] Bluetooth: btrtl: Ask ic_info to drop firmware Thread-Index: AQHXtecNs2ZfObp2A0STG/YXQiKUp6u9X0sAgACLa3A= Date: Tue, 5 Oct 2021 05:26:53 +0000 Message-ID: <912f4b6441b54a1d89df6ffe4a0511ab@realtek.com> References: <20210930103634.1710-1-hildawu@realtek.com> In-Reply-To: Accept-Language: zh-TW, en-US Content-Language: zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.21.132.191] x-kse-serverinfo: RTEXDAG02.realtek.com.tw, 9 x-kse-attachmentfiltering-interceptor-info: no applicable attachment filtering rules found x-kse-antivirus-interceptor-info: scan successful x-kse-antivirus-info: =?us-ascii?Q?Clean,_bases:_2021/10/5_=3F=3F_02:02:00?= x-kse-bulkmessagesfiltering-scan-result: protection disabled Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-KSE-ServerInfo: RTEXH36503.realtek.com.tw, 9 X-KSE-Attachment-Filter-Triggered-Rules: Clean X-KSE-Attachment-Filter-Triggered-Filters: Clean X-KSE-BulkMessagesFiltering-Scan-Result: protection disabled X-KSE-AntiSpam-Outbound-Interceptor-Info: scan successful X-KSE-AntiSpam-Version: 5.9.20, Database issued on: 10/05/2021 05:13:52 X-KSE-AntiSpam-Status: KAS_STATUS_NOT_DETECTED X-KSE-AntiSpam-Method: none X-KSE-AntiSpam-Rate: 0 X-KSE-AntiSpam-Info: Lua profiles 166506 [Oct 04 2021] X-KSE-AntiSpam-Info: Version: 5.9.20.0 X-KSE-AntiSpam-Info: Envelope from: hildawu@realtek.com X-KSE-AntiSpam-Info: LuaCore: 463 463 5854868460de3f0d8e8c0a4df98aeb05fb764a09 X-KSE-AntiSpam-Info: {Tracking_uf_ne_domains} X-KSE-AntiSpam-Info: {Tracking_from_domain_doesnt_match_to} X-KSE-AntiSpam-Info: 127.0.0.199:7.1.2;realtek.com:7.1.1;source.android.com:7.1.1;docs.microsoft.com:7.1.1;d41d8cd98f00b204e9800998ecf8427e.com:7.1.1 X-KSE-AntiSpam-Info: Rate: 0 X-KSE-AntiSpam-Info: Status: not_detected X-KSE-AntiSpam-Info: Method: none X-KSE-AntiSpam-Info: Auth:dkim=none X-KSE-Antiphishing-Info: Clean X-KSE-Antiphishing-ScanningType: Heuristic X-KSE-Antiphishing-Method: None X-KSE-Antiphishing-Bases: 10/05/2021 05:17:00 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Marcel, Thank you for your review and suggestions. The MSFT extension has a HCI_VS_MSFT_Read_Supported_Features command. The AOSP extension has a read capability cmd too. https://docs.microsoft.com/en-us/windows-hardware/drivers/bluetooth/microsoft-defined-bluetooth-hci-commands-and-events#hci_vs_msft_read_supported_features https://source.android.com/devices/bluetooth/hci_requirements#vendor-specific-capabilities If commands did not support, the controller should feedback event status as Unknown HCI Command (0x01). We can go on this way. Regards, Hilda -----Original Message----- From: Marcel Holtmann Sent: Friday, October 1, 2021 5:42 PM To: Hilda Wu Cc: Johan Hedberg ; Luiz Augusto von Dentz ; linux-bluetooth@vger.kernel.org; linux-kernel@vger.kernel.org; kai.heng.feng@canonical.com; apusaka@chromium.org; Max Chou ; alex_lu@realsil.com.cn; KidmanLee Subject: Re: [PATCH] Bluetooth: btrtl: Ask ic_info to drop firmware Hi Hilda, > Some un-support wakeup platforms keep USB power and suspend signal is > coming late, this makes Realtek some chip keep its firmware, and make > it never load new firmware. > > So use vendor specific HCI command to ask them drop its firmware after > system shutdown or resume. > > Signed-off-by: Hilda Wu > --- > drivers/bluetooth/btrtl.c | 12 +++++++----- > 1 file changed, 7 insertions(+), 5 deletions(-) patch has been applied to bluetooth-next tree. Btw. is there a simple way (via vendor HCI commands or similar) to tell which RTL device supports the MSFT or AOSP extensions. I rather have this done once and not keep hacking it over and over again. Regards Marcel ------Please consider the environment before printing this e-mail.