Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp275259pxb; Thu, 25 Feb 2021 02:05:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJxfPmnLYtnrvoBaqNCTJhpahHqKFbODfvDZdv4hYiQbz9LYyPAjYJUwQq4Rmi4No8esaAdN X-Received: by 2002:a17:906:5293:: with SMTP id c19mr1921182ejm.437.1614247518796; Thu, 25 Feb 2021 02:05:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614247518; cv=none; d=google.com; s=arc-20160816; b=0oVJnoL+Ych20iJqtq62EdKwGEs57/6GKzQDSkRk874sAO/hvGp5u5IJ2j5ygW8aFQ vY9oKFiSMo9CXNZrW4g0RyrB5nAWH6/HTF4+EXKpfPSsJPuToFKXkoBzPPXnsbQqIeuh 96u7CquLLeO6Y++/T6k0wd9/7PEL1lhfCrg7+x2E2BKbgfl6Xz+QmpVOW+oBk5iUdZTv ahwjoN8JI6r4wvR/NHAXW26kiCH2zhxCEionsJC+XS+wT1GU3jmUU7rNFFb3cyFSyaEK ueKhCg1+DzCn04+K+9af5pF3GmnyccWwcp9Okd1z4wDQEpK/PGc594ykTXJuZl3sShL0 9rNg== 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=03H3TlfV7rL/fcS7wfjHUh8Bl2bKQx7crVrdxFszJnk=; b=AB4spixLOrFYnIFl4yBdgibfP6xceP8q2Y4R+ayrg9wZ8JeZhXVV3SgWyeSnRU2PPN h4Km5td2kUnUPTg4zOoGIjPTcURpc0ioGZoOuMPD7dd1nGw1E2YH5NXJfxnUwPiQ7e5S GbS9IanfpohiSA6Tg0ntWABB78pOXlHRXEpaCwe3Nnj+j6nevUvdnXRBC78NQ5gUPZ/a Ixe9A9/4ki4L4wq7+5Vke6LqX6iDj0QwlFYmQ8OuXd5wPjOVPWIowuL+l9NQgrmo+jiM 8LCPTHqnT5+0fsRM/Q05T6t+DHvL7ZHiZeax55JkP1DVdadbc+e3bDkigt9iqMcVXaYx biMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=UTJLlPEC; 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 g1si2942427ejb.606.2021.02.25.02.04.56; Thu, 25 Feb 2021 02:05:18 -0800 (PST) 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=UTJLlPEC; 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 S235199AbhBYKBp (ORCPT + 99 others); Thu, 25 Feb 2021 05:01:45 -0500 Received: from mail.kernel.org ([198.145.29.99]:34110 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234158AbhBYJ4i (ORCPT ); Thu, 25 Feb 2021 04:56:38 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id EEF9364F0D; Thu, 25 Feb 2021 09:54:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614246857; bh=AM0VwAM248I11PFNRkNnsugVBeUvdAPwU4cg/Y93yy4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UTJLlPEC4M4mmFa0u4UVXOgnW4CAtSY41E7X62T6zxwXcstaL1bxAO/1F7QgnoEQY j582yPUaPvKJshLTg9aIRNzGeXRlZsONSo+3cy3oJVk8SK5bzfKKjU7umdWaGafEuT K6BahUTSdVp4KjNZna94PYpef5jZvblnE/dVvXy4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hui Wang , Marcel Holtmann , Salvatore Bonaccorso Subject: [PATCH 5.11 06/12] Bluetooth: btusb: Some Qualcomm Bluetooth adapters stop working Date: Thu, 25 Feb 2021 10:53:40 +0100 Message-Id: <20210225092515.298883603@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210225092515.015261674@linuxfoundation.org> References: <20210225092515.015261674@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: Hui Wang commit 234f414efd1164786269849b4fbb533d6c9cdbbf upstream. This issue starts from linux-5.10-rc1, I reproduced this issue on my Dell Inspiron 7447 with BT adapter 0cf3:e005, the kernel will print out: "Bluetooth: hci0: don't support firmware rome 0x31010000", and someone else also reported the similar issue to bugzilla #211571. I found this is a regression introduced by 'commit b40f58b97386 ("Bluetooth: btusb: Add Qualcomm Bluetooth SoC WCN6855 support"), the patch assumed that if high ROM version is not zero, it is an adapter on WCN6855, but many old adapters don't need to load rampatch or nvm, and they have non-zero high ROM version. To fix it, let the driver match the rom_version in the qca_devices_table first, if there is no entry matched, check the high ROM version, if it is not zero, we assume this adapter is ready to work and no need to load rampatch and nvm like previously. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=211571 Fixes: b40f58b97386 ("Bluetooth: btusb: Add Qualcomm Bluetooth SoC WCN6855 support") Signed-off-by: Hui Wang Signed-off-by: Marcel Holtmann Cc: Salvatore Bonaccorso Signed-off-by: Greg Kroah-Hartman --- drivers/bluetooth/btusb.c | 7 +++++++ 1 file changed, 7 insertions(+) --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -4065,6 +4065,13 @@ static int btusb_setup_qca(struct hci_de info = &qca_devices_table[i]; } if (!info) { + /* If the rom_version is not matched in the qca_devices_table + * and the high ROM version is not zero, we assume this chip no + * need to load the rampatch and nvm. + */ + if (ver_rom & ~0xffffU) + return 0; + bt_dev_err(hdev, "don't support firmware rome 0x%x", ver_rom); return -ENODEV; }