Skip to contentSkip to conversation

Bluetooth: btrtl: btmrvl: Fix firmware filename for rtl8723bs chipset

PATCH In review Meng Tang 4 participants 6 messages Mar 15, 2022 – Mar 16, 2022 Bluetooth drivers

lore
Share & tools
lore

Meng Tang

author
#0 lore raw

PATCH v3 1/2 Bluetooth: btrtl: btmrvl: Fix firmware filename for rtl8723bs chipset

Firmware for rtl8723bs chipset is as part of the linux-firmware repository in filename rtl8723bs_config-OBDA8723.bin.

This patch fixes mwifiex driver to load correct firmware file for rtl8723bs.

Fixes c50903e3ee1b5 (Bluetooth: btrtl: add support for the RTL8723BS and RTL8723DS chips)
---
 drivers/bluetooth/btrtl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/bluetooth/btrtl.c +2 -2
index c2030f7e25b4..449858b65e8e 100644
@@ -88,7 +88,7 @@ static const struct id_table ic_id_table[] = {
 	  .config_needed = true,
 	  .has_rom_version = true,
 	  .fw_name  = "rtl_bt/rtl8723bs_fw.bin",
-	  .cfg_name = "rtl_bt/rtl8723bs_config" },
+	  .cfg_name = "rtl_bt/rtl8723bs_config-OBDA8723" },
 
 	/* 8723B */
 	{ IC_INFO(RTL_ROM_LMP_8723B, 0xb, 0x6, HCI_USB),
@@ -923,7 +923,7 @@ MODULE_FIRMWARE("rtl_bt/rtl8723a_fw.bin");
 MODULE_FIRMWARE("rtl_bt/rtl8723b_fw.bin");
 MODULE_FIRMWARE("rtl_bt/rtl8723b_config.bin");
 MODULE_FIRMWARE("rtl_bt/rtl8723bs_fw.bin");
-MODULE_FIRMWARE("rtl_bt/rtl8723bs_config.bin");
+MODULE_FIRMWARE("rtl_bt/rtl8723bs_config-OBDA8723.bin");
 MODULE_FIRMWARE("rtl_bt/rtl8723ds_fw.bin");
 MODULE_FIRMWARE("rtl_bt/rtl8723ds_config.bin");
 MODULE_FIRMWARE("rtl_bt/rtl8761a_fw.bin");
Signature · 1 line
2.20.1
author
#1 lore raw

PATCH v3 2/2 Bluetooth: btrtl: btmrvl: Fix firmware filename for some rtl chipsets

Firmware for rtl chipset is as part of the linux-firmware repository in dir linux-firmware/rtl_bt. Today, the rtl8761a_config, rtl8821a_config and rtl8723b_config files are used in btrtl, but it doesn't actually exist, which causes errors like:

bluetooth: Direct firmware load for rtl_bt/rtl8821a_config.bin failed with error -2

According to the files in the rtl_bt directory in the Linux firmware, fixes the driver to load correct firmware file for rtl.

Fixes f96dbd322a8f1 (Bluetooth: btrtl: add MODULE_FIRMWARE declarations)
---
 drivers/bluetooth/btrtl.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/bluetooth/btrtl.c +0 -3
index 449858b65e8e..56cec18475f7 100644
@@ -921,15 +921,12 @@ MODULE_VERSION(VERSION);
 MODULE_LICENSE("GPL");
 MODULE_FIRMWARE("rtl_bt/rtl8723a_fw.bin");
 MODULE_FIRMWARE("rtl_bt/rtl8723b_fw.bin");
-MODULE_FIRMWARE("rtl_bt/rtl8723b_config.bin");
 MODULE_FIRMWARE("rtl_bt/rtl8723bs_fw.bin");
 MODULE_FIRMWARE("rtl_bt/rtl8723bs_config-OBDA8723.bin");
 MODULE_FIRMWARE("rtl_bt/rtl8723ds_fw.bin");
 MODULE_FIRMWARE("rtl_bt/rtl8723ds_config.bin");
 MODULE_FIRMWARE("rtl_bt/rtl8761a_fw.bin");
-MODULE_FIRMWARE("rtl_bt/rtl8761a_config.bin");
 MODULE_FIRMWARE("rtl_bt/rtl8821a_fw.bin");
-MODULE_FIRMWARE("rtl_bt/rtl8821a_config.bin");
 MODULE_FIRMWARE("rtl_bt/rtl8822b_fw.bin");
 MODULE_FIRMWARE("rtl_bt/rtl8822b_config.bin");
 MODULE_FIRMWARE("rtl_bt/rtl8852au_fw.bin");
Signature · 1 line
2.20.1
#2 lore raw

Re: [PATCH v3 2/2] Bluetooth: btrtl: btmrvl: Fix firmware filename for some rtl chipsets

Hi,

Quoted 8 lines · Meng Tang

Firmware for rtl chipset is as part of the linux-firmware repository in dir linux-firmware/rtl_bt. Today, the rtl8761a_config, rtl8821a_config and rtl8723b_config files are used in btrtl, but it doesn't actually exist, which causes errors like:

bluetooth: Direct firmware load for rtl_bt/rtl8821a_config.bin failed with error -2

These config files can be board specific. I don't know the policy for MODULE_FIRMWARE macros.
Personally I think: if the driver tries to load a specific firmware file then it's fine to have a MODULE_FIRMWARE entry. Even if this firmware is not part of the linux-firmware repository.

Best regards,
Martin

maintainer
#3 lore raw

Re: [PATCH v3 2/2] Bluetooth: btrtl: btmrvl: Fix firmware filename for some rtl chipsets

In reply to Meng Tang

Hi Meng,

Quoted 8 lines

Firmware for rtl chipset is as part of the linux-firmware repository in dir linux-firmware/rtl_bt. Today, the rtl8761a_config, rtl8821a_config and rtl8723b_config files are used in btrtl, but it doesn't actually exist, which causes errors like:

bluetooth: Direct firmware load for rtl_bt/rtl8821a_config.bin failed with error -2

Quoted 8 lines

According to the files in the rtl_bt directory in the Linux firmware, fixes the driver to load correct firmware file for rtl.

Fixes f96dbd322a8f1 (Bluetooth: btrtl: add MODULE_FIRMWARE declarations)

---
drivers/bluetooth/btrtl.c | 3 ---

1 file changed, 3 deletions(-)

I am ignoring this patch since the subject is bogus.

Regards

Marcel

#4 lore raw
In reply to Meng Tang

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=623467

---Test result---

Test Summary:

CheckPatch                    PASS      3.06 seconds
GitLint                       PASS      2.07 seconds
SubjectPrefix                 PASS      1.72 seconds
BuildKernel                   PASS      29.67 seconds
BuildKernel32                 PASS      26.39 seconds
Incremental Build with patchesPASS      44.25 seconds
TestRunner: Setup             PASS      457.53 seconds
TestRunner: l2cap-tester      PASS      15.11 seconds
TestRunner: bnep-tester       PASS      5.91 seconds
TestRunner: mgmt-tester       PASS      97.37 seconds
TestRunner: rfcomm-tester     PASS      7.41 seconds
TestRunner: sco-tester        PASS      7.23 seconds
TestRunner: smp-tester        PASS      7.31 seconds
TestRunner: userchan-tester   PASS      6.00 seconds

---
Regards,
Linux Bluetooth

#5 lore raw
In reply to Meng Tang

Hello,

Quoted 6 lines · Meng Tang

Firmware for rtl8723bs chipset is as part of the linux-firmware repository in filename rtl8723bs_config-OBDA8723.bin.

This patch fixes mwifiex driver to load correct firmware file for rtl8723bs.

This raises some serious questions for me:
- the subject states that this patch is for the btmrvl driver
- mwifiex is for Marvell based chips which to my knowledge are not related to any Realtek chips, so mwifiex should never try to load Realtek firmware files

[...]

drivers/bluetooth/btrtl.c static const struct id_table ic_id_table[] = { · line 91

Quoted 6 lines
drivers/bluetooth/btrtl.c +1 -1
@@ -88,7 +88,7 @@ static const struct id_table ic_id_table[] = {
          .config_needed = true,
          .has_rom_version = true,
          .fw_name  = "rtl_bt/rtl8723bs_fw.bin",
-         .cfg_name = "rtl_bt/rtl8723bs_config" },
+         .cfg_name = "rtl_bt/rtl8723bs_config-OBDA8723" },

This change is incorrect, see btrtl_initialize():

  if (btrtl_dev->ic_info->cfg_name) {
    if (postfix) {
       snprintf(cfg_name, sizeof(cfg_name), "%s-%s.bin",
btrtl_dev->ic_info->cfg_name, postfix);
     } else {
       snprintf(cfg_name, sizeof(cfg_name), "%s.bin",

btrtl_dev->ic_info->cfg_name);

This suffix (postfix) can be either OBDA8723, OBDA0623 or just be absent - see hci_h5.c (h5_acpi_match, h5_serdev_probe() which sets h5->id and h5_btrtl_setup() which uses h5->id).

[...]

drivers/bluetooth/btrtl.c MODULE_FIRMWARE("rtl_bt/rtl8723a_fw.bin"); · line 926

Quoted 2 lines
drivers/bluetooth/btrtl.c +1 -1
-MODULE_FIRMWARE("rtl_bt/rtl8723bs_config.bin");
+MODULE_FIRMWARE("rtl_bt/rtl8723bs_config-OBDA8723.bin");

According to the driver code "rtl_bt/rtl8723bs_config.bin" is a valid value so I think it should not be removed.
Adding "rtl_bt/rtl8723bs_config-OBDA8723.bin" is fine for me - if that's done then "rtl_bt/rtl8723bs_config-OBDA0623.bin" should be added as well.

Best regards,
Martin