2021-05-25 10:33:54

by Chris Clayton

[permalink] [raw]
Subject: BT Intel: Regression loading firmware in linux-5.13-rc3

Hi,

I've built and installed 5.13-rc3+ (freshly pulled from Linus' tree). On booting it I find that none of my bluetooth
devices can connect. In the output from dmesg I find:

[ 8.170332] Bluetooth: hci0: Firmware revision 0.0 build 121 week 7 2021
[ 8.171339] bluetooth hci0: Direct firmware load for intel/ibt-19-16-0.sfi failed with error -2
[ 8.171871] Bluetooth: hci0: Failed to load Intel firmware file intel/ibt-19-16-0.sfi (-2)

As you can see it is looking for a non-existent firmware file intel/ibt-19-16-0.sfi. intel/ibt-19-16-4.{ddc,sfi} do
exist and both 5.12.6 and 5.10.39 successfully load those.

If I create symbolic links from the ibt-19-16-4 files to ibt-19-16-0 equivalents, rc3 loads them and my bluetooth
devices work fine. I can't find any ibt-19-16-0 files in the lkinux-firmware tree on kernel.org (or anywhere else for
that matter).

I looked at the changes introduced in 5.13 and found a couple of suspects - d68903da4e220d1e6b7c6ecdb853c36144c6acc9
(Bluetooth: btintel: Consolidate intel_version parsing) and its parent commit 0a460d8fe2db6887169a19b048ea0c90f8bdc3b7
(Bluetooth: btintel: Consolidate intel_version_tlv parsing). Both were authored by Luiz Augusto von Dentz and make
changes to code that processes the firmware version data. I built a kernel with 0a460d8fe2db6887169a19b048ea0c90f8bdc3b7
checked out and that loads the installed firmware fine. d68903da4e220d1e6b7c6ecdb853c36144c6acc9, however, seems to be
the the change that breaks things because it tries (and obviously fails) to load ibt-19-16-0.sfi.

I can provide any additional diagnostics or test a fix, but please copy me in to any email because I'm not subscribed to
the list.

In the meantime, I'll use my symlinks workaround.

Thanks,

Chris


2021-05-25 15:04:13

by Kiran K

[permalink] [raw]
Subject: RE: BT Intel: Regression loading firmware in linux-5.13-rc3

Hi Chris,

This is a known issue related to firmware and is expected to be fixed in next release.

Thanks,
Kiran


> -----Original Message-----
> From: Chris Clayton <[email protected]>
> Sent: Tuesday, May 25, 2021 3:28 PM
> To: [email protected]; Von Dentz, Luiz
> <[email protected]>
> Subject: BT Intel: Regression loading firmware in linux-5.13-rc3
>
> Hi,
>
> I've built and installed 5.13-rc3+ (freshly pulled from Linus' tree). On booting
> it I find that none of my bluetooth devices can connect. In the output from
> dmesg I find:
>
> [ 8.170332] Bluetooth: hci0: Firmware revision 0.0 build 121 week 7 2021
> [ 8.171339] bluetooth hci0: Direct firmware load for intel/ibt-19-16-0.sfi
> failed with error -2
> [ 8.171871] Bluetooth: hci0: Failed to load Intel firmware file intel/ibt-19-16-
> 0.sfi (-2)
>
> As you can see it is looking for a non-existent firmware file intel/ibt-19-16-
> 0.sfi. intel/ibt-19-16-4.{ddc,sfi} do exist and both 5.12.6 and 5.10.39
> successfully load those.
>
> If I create symbolic links from the ibt-19-16-4 files to ibt-19-16-0 equivalents,
> rc3 loads them and my bluetooth devices work fine. I can't find any ibt-19-16-
> 0 files in the lkinux-firmware tree on kernel.org (or anywhere else for that
> matter).
>
> I looked at the changes introduced in 5.13 and found a couple of suspects -
> d68903da4e220d1e6b7c6ecdb853c36144c6acc9
> (Bluetooth: btintel: Consolidate intel_version parsing) and its parent commit
> 0a460d8fe2db6887169a19b048ea0c90f8bdc3b7
> (Bluetooth: btintel: Consolidate intel_version_tlv parsing). Both were
> authored by Luiz Augusto von Dentz and make changes to code that
> processes the firmware version data. I built a kernel with
> 0a460d8fe2db6887169a19b048ea0c90f8bdc3b7
> checked out and that loads the installed firmware fine.
> d68903da4e220d1e6b7c6ecdb853c36144c6acc9, however, seems to be the
> the change that breaks things because it tries (and obviously fails) to load ibt-
> 19-16-0.sfi.
>
> I can provide any additional diagnostics or test a fix, but please copy me in to
> any email because I'm not subscribed to the list.
>
> In the meantime, I'll use my symlinks workaround.
>
> Thanks,
>
> Chris

