2022-11-21 15:14:46

by Dimitri John Ledkov

[permalink] [raw]
Subject: [PATCH v4] Bluetooth: btintel: Correctly declare all module firmware files

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
Signed-off-by: Dimitri John Ledkov <[email protected]>
---
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..55efc4a067db 100644
--- a/drivers/bluetooth/btintel.c
+++ b/drivers/bluetooth/btintel.c
@@ -2656,7 +2656,25 @@ MODULE_AUTHOR("Marcel Holtmann <[email protected]>");
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("ibt-[0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9].sfi");
+MODULE_FIRMWARE("ibt-[0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9].ddc");
--
2.34.1



2022-11-21 15:54:17

by bluez.test.bot

[permalink] [raw]
Subject: RE: [v4] Bluetooth: btintel: Correctly declare all module firmware files

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=697683

---Test result---

Test Summary:
CheckPatch PASS 0.62 seconds
GitLint PASS 0.29 seconds
SubjectPrefix PASS 0.09 seconds
BuildKernel PASS 35.41 seconds
BuildKernel32 PASS 31.63 seconds
TestRunnerSetup PASS 435.73 seconds
TestRunner_l2cap-tester PASS 16.12 seconds
TestRunner_iso-tester PASS 15.91 seconds
TestRunner_bnep-tester PASS 5.62 seconds
TestRunner_mgmt-tester PASS 107.99 seconds
TestRunner_rfcomm-tester PASS 9.60 seconds
TestRunner_sco-tester PASS 8.93 seconds
TestRunner_ioctl-tester PASS 10.25 seconds
TestRunner_mesh-tester PASS 7.02 seconds
TestRunner_smp-tester PASS 8.81 seconds
TestRunner_userchan-tester PASS 5.93 seconds
IncrementalBuild PASS 33.30 seconds



---
Regards,
Linux Bluetooth

2022-11-21 23:47:44

by Tedd Ho-Jeong An

[permalink] [raw]
Subject: Re: [PATCH v4] Bluetooth: btintel: Correctly declare all module firmware files

Hi Dimitri,

On Mon, 2022-11-21 at 14:51 +0000, Dimitri John Ledkov wrote:
> 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
> Signed-off-by: Dimitri John Ledkov <[email protected]>
> ---
>  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..55efc4a067db 100644
> --- a/drivers/bluetooth/btintel.c
> +++ b/drivers/bluetooth/btintel.c
> @@ -2656,7 +2656,25 @@ MODULE_AUTHOR("Marcel Holtmann <[email protected]>");
>  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");

There are firmware files for hw_variant 0x11 and 0x12 in an old format like
ibt-17-*.sfi, ibt-17-*.ddc, ibt-18-*.sfi, and ibt-18-*.ddc.

> +/* hw_variant 0x17 0x18 0x19 0x1b, read and use cnvi/cnvr */
> +MODULE_FIRMWARE("ibt-[0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9].sfi");
> +MODULE_FIRMWARE("ibt-[0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9].ddc");

I believe these are under intel/ folder.


Regards,
Tedd Ho-Jeong An


2022-11-22 12:36:39

by Dimitri John Ledkov

[permalink] [raw]
Subject: Re: [PATCH v4] Bluetooth: btintel: Correctly declare all module firmware files

On Mon, 21 Nov 2022 at 23:44, Tedd Ho-Jeong An <[email protected]> wrote:
>
> Hi Dimitri,
>
> On Mon, 2022-11-21 at 14:51 +0000, Dimitri John Ledkov wrote:
> > 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
> > Signed-off-by: Dimitri John Ledkov <[email protected]>
> > ---
> > 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..55efc4a067db 100644
> > --- a/drivers/bluetooth/btintel.c
> > +++ b/drivers/bluetooth/btintel.c
> > @@ -2656,7 +2656,25 @@ MODULE_AUTHOR("Marcel Holtmann <[email protected]>");
> > 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");
>
> There are firmware files for hw_variant 0x11 and 0x12 in an old format like
> ibt-17-*.sfi, ibt-17-*.ddc, ibt-18-*.sfi, and ibt-18-*.ddc.
>

I believe 0x11 and 0x12 variants have stopped using the ibt-17-*.sfi,
ibt-17-*.ddc, ibt-18-*.sfi, and ibt-18-*.ddc patterns in
af3715e5cef8 ("Bluetooth: btusb: Update firmware filename for Intel
9x60 and later")
Which was shipped in v4.15. As long as I mark this patch for stable
v4.15+ this is documenting the firmware file the current driver can
request.
Distributions/deployments that use this current version of the driver
should not ship unused ibt-17-*.sfi, ibt-17-*.ddc, ibt-18-*.sfi, and
ibt-18-*.ddc files anymore.

> > +/* hw_variant 0x17 0x18 0x19 0x1b, read and use cnvi/cnvr */
> > +MODULE_FIRMWARE("ibt-[0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9].sfi");
> > +MODULE_FIRMWARE("ibt-[0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9].ddc");
>
> I believe these are under intel/ folder.
>

Yes!

Will fix this up.

--
okurrr,

Dimitri