Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3169634pxb; Mon, 9 Nov 2020 04:40:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJxLQ4Up8vevUAy1pF3/5tt4a3mvljIuLbDid3+ozuWRs31c/ZsaJCMm7SV7w1EtE7Kx0j72 X-Received: by 2002:a17:906:32d7:: with SMTP id k23mr14517205ejk.294.1604925608770; Mon, 09 Nov 2020 04:40:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604925608; cv=none; d=google.com; s=arc-20160816; b=llh1rvyglRBsZxqDUffeYreSG7Ph+yvtIiOCj5+enXa3Yr+wJijCoScL4NV+GoTdW+ 5r7cIoRPV7jlud+jke0B/bUV+lvWi0DAm8RvNS4wwkDDJedAob/cBzqU2YhUB2mysOWk DfBR2o4B+QVPobkPMdR48n/yep4fu3gmmVa0i7HATfif1ds279YG7hu4NpCnN1GnKjdu lxmTCJytdZODrIB3yLpfW9A6TBsnL8eRXvbloYyyscJBuuH3p3AIUgNtCWFWpkXJgQnX /ENOT2r0p4TMIFtQu5wJF6dsg22aPxe2m5/W22eS7MBzpm0e86ID6ZbnwELq/EtIwhOA Y7Tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=hV9EUuS+t3Bb/0QLlLI7v0N7CxiTXDVMV9mW/HWhXS0=; b=JM0w18B0JEXuFNuVCUT2m++uqDXnk6mlqx4j/ankjogTRU7DakbyeH5Z7wlz8f+447 PrYPR4Cq+kEzPidPD6ewkwd8uR5XJ2Y0en5I7ho9vH2QjbS4FYOqeCceVBE4FXcAvFhC AFnAMkUELFn60ZWv5RAiKB+f8UxcRjw8DbbH9SZdkyJ5NU3zJgCOH5NeEfD5p092OK/N 1DirFuM2vn+BZ/48/oGM3vO40yVDg03yhSOLaI4P/vHs6leH5s8huRR27WjuxRtMCkYf cSWblKs1q1PZGfxOG2FrDzuycQVh7aAJ8jczqaGVwQaTP7Uhcjk5NitZYBbmLPwc0baW vxew== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-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 co22si7009996edb.469.2020.11.09.04.39.40; Mon, 09 Nov 2020 04:40:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth-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-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727311AbgKIMjb (ORCPT + 99 others); Mon, 9 Nov 2020 07:39:31 -0500 Received: from coyote.holtmann.net ([212.227.132.17]:35266 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726410AbgKIMjb (ORCPT ); Mon, 9 Nov 2020 07:39:31 -0500 Received: from marcel-macbook.fritz.box (p4fefcf0f.dip0.t-ipconnect.de [79.239.207.15]) by mail.holtmann.org (Postfix) with ESMTPSA id C0F81CECC5; Mon, 9 Nov 2020 13:46:37 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: [PATCH v2] Bluetooth: btrtl: Ask 8821C to drop old firmware From: Marcel Holtmann In-Reply-To: <20201026082838.26532-1-kai.heng.feng@canonical.com> Date: Mon, 9 Nov 2020 13:39:28 +0100 Cc: Johan Hedberg , max.chou@realtek.com, alex_lu@realsil.com.cn, "open list:BLUETOOTH DRIVERS" , open list Content-Transfer-Encoding: 7bit Message-Id: <6F687D4D-95CB-47F5-80DE-DCB2EEDCA80F@holtmann.org> References: <20201026082838.26532-1-kai.heng.feng@canonical.com> To: Kai-Heng Feng X-Mailer: Apple Mail (2.3608.120.23.2.4) Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Kai-Heng, > Some platforms keep USB power even when they are powered off and in S5, > this makes Realtek 8821C keep its firmware even after a cold boot, and > make 8821C never load new firmware. > > So use vendor specific HCI command to ask 8821C drop its firmware after > system shutdown. > > Newer firmware doesn't have this issue so we only use this trick for old > 8821C firmware version. > > Suggested-by: Max Chou > Signed-off-by: Kai-Heng Feng > --- > v2: > - Fix incorrect parAnthesis on le16_to_cpu. > - Ensure firmware gets re-uploaded in initialization. > > drivers/bluetooth/btrtl.c | 46 +++++++++++++++++++++++++++++++++++++++ > 1 file changed, 46 insertions(+) patch has been applied to bluetooth-next tree. Regards Marcel