2021-05-25 15:08:53

by Chris Clayton

[permalink] [raw]
Subject: Re: BT Intel: Regression loading firmware in linux-5.13-rc3

Thanks for your reply, Kiran.

Does the phrase "next release" mean linux-5.13-rc4 or the next release of linux-firmware? I just want to know what to
look out for.

Thanks

Chris


On 25/05/2021 11:14, K, Kiran wrote:
> Hi Chris,
>
> This is a known issue related to firmware and is expected to be fixed in next release.
>
> Thanks,
> Kiran
>
>
>> -----Original Message-----
>> From: Chris Clayton <[email protected]>
>> Sent: Tuesday, May 25, 2021 3:28 PM
>> To: [email protected]; Von Dentz, Luiz
>> <[email protected]>
>> Subject: BT Intel: Regression loading firmware in linux-5.13-rc3
>>
>> Hi,
>>
>> I've built and installed 5.13-rc3+ (freshly pulled from Linus' tree). On booting
>> it I find that none of my bluetooth devices can connect. In the output from
>> dmesg I find:
>>
>> [ 8.170332] Bluetooth: hci0: Firmware revision 0.0 build 121 week 7 2021
>> [ 8.171339] bluetooth hci0: Direct firmware load for intel/ibt-19-16-0.sfi
>> failed with error -2
>> [ 8.171871] Bluetooth: hci0: Failed to load Intel firmware file intel/ibt-19-16-
>> 0.sfi (-2)
>>
>> As you can see it is looking for a non-existent firmware file intel/ibt-19-16-
>> 0.sfi. intel/ibt-19-16-4.{ddc,sfi} do exist and both 5.12.6 and 5.10.39
>> successfully load those.
>>
>> If I create symbolic links from the ibt-19-16-4 files to ibt-19-16-0 equivalents,
>> rc3 loads them and my bluetooth devices work fine. I can't find any ibt-19-16-
>> 0 files in the lkinux-firmware tree on kernel.org (or anywhere else for that
>> matter).
>>
>> I looked at the changes introduced in 5.13 and found a couple of suspects -
>> d68903da4e220d1e6b7c6ecdb853c36144c6acc9
>> (Bluetooth: btintel: Consolidate intel_version parsing) and its parent commit
>> 0a460d8fe2db6887169a19b048ea0c90f8bdc3b7
>> (Bluetooth: btintel: Consolidate intel_version_tlv parsing). Both were
>> authored by Luiz Augusto von Dentz and make changes to code that
>> processes the firmware version data. I built a kernel with
>> 0a460d8fe2db6887169a19b048ea0c90f8bdc3b7
>> checked out and that loads the installed firmware fine.
>> d68903da4e220d1e6b7c6ecdb853c36144c6acc9, however, seems to be the
>> the change that breaks things because it tries (and obviously fails) to load ibt-
>> 19-16-0.sfi.
>>
>> I can provide any additional diagnostics or test a fix, but please copy me in to
>> any email because I'm not subscribed to the list.
>>
>> In the meantime, I'll use my symlinks workaround.
>>
>> Thanks,
>>
>> Chris
>

2021-05-25 18:40:15

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: BT Intel: Regression loading firmware in linux-5.13-rc3

Hi Chris,

On Tue, May 25, 2021 at 8:08 AM Chris Clayton <[email protected]> wrote:
>
> Thanks for your reply, Kiran.
>
> Does the phrase "next release" mean linux-5.13-rc4 or the next release of linux-firmware? I just want to know what to
> look out for.
>
> Thanks
>
> Chris
>
>
> On 25/05/2021 11:14, K, Kiran wrote:
> > Hi Chris,
> >
> > This is a known issue related to firmware and is expected to be fixed in next release.
> >
> > Thanks,
> > Kiran
> >
> >
> >> -----Original Message-----
> >> From: Chris Clayton <[email protected]>
> >> Sent: Tuesday, May 25, 2021 3:28 PM
> >> To: [email protected]; Von Dentz, Luiz
> >> <[email protected]>
> >> Subject: BT Intel: Regression loading firmware in linux-5.13-rc3
> >>
> >> Hi,
> >>
> >> I've built and installed 5.13-rc3+ (freshly pulled from Linus' tree). On booting
> >> it I find that none of my bluetooth devices can connect. In the output from
> >> dmesg I find:
> >>
> >> [ 8.170332] Bluetooth: hci0: Firmware revision 0.0 build 121 week 7 2021
> >> [ 8.171339] bluetooth hci0: Direct firmware load for intel/ibt-19-16-0.sfi
> >> failed with error -2
> >> [ 8.171871] Bluetooth: hci0: Failed to load Intel firmware file intel/ibt-19-16-
> >> 0.sfi (-2)
> >>
> >> As you can see it is looking for a non-existent firmware file intel/ibt-19-16-
> >> 0.sfi. intel/ibt-19-16-4.{ddc,sfi} do exist and both 5.12.6 and 5.10.39
> >> successfully load those.
> >>
> >> If I create symbolic links from the ibt-19-16-4 files to ibt-19-16-0 equivalents,
> >> rc3 loads them and my bluetooth devices work fine. I can't find any ibt-19-16-
> >> 0 files in the lkinux-firmware tree on kernel.org (or anywhere else for that
> >> matter).
> >>
> >> I looked at the changes introduced in 5.13 and found a couple of suspects -
> >> d68903da4e220d1e6b7c6ecdb853c36144c6acc9
> >> (Bluetooth: btintel: Consolidate intel_version parsing) and its parent commit
> >> 0a460d8fe2db6887169a19b048ea0c90f8bdc3b7
> >> (Bluetooth: btintel: Consolidate intel_version_tlv parsing). Both were
> >> authored by Luiz Augusto von Dentz and make changes to code that
> >> processes the firmware version data. I built a kernel with
> >> 0a460d8fe2db6887169a19b048ea0c90f8bdc3b7
> >> checked out and that loads the installed firmware fine.
> >> d68903da4e220d1e6b7c6ecdb853c36144c6acc9, however, seems to be the
> >> the change that breaks things because it tries (and obviously fails) to load ibt-
> >> 19-16-0.sfi.
> >>
> >> I can provide any additional diagnostics or test a fix, but please copy me in to
> >> any email because I'm not subscribed to the list.
> >>
> >> In the meantime, I'll use my symlinks workaround.
> >>
> >> Thanks,
> >>
> >> Chris

https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git/commit/drivers/bluetooth/btusb.c?id=183dce5a7fd3040ced6a220b0aa536c926f10cd9

That said we shall probably merge it to 5.13 before it is released.

--
Luiz Augusto von Dentz

2021-05-25 22:12:10

by Chris Clayton

[permalink] [raw]
Subject: Re: BT Intel: Regression loading firmware in linux-5.13-rc3

Thanks Luiz.

On 25/05/2021 19:10, Luiz Augusto von Dentz wrote:
> Hi Chris,
>
> On Tue, May 25, 2021 at 8:08 AM Chris Clayton <[email protected]> wrote:
>>
>> Thanks for your reply, Kiran.
>>
>> Does the phrase "next release" mean linux-5.13-rc4 or the next release of linux-firmware? I just want to know what to
>> look out for.
>>
>> Thanks
>>
>> Chris
>>
>>
>> On 25/05/2021 11:14, K, Kiran wrote:
>>> Hi Chris,
>>>
>>> This is a known issue related to firmware and is expected to be fixed in next release.
>>>
>>> Thanks,
>>> Kiran
>>>
>>>
<snip>
>
> https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git/commit/drivers/bluetooth/btusb.c?id=183dce5a7fd3040ced6a220b0aa536c926f10cd9
>
> That said we shall probably merge it to 5.13 before it is released.
> I think you should, otherwise, without patching, 5.13.0 will be broken for many bluetooth users.

I've applied your patch your patch to Linus' latest and greatest (by hand - it doesn't apply cleanly to the current 5.13
tree). The error messages are no longer produced and bluetooth is working fine, so...

Tested-by: Chris Clayton <[email protected]>

2021-05-25 22:28:27

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: BT Intel: Regression loading firmware in linux-5.13-rc3

Hi Marcel,

On Tue, May 25, 2021 at 12:22 PM Chris Clayton <[email protected]> wrote:
>
> Thanks Luiz.
>
> On 25/05/2021 19:10, Luiz Augusto von Dentz wrote:
> > Hi Chris,
> >
> > On Tue, May 25, 2021 at 8:08 AM Chris Clayton <[email protected]> wrote:
> >>
> >> Thanks for your reply, Kiran.
> >>
> >> Does the phrase "next release" mean linux-5.13-rc4 or the next release of linux-firmware? I just want to know what to
> >> look out for.
> >>
> >> Thanks
> >>
> >> Chris
> >>
> >>
> >> On 25/05/2021 11:14, K, Kiran wrote:
> >>> Hi Chris,
> >>>
> >>> This is a known issue related to firmware and is expected to be fixed in next release.
> >>>
> >>> Thanks,
> >>> Kiran
> >>>
> >>>
> <snip>
> >
> > https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git/commit/drivers/bluetooth/btusb.c?id=183dce5a7fd3040ced6a220b0aa536c926f10cd9
> >
> > That said we shall probably merge it to 5.13 before it is released.
> > I think you should, otherwise, without patching, 5.13.0 will be broken for many bluetooth users.
>
> I've applied your patch your patch to Linus' latest and greatest (by hand - it doesn't apply cleanly to the current 5.13
> tree). The error messages are no longer produced and bluetooth is working fine, so...
>
> Tested-by: Chris Clayton <[email protected]>

Shall I have another pull request, or do we need to send this directly
to Linus somehow?

--
Luiz Augusto von Dentz

2021-05-26 04:38:07

by Kiran K

[permalink] [raw]
Subject: RE: BT Intel: Regression loading firmware in linux-5.13-rc3

Hi Chris,

> > >> Does the phrase "next release" mean linux-5.13-rc4 or the next
> > >> release of linux-firmware? I just want to know what to look out for.

I did check internally with the team and fix will be part of the release(22.80) planned towards end of Aug/21.

> > >>
> > >> Thanks
> > >>
> > >> Chris
> > >>
> > >>
> > >> On 25/05/2021 11:14, K, Kiran wrote:
> > >>> Hi Chris,
> > >>>
> > >>> This is a known issue related to firmware and is expected to be fixed in
> next release.
> > >>>
> > >>> Thanks,
> > >>> Kiran
> > >>>
> > >>>
> > <snip>
> > >
> > > https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-
> > >
> next.git/commit/drivers/bluetooth/btusb.c?id=183dce5a7fd3040ced6a220
> > > b0aa536c926f10cd9
> > >
> > > That said we shall probably merge it to 5.13 before it is released.
> > > I think you should, otherwise, without patching, 5.13.0 will be broken for
> many bluetooth users.
> >
> > I've applied your patch your patch to Linus' latest and greatest (by
> > hand - it doesn't apply cleanly to the current 5.13 tree). The error messages
> are no longer produced and bluetooth is working fine, so...
> >
> > Tested-by: Chris Clayton <[email protected]>
>
> Shall I have another pull request, or do we need to send this directly to Linus
> somehow?
>
> --
> Luiz Augusto von Dentz

Thanks,
Kiran

2021-05-26 19:00:15

by Marcel Holtmann

[permalink] [raw]
Subject: Re: BT Intel: Regression loading firmware in linux-5.13-rc3

Hi Luiz,

>>>> Thanks for your reply, Kiran.
>>>>
>>>> Does the phrase "next release" mean linux-5.13-rc4 or the next release of linux-firmware? I just want to know what to
>>>> look out for.
>>>>
>>>> Thanks
>>>>
>>>> Chris
>>>>
>>>>
>>>> On 25/05/2021 11:14, K, Kiran wrote:
>>>>> Hi Chris,
>>>>>
>>>>> This is a known issue related to firmware and is expected to be fixed in next release.
>>>>>
>>>>> Thanks,
>>>>> Kiran
>>>>>
>>>>>
>> <snip>
>>>
>>> https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git/commit/drivers/bluetooth/btusb.c?id=183dce5a7fd3040ced6a220b0aa536c926f10cd9
>>>
>>> That said we shall probably merge it to 5.13 before it is released.
>>> I think you should, otherwise, without patching, 5.13.0 will be broken for many bluetooth users.
>>
>> I've applied your patch your patch to Linus' latest and greatest (by hand - it doesn't apply cleanly to the current 5.13
>> tree). The error messages are no longer produced and bluetooth is working fine, so...
>>
>> Tested-by: Chris Clayton <[email protected]>
>
> Shall I have another pull request, or do we need to send this directly
> to Linus somehow?

if this is not urgent, we can put it into bluetooth.git tree and ask net.git to pull it. However if we already have this in net-next, it gets a bit trickier.

Regards

Marcel