Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp709682pxv; Thu, 15 Jul 2021 14:06:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLn5XWiab2u5T5F2HHBVr79vEV9V8/cp42ilwrLdFa+J7PcEyS/tcMOXzq/3uQBsXI121M X-Received: by 2002:a05:6402:1771:: with SMTP id da17mr9802412edb.23.1626383205721; Thu, 15 Jul 2021 14:06:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626383205; cv=none; d=google.com; s=arc-20160816; b=geJF29LZgBp8DXxfCp6po821NL0/CQBFAqFU8N+7TEWPCeI+Z13sv87Vk/qAk7ZMDj Ogo2+oNR5vcljuzge7v36WIKHjEjZbD/IVrrJGBeZ2qgClqb+FZlHnabceaza8BVxhtK 3UOAAZf5l3s8j3/trbXdMK1xi4t1KHUdyzsrvIOMd/DyYb6dikfAULe65mLxAnUSsa7f PP9tGOJc75QmH0bFMMeCGmkQVctzNGc7f4M1vN5c+QzEK1OQIf1xFeL5Eg7R9rOWqHTD VPLl2z21JSvFo4+Gkn3KAy7LUxfk26r8cGryY7+wsWnd9Dl28va3dONwq5fZx/eZqkiv qtfA== 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=UyE8sZUxWZEDyfyjmLm/8aBKLIugM6wiSRPP6rxm8S8=; b=laQKwd0p/nxxXe+It4+kqP3U8hv6pUdnZk5o7Ul0D3cKC/XUm5VOSgfVJZeWgzUTKI ca3jzg2GTNZgM7yDh9oHHdw5/vj8S/Z8ppcX9yKE5RJfvATbLCwBWvfgFm/1DNPusBrr wUbzoCE62EHSphndgYDuIiDbCfJc1Itedw+gMepXttyLth8QUrwV766cl4k7yRNNv789 8UH68TkGTVWTfacw3odxZwhs4X6GalQ5KqYYvOE4QDp9s6Y3UbDD5OXV09JaGIye0/6v z3blm+rarP1NPadBmdalwFjXZq+cjs0MlFXsd7JD5FXsuqiChrhy8EIii/9hY8gSNfRX h2fA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1qREWxDF; 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 r9si1601884edd.15.2021.07.15.14.06.22; Thu, 15 Jul 2021 14:06:45 -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=1qREWxDF; 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 S242334AbhGOTRI (ORCPT + 99 others); Thu, 15 Jul 2021 15:17:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:38918 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242359AbhGOTDi (ORCPT ); Thu, 15 Jul 2021 15:03:38 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 71854613C4; Thu, 15 Jul 2021 18:59:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626375576; bh=uNeipIKXrHdGL9rAuof73YYg8QiXPXN5XDsB8t2siVY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1qREWxDFyeeSuxGDQvUu+xI+6Owhrt34FYkIhk9+ahnBjVkPZz6cK6xSqb7zyB6wB smZktILM5USN3fjzBSFviqImNPIJjSC10jyVnSsYats7JLKWma+D9QdgKruh9QJYNU AEDeT3MChFs8IRI8hS2kkfYLds3OXWbXGEdMnYnA= 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.12 145/242] Bluetooth: btusb: fix bt fiwmare downloading failure issue for qca btsoc. Date: Thu, 15 Jul 2021 20:38:27 +0200 Message-Id: <20210715182618.735895954@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182551.731989182@linuxfoundation.org> References: <20210715182551.731989182@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 64b0e68c68eb..a97e5c476adf 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -4136,6 +4136,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