From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8043CC47082 for ; Wed, 26 May 2021 15:15:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 626AE6139A for ; Wed, 26 May 2021 15:15:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235299AbhEZPQ7 convert rfc822-to-8bit (ORCPT ); Wed, 26 May 2021 11:16:59 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:58760 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233431AbhEZPQx (ORCPT ); Wed, 26 May 2021 11:16:53 -0400 Received: from smtpclient.apple (p4fefc9d6.dip0.t-ipconnect.de [79.239.201.214]) by mail.holtmann.org (Postfix) with ESMTPSA id 9C28FCED1D; Wed, 26 May 2021 17:23:14 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.100.0.2.22\)) Subject: Re: [PATCH v2] Bluetooth: btusb: fix bt fiwmare downloading failure issue for qca btsoc. From: Marcel Holtmann In-Reply-To: <1622008265-18727-1-git-send-email-zijuhu@codeaurora.org> Date: Wed, 26 May 2021 17:15:18 +0200 Cc: Johan Hedberg , Luiz Augusto von Dentz , linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org, linux-arm-msm@vger.kernel.org, bgodavar@codeaurora.org, c-hbandi@codeaurora.org, hemantg@codeaurora.org, mka@chromium.org, rjliao@codeaurora.org, tjiang@codeaurora.org Content-Transfer-Encoding: 8BIT Message-Id: <3E1910BA-9116-438F-91F9-AD3C3622668B@holtmann.org> References: <1622008265-18727-1-git-send-email-zijuhu@codeaurora.org> To: Zijun Hu X-Mailer: Apple Mail (2.3654.100.0.2.22) Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Hi Zijun, > This is btsoc timing issue, after host start to downloading bt firmware, > ep2 need time to switch from function acl to function dfu, so host add > 20ms delay as workaround. > > Signed-off-by: Tim Jiang > --- > drivers/bluetooth/btusb.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c > index 5245714..b0743db 100644 > --- a/drivers/bluetooth/btusb.c > +++ b/drivers/bluetooth/btusb.c > @@ -4064,6 +4064,7 @@ static int btusb_setup_qca_download_fw(struct hci_dev *hdev, > > sent += size; > count -= size; you need a comment here explain why this is needed. > + msleep(20); > > while (count) { > size = min_t(size_t, count, QCA_DFU_PACKET_LEN); Regards Marcel