Re: [PATCH v3 1/6] Bluetooth: btintel: Check firmware version before download

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Luiz,

On Tue, 2021-02-09 at 17:26 -0800, Tedd Ho-Jeong An wrote:
> Hi, Luiz,
> 
> On Tue, 2021-02-09 at 17:04 -0800, Tedd Ho-Jeong An wrote:
> > Hi Luiz,
> > 
> > On Tue, 2021-02-09 at 15:33 -0800, Luiz Augusto von Dentz wrote:
> > > From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>
> > > 
> > > This checks the firmware build number, week and year matches with
> > > repective version loaded and then skip the download process.
> > > 
> > > Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>
> > > ---
> > > v2: Add patch that mover checks for operational mode after the version
> > > checking.
> > > v3: Fix not checking for operation mode before using btintel_read_boot_params
> > > since some models depend on that to contruct the fw filename. Also attempt to
> > > cleanup duplicated code.
> > > 
> > >  drivers/bluetooth/btintel.c   | 94 +++++++++++++++++++++++++++--------
> > >  drivers/bluetooth/btintel.h   |  5 +-
> > >  drivers/bluetooth/btusb.c     | 16 +++++-
> > >  drivers/bluetooth/hci_intel.c |  7 ++-
> > >  4 files changed, 96 insertions(+), 26 deletions(-)

I just completed the following test with this patches and here are the results.
Dmesg outputs are attached.

1. Cold boot
	FW loaded as expected.
2. New FW + cold boot
	New FW loaded as expected.
3. Reboot
	Same FW loaded again after restting the device to bootloader.
4. New FW + Reboot
	New FW loaded after resetting the device to bootloader.
5. Suspend
	No BT driver activity since no enumeration

Please check #3 case which loading the firmware again even if the same
version of firmeare is already running.

This is the dmesg output.
[    4.021072] Bluetooth: Core ver 2.22
[    4.021089] Bluetooth: HCI device and connection manager initialized
[    4.021092] Bluetooth: HCI socket layer initialized
[    4.021093] Bluetooth: L2CAP socket layer initialized
[    4.021097] Bluetooth: SCO socket layer initialized
[    4.625690] Bluetooth: hci0: Firmware revision 0.1 build 26 week 11 2020
[    4.631875] Bluetooth: hci0: Found device firmware: intel/ibt-17-16-1.sfi
[    5.955215] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    5.955217] Bluetooth: BNEP filters: protocol multicast
[    5.955220] Bluetooth: BNEP socket layer initialized
[    6.660529] Bluetooth: hci0: command 0xfc01 tx timeout
[   14.654714] Bluetooth: hci0: FW download error recovery failed (-110)
[   15.079684] Bluetooth: hci0: Bootloader revision 0.1 build 42 week 52 2015
[   15.080652] Bluetooth: hci0: Device revision is 2
[   15.080662] Bluetooth: hci0: Secure boot is enabled
[   15.080667] Bluetooth: hci0: OTP lock is enabled
[   15.080673] Bluetooth: hci0: API lock is enabled
[   15.080678] Bluetooth: hci0: Debug lock is disabled
[   15.080687] Bluetooth: hci0: Minimum firmware build 1 week 10 2014
[   15.081832] Bluetooth: hci0: Found device firmware: intel/ibt-17-16-1.sfi
[   16.965194] Bluetooth: hci0: Waiting for firmware download to complete
[   16.965560] Bluetooth: hci0: Firmware loaded in 1839570 usecs
[   16.965637] Bluetooth: hci0: Waiting for device to boot
[   16.978543] Bluetooth: hci0: Device booted in 12630 usecs
[   16.978895] Bluetooth: hci0: Found Intel DDC parameters: intel/ibt-17-16-1.ddc
[   16.981587] Bluetooth: hci0: Applying Intel DDC parameters completed
[   16.984616] Bluetooth: hci0: Firmware revision 0.1 build 26 week 11 2020
[   17.045576] Bluetooth: hci0: MSFT filter_enable is already on
[   70.621004] Bluetooth: RFCOMM TTY layer initialized
[   70.621010] Bluetooth: RFCOMM socket layer initialized
[   70.621014] Bluetooth: RFCOMM ver 1.11

While testing the scenarios, I found a bug (not from your patch series)
which prevents the driver from loading DDC. I will submit patch separately.

> > 
> > Regards,
> > Tedd
> > 

Regards,
Tedd
cold reboot:
[    4.203608] Bluetooth: hci0: Bootloader revision 0.1 build 42 week 52 2015
[    4.235127] Bluetooth: hci0: Found device firmware: intel/ibt-17-16-1.sfi
[    5.909625] Bluetooth: hci0: Waiting for firmware download to complete
[    5.910518] Bluetooth: hci0: Firmware loaded in 1636120 usecs
[    5.910547] Bluetooth: hci0: Waiting for device to boot
[    5.924519] Bluetooth: hci0: Device booted in 13651 usecs
[    5.926792] Bluetooth: hci0: Found Intel DDC parameters: intel/ibt-17-16-1.ddc
[    5.928523] Bluetooth: hci0: Applying Intel DDC parameters completed
[    5.931523] Bluetooth: hci0: Firmware revision 0.1 build 168 week 48 2020

New FW + cold reboot:
[    4.003687] Bluetooth: Core ver 2.22
[    4.003710] Bluetooth: HCI device and connection manager initialized
[    4.003713] Bluetooth: HCI socket layer initialized
[    4.003715] Bluetooth: L2CAP socket layer initialized
[    4.003718] Bluetooth: SCO socket layer initialized
[    4.238399] Bluetooth: hci0: Bootloader revision 0.1 build 42 week 52 2015
[    4.239395] Bluetooth: hci0: Device revision is 2
[    4.239396] Bluetooth: hci0: Secure boot is enabled
[    4.239396] Bluetooth: hci0: OTP lock is enabled
[    4.239397] Bluetooth: hci0: API lock is enabled
[    4.239398] Bluetooth: hci0: Debug lock is disabled
[    4.239399] Bluetooth: hci0: Minimum firmware build 1 week 10 2014
[    4.311738] Bluetooth: hci0: Found device firmware: intel/ibt-17-16-1.sfi
[    5.629135] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    5.629137] Bluetooth: BNEP filters: protocol multicast
[    5.629139] Bluetooth: BNEP socket layer initialized
[    5.703020] Bluetooth: hci0: Waiting for firmware download to complete
[    5.703384] Bluetooth: hci0: Firmware loaded in 1359026 usecs
[    5.703411] Bluetooth: hci0: Waiting for device to boot
[    5.716412] Bluetooth: hci0: Device booted in 12707 usecs
[    5.716714] Bluetooth: hci0: Found Intel DDC parameters: intel/ibt-17-16-1.ddc
[    5.719383] Bluetooth: hci0: Applying Intel DDC parameters completed
[    5.722389] Bluetooth: hci0: Firmware revision 0.1 build 26 week 11 2020
[    5.780406] Bluetooth: hci0: MSFT filter_enable is already on
[   14.822336] Bluetooth: RFCOMM TTY layer initialized
[   14.822342] Bluetooth: RFCOMM socket layer initialized
[   14.822345] Bluetooth: RFCOMM ver 1.11


Reboot
[    4.021072] Bluetooth: Core ver 2.22
[    4.021089] Bluetooth: HCI device and connection manager initialized
[    4.021092] Bluetooth: HCI socket layer initialized
[    4.021093] Bluetooth: L2CAP socket layer initialized
[    4.021097] Bluetooth: SCO socket layer initialized
[    4.625690] Bluetooth: hci0: Firmware revision 0.1 build 26 week 11 2020
[    4.631875] Bluetooth: hci0: Found device firmware: intel/ibt-17-16-1.sfi
[    5.955215] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    5.955217] Bluetooth: BNEP filters: protocol multicast
[    5.955220] Bluetooth: BNEP socket layer initialized
[    6.660529] Bluetooth: hci0: command 0xfc01 tx timeout
[   14.654714] Bluetooth: hci0: FW download error recovery failed (-110)
[   15.079684] Bluetooth: hci0: Bootloader revision 0.1 build 42 week 52 2015
[   15.080652] Bluetooth: hci0: Device revision is 2
[   15.080662] Bluetooth: hci0: Secure boot is enabled
[   15.080667] Bluetooth: hci0: OTP lock is enabled
[   15.080673] Bluetooth: hci0: API lock is enabled
[   15.080678] Bluetooth: hci0: Debug lock is disabled
[   15.080687] Bluetooth: hci0: Minimum firmware build 1 week 10 2014
[   15.081832] Bluetooth: hci0: Found device firmware: intel/ibt-17-16-1.sfi
[   16.965194] Bluetooth: hci0: Waiting for firmware download to complete
[   16.965560] Bluetooth: hci0: Firmware loaded in 1839570 usecs
[   16.965637] Bluetooth: hci0: Waiting for device to boot
[   16.978543] Bluetooth: hci0: Device booted in 12630 usecs
[   16.978895] Bluetooth: hci0: Found Intel DDC parameters: intel/ibt-17-16-1.ddc
[   16.981587] Bluetooth: hci0: Applying Intel DDC parameters completed
[   16.984616] Bluetooth: hci0: Firmware revision 0.1 build 26 week 11 2020
[   17.045576] Bluetooth: hci0: MSFT filter_enable is already on
[   70.621004] Bluetooth: RFCOMM TTY layer initialized
[   70.621010] Bluetooth: RFCOMM socket layer initialized
[   70.621014] Bluetooth: RFCOMM ver 1.11

New FW + Reboot
[    3.814893] Bluetooth: Core ver 2.22
[    3.814906] Bluetooth: HCI device and connection manager initialized
[    3.814908] Bluetooth: HCI socket layer initialized
[    3.814910] Bluetooth: L2CAP socket layer initialized
[    3.814911] Bluetooth: SCO socket layer initialized
[    3.999600] Bluetooth: hci0: Firmware revision 0.1 build 26 week 11 2020
[    4.003750] Bluetooth: hci0: Found device firmware: intel/ibt-17-16-1.sfi
[    6.014371] Bluetooth: hci0: command 0xfc01 tx timeout
[    7.268662] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    7.268664] Bluetooth: BNEP filters: protocol multicast
[    7.268667] Bluetooth: BNEP socket layer initialized
[   14.142644] Bluetooth: hci0: FW download error recovery failed (-110)
[   14.569698] Bluetooth: hci0: Bootloader revision 0.1 build 42 week 52 2015
[   14.570636] Bluetooth: hci0: Device revision is 2
[   14.570645] Bluetooth: hci0: Secure boot is enabled
[   14.570650] Bluetooth: hci0: OTP lock is enabled
[   14.570656] Bluetooth: hci0: API lock is enabled
[   14.570661] Bluetooth: hci0: Debug lock is disabled
[   14.570669] Bluetooth: hci0: Minimum firmware build 1 week 10 2014
[   14.571733] Bluetooth: hci0: Found device firmware: intel/ibt-17-16-1.sfi
[   16.017567] Bluetooth: hci0: Waiting for firmware download to complete
[   16.018529] Bluetooth: hci0: Firmware loaded in 1412881 usecs
[   16.018666] Bluetooth: hci0: Waiting for device to boot
[   16.032624] Bluetooth: hci0: Device booted in 13702 usecs
[   16.035203] Bluetooth: hci0: Found Intel DDC parameters: intel/ibt-17-16-1.ddc
[   16.036755] Bluetooth: hci0: Applying Intel DDC parameters completed
[   16.039822] Bluetooth: hci0: Firmware revision 0.1 build 168 week 48 2020
[   16.099690] Bluetooth: hci0: MSFT filter_enable is already on
[   18.660811] Bluetooth: RFCOMM TTY layer initialized
[   18.660815] Bluetooth: RFCOMM socket layer initialized
[   18.660819] Bluetooth: RFCOMM ver 1.11

Suspend
No Change since no enumeration


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux