Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp632649pxv; Thu, 15 Jul 2021 12:02:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJywy8A9wdlBhCa2Z0+BPOMUYXwwwhykimWm7QaVE9QIKf6oEtLbxGHfbugBeOU+5Ex0Nb1g X-Received: by 2002:a05:6402:3442:: with SMTP id l2mr9396969edc.126.1626375737431; Thu, 15 Jul 2021 12:02:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626375737; cv=none; d=google.com; s=arc-20160816; b=nfNlUMMStH6t1nmdA9vI9S7804bHMXc+Vus4QinhVCodB4di0uumOHHifcNaso1cuk i89f0vnos6ANMycy4X9KEwhT0lTzkV6nlm7c98C/xBWmIsaC+X3h6OxZogO/TYEVq/Wn 0JZJwPQjt8NPEhdisdUQhsLDm+tmdbLrwbgZgiiFS4tPEcejwxl3xTYptSG8T+RvfkPv inm7HAq2yEVXAVyaFAgIm26JUOrFE/FOvX/jHtYay0brm8aryAY7nja+Y2cipEYekaW8 KvIEKbfH0n406YJ//V9x7gYS+mBBo83mYpTDUtwydocjhxBedvH2TNJW0QjxDF49Vd80 B46A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=pJ1/WxmQDKxYRsn/RZx5mOOWyz3t3b1OCX5cVW4cByQ=; b=lBwrR0XEh9yLq8UOFAV+QHPnvIDq8gaKhXMKRT072zLYI4ExS9pc86CnMFR2BYxsFB d3NImDMSF5FV/dbGphn+FNCaS38Lyr3yl5mxcPvqybfG5GlFl1/xdPCWjlEZ9zOwDDTj HZB6OBvrk+x5aLcffjxJARzQtnXW03K++0Ttm60siCT75XZPa+zjJWkgpb4QnwE+pGu0 1hBw1LOGRZPx32fHw8qrXFG7a7+iZw2F5azOB4CkZb0AfxoGlCtotdJp77wUM23OEnIE 0DEY3gKU/m71NNxr2nMUloCU46NLSdeqlwGh0lt4zB6Qs2QG+9z4x2E5Y/r5KtYKcyGR lMEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=v56xocDE; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z16si8024682edx.286.2021.07.15.12.01.53; Thu, 15 Jul 2021 12:02:17 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=v56xocDE; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242922AbhGOTAG (ORCPT + 99 others); Thu, 15 Jul 2021 15:00:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:57390 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240575AbhGOSxO (ORCPT ); Thu, 15 Jul 2021 14:53:14 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id CA4F1613EB; Thu, 15 Jul 2021 18:50:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626375020; bh=weH4CNkH3qClIGicJA8ZV2exCFsK3zq5d/yVwQmLTII=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=v56xocDE9/A9P29uB/cLFr8+imlJ3/C7xqyKie/r1D9Gy42JwyE26J8SBcB8UQBjI ag+HskW2xCOv9GtktnvKAcOsUWh8Sm1qv8wcmilMskFj9P5G6yrOve5XsO+Q+eaETm TKm56DewXGUyjNIND/cZnbQBUKQ9Zgcj4QQr6nPs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tim Jiang , Marcel Holtmann , Sasha Levin Subject: [PATCH 5.10 125/215] Bluetooth: btusb: fix bt fiwmare downloading failure issue for qca btsoc. Date: Thu, 15 Jul 2021 20:38:17 +0200 Message-Id: <20210715182621.546769828@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182558.381078833@linuxfoundation.org> References: <20210715182558.381078833@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tim Jiang [ Upstream commit 4f00bfb372674d586c4a261bfc595cbce101fbb6 ] 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 Signed-off-by: Marcel Holtmann Signed-off-by: Sasha Levin --- drivers/bluetooth/btusb.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index b3c63e06838d..afd2b1f12d49 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -3558,6 +3558,11 @@ static int btusb_setup_qca_download_fw(struct hci_dev *hdev, sent += size; count -= size; + /* ep2 need time to switch from function acl to function dfu, + * so we add 20ms delay here. + */ + msleep(20); + while (count) { size = min_t(size_t, count, QCA_DFU_PACKET_LEN); -- 2.30.2