From patchwork Tue Nov 22 14:02:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dimitri John Ledkov X-Patchwork-Id: 24400 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2220419wrr; Tue, 22 Nov 2022 06:11:33 -0800 (PST) X-Google-Smtp-Source: AA0mqf7wxYLzwyXV/GaGiJAM1R99M/GtT9zfjx46ohCuDPTUhkFFuH8Z4RLDftH2aJKYD6dnr6FW X-Received: by 2002:a17:906:6a0c:b0:7ad:9f03:aa46 with SMTP id qw12-20020a1709066a0c00b007ad9f03aa46mr3933775ejc.175.1669126293252; Tue, 22 Nov 2022 06:11:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669126293; cv=none; d=google.com; s=arc-20160816; b=dpvwHAVrgcvBuwgrUK6V8OrYKbskEBA+RaU32GfS//lS5tQ4dFH+UvhOJsgs31p9w+ 1wZwB3DdbYBhDov58ZYVl0GAuoIZWyZ43vroLyOO/knG9Yzt/Y+B8ddOpI5e9IRsWjJV o0AOgKXqosupHCg4wwvmCXiLx97DnheSlMuKETQQ5xkMWz1a4187REK0XEQFfk2fQSS/ escPFbKG2apJDruteL39dXrf4c9uViJ6BqQrQzthNbDoGuC76xE2BNm40kD4Ps1/yrV2 uSZQ8VuWE04kivzYacX7Kmak1U2eliCbzLb+sByksgEgR/nagJuQ3LirLeJbbLNzMpWL HMFQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=MmX49LWmqBGT8gmV2EsghBdLKDSPXDw+pVh33IsMCLc=; b=1FXkK2JsTYvpTtoMgQ4QG86l7wt6KHjsoDuStVe7CopRQBtKf+jXYPYva5spoPlcDA VocPNg5EAMIxwFwQiceP2csB7l1W8wQKJc+ZBtmWP2sAuky0MYTIa/BmHteoQBoxr2+v +R3dvMxM04TOiZK5UuMWpFLYMM1mVWl4K7jabf54unUAYkkAVowrdsTvwkNo5eWrg1rT Vsg6I2rlafttoJXEWGK4IZRqiyIMxHKP14GBnLqd7U53uShaP+9G3GASk7K1z9iwjkY1 hlMmvvh+QkuWCGK+fPk9mI0VQ59cL/55ZFCyEISiV9tMfw2ak5rSlvyYQp4p60xqngFy mPCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=m2u4ZSMx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xe8-20020a170907318800b0078de83a052csi12832934ejb.483.2022.11.22.06.11.02; Tue, 22 Nov 2022 06:11:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=m2u4ZSMx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233964AbiKVOE3 (ORCPT + 99 others); Tue, 22 Nov 2022 09:04:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233950AbiKVOEQ (ORCPT ); Tue, 22 Nov 2022 09:04:16 -0500 Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7454A1F2C3 for ; Tue, 22 Nov 2022 06:03:17 -0800 (PST) Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 294213F367 for ; Tue, 22 Nov 2022 14:03:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1669125795; bh=MmX49LWmqBGT8gmV2EsghBdLKDSPXDw+pVh33IsMCLc=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=m2u4ZSMxhLzt2fzKT6eez2efrj+6th9JDP7cXDV72ln47wVMOFABYhDzSt83Mmh9r xjkAr7P3EkrozsaQhnxwvt/umpBl5hngXrBA1z5umfalpThm7+ExFEvcyaY50PgLo6 E5rDBCklMbRiO4OR9jJ3eu5bVL1bXIZ4dC5bGuqy9nWebf74HVJ4sYlAjGNTMdkfMr 9aZ3Bq4TWIhl1tkOnGGfkjyuSqbl+2x+YT2H/o9u/+I5Je9p0QCLyofNBbFZ7PC3Dl ACAJe+p+H5ZlrfwmOoxsE5nNR6sFq6SWBOtalCMX03pdVcEpOwv+3y4tqoDVwM3TO0 P0XSZ2sYQlRhA== Received: by mail-wr1-f71.google.com with SMTP id j30-20020adfa55e000000b00241b49be1a3so4279723wrb.4 for ; Tue, 22 Nov 2022 06:03:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=MmX49LWmqBGT8gmV2EsghBdLKDSPXDw+pVh33IsMCLc=; b=Dict+OPRFrokJmXmelMzTE5sp/zNYzZuPWgPyy8mMi1/F732dzY3fu0+K5AEnzZzVh jKjrXLrbn9mq9V/fje2VhkmezD3BzQn8z7yK+ZEOFBlZQ6akFRrNOfFUnRmsiTtwI6h7 tZ7EhlGwupCCbIfy2LBp3ocMYKCX0iHTJ7frztAM4aMJ/6O6SB9rpkCi131x6pw3k6jb AEx7Aesh3lcVviOrPHyEm00LoD9o6s8YzEVbjauEuG2OW3ZDTGYvAAUICK/CUHvkjCDB gQLEB2FVARsf8YaQi018TVgvCmqfqaOu3doEer3VAf3wWnl1r/nzZk1HrFCDX87rcfBw haeQ== X-Gm-Message-State: ANoB5pkgwJxeKODvNv+IcLzbDEs3jYAdJBzh8Gi0t1ldekAvk1tw3EkQ CoqFSXynJktv1DbNRbl5/QrjzSOIVWUFAxvkmjtWr2gym6YVTlRJ8cWQjXXSndWApy27el83g7o oQtT1aCQPrXdnO4RGjn0IMUIOT2bk0tdmLveApyU/+g== X-Received: by 2002:a5d:6ac7:0:b0:241:bf95:c9a2 with SMTP id u7-20020a5d6ac7000000b00241bf95c9a2mr11902766wrw.387.1669125793788; Tue, 22 Nov 2022 06:03:13 -0800 (PST) X-Received: by 2002:a5d:6ac7:0:b0:241:bf95:c9a2 with SMTP id u7-20020a5d6ac7000000b00241bf95c9a2mr11902547wrw.387.1669125790435; Tue, 22 Nov 2022 06:03:10 -0800 (PST) Received: from localhost ([137.220.91.195]) by smtp.gmail.com with ESMTPSA id n21-20020a05600c4f9500b003cfd64b6be1sm28849313wmq.27.2022.11.22.06.03.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Nov 2022 06:03:09 -0800 (PST) From: Dimitri John Ledkov To: Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz Cc: linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v5] Bluetooth: btintel: Correctly declare all module firmware files Date: Tue, 22 Nov 2022 14:02:22 +0000 Message-Id: <20221122140222.1541731-1-dimitri.ledkov@canonical.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750112499380188976?= X-GMAIL-MSGID: =?utf-8?q?1750205772168238999?= Strictly encode patterns of supported hw_variants of firmware files the kernel driver supports requesting. This now includes many missing and previously undeclared module firmware files for 0x07, 0x08, 0x11-0x14, 0x17-0x1b hw_variants. This especially affects environments that only install firmware files declared and referenced by the kernel modules. In such environments, only the declared firmware files are copied resulting in most Intel Bluetooth devices not working. I.e. host-only dracut-install initrds, or Ubuntu Core kernel snaps. BugLink: https://bugs.launchpad.net/bugs/1970819 Cc: stable@vger.kernel.org # 4.15+ Signed-off-by: Dimitri John Ledkov --- Notes: Changes since v4: - Add missing "intel/" prefix for 0x17+ firmware - Add Cc stable for v4.15+ kernels Changes since v3: - Hopefully pacify trailing whitespace from GitLint in this optional portion of the commit. Changes since v2: - encode patterns for 0x17 0x18 0x19 0x1b hw_variants - rebase on top of latest rc tag Changes since v1: - encode strict patterns of supported firmware files for each of the supported hw_variant generations. drivers/bluetooth/btintel.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c index a657e9a3e96a..d0e22fe09567 100644 --- a/drivers/bluetooth/btintel.c +++ b/drivers/bluetooth/btintel.c @@ -2656,7 +2656,25 @@ MODULE_AUTHOR("Marcel Holtmann "); MODULE_DESCRIPTION("Bluetooth support for Intel devices ver " VERSION); MODULE_VERSION(VERSION); MODULE_LICENSE("GPL"); -MODULE_FIRMWARE("intel/ibt-11-5.sfi"); -MODULE_FIRMWARE("intel/ibt-11-5.ddc"); -MODULE_FIRMWARE("intel/ibt-12-16.sfi"); -MODULE_FIRMWARE("intel/ibt-12-16.ddc"); +/* hw_variant 0x07 0x08 */ +MODULE_FIRMWARE("intel/ibt-hw-37.7.*-fw-*.*.*.*.*.bseq"); +MODULE_FIRMWARE("intel/ibt-hw-37.7.bseq"); +MODULE_FIRMWARE("intel/ibt-hw-37.8.*-fw-*.*.*.*.*.bseq"); +MODULE_FIRMWARE("intel/ibt-hw-37.8.bseq"); +/* hw_variant 0x0b 0x0c */ +MODULE_FIRMWARE("intel/ibt-11-*.sfi"); +MODULE_FIRMWARE("intel/ibt-12-*.sfi"); +MODULE_FIRMWARE("intel/ibt-11-*.ddc"); +MODULE_FIRMWARE("intel/ibt-12-*.ddc"); +/* hw_variant 0x11 0x12 0x13 0x14 */ +MODULE_FIRMWARE("intel/ibt-17-*-*.sfi"); +MODULE_FIRMWARE("intel/ibt-18-*-*.sfi"); +MODULE_FIRMWARE("intel/ibt-19-*-*.sfi"); +MODULE_FIRMWARE("intel/ibt-20-*-*.sfi"); +MODULE_FIRMWARE("intel/ibt-17-*-*.ddc"); +MODULE_FIRMWARE("intel/ibt-18-*-*.ddc"); +MODULE_FIRMWARE("intel/ibt-19-*-*.ddc"); +MODULE_FIRMWARE("intel/ibt-20-*-*.ddc"); +/* hw_variant 0x17 0x18 0x19 0x1b, read and use cnvi/cnvr */ +MODULE_FIRMWARE("intel/ibt-[0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9].sfi"); +MODULE_FIRMWARE("intel/ibt-[0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9].ddc");