linux-stable/drivers/bluetooth
Hans de Goede 74530a639a Bluetooth: btbcm: Try multiple Patch filenames when loading the Patch firmware
Currently the bcm_uart_subver_ and bcm_usb_subver_table-s lack entries
for various newer chipsets. This makes the code use just "BCM" as prefix
for the filename to pass to request-firmware, making it harder for users
to figure out which firmware they need. This especially a problem with
UART attached devices where this leads to the filename being "BCM.hcd".

If we add new entries to the subver-tables now, then this will change
what firmware file the kernel looks for, e.g. currently linux-firmware
contains a brcm/BCM-0bb4-0306.hcd file. If we add the info for the
BCM20703A1 to the subver table, then this will change to
brcm/BCM20703A1-0bb4-0306.hcd. This will cause the file to no longer
get loaded breaking Bluetooth for existing users, going against the
no regressions policy.

To avoid this regression make the btbcm code try multiple filenames,
first try the fullname, e.g. BCM20703A1-0bb4-0306.hcd and if that is
not found, then fallback to the name with just BCM as prefix.

This commit also adds an info message which filename was used,
this makes the output look like this for example:

[   57.387867] Bluetooth: hci0: BCM20703A1
[   57.387870] Bluetooth: hci0: BCM20703A1 (001.001.005) build 0000
[   57.389438] Bluetooth: hci0: BCM20703A1 'brcm/BCM20703A1-0a5c-6410.hcd' Patch
[   58.681769] Bluetooth: hci0: BCM20703A1 Generic USB 20Mhz fcbga_BU
[   58.681772] Bluetooth: hci0: BCM20703A1 (001.001.005) build 0481

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2020-04-22 19:43:58 +02:00
..
ath3k.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
bcm203x.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
bfusb.c Bluetooth: bfusb: Switch from BT_ERR to bt_dev_err where possible 2020-03-11 10:05:50 +02:00
bluecard_cs.c bluetooth: bluecard_cs: Replace GFP_ATOMIC with GFP_KERNEL in bluecard_hci_set_baud_rate() 2018-07-23 18:05:00 +02:00
bpa10x.c Bluetooth: bpa10x: change return value 2019-09-04 16:11:46 +02:00
bt3c_cs.c Bluetooth: bt3c_cs: Fix obsolete function 2018-09-27 12:57:39 +02:00
btbcm.c Bluetooth: btbcm: Try multiple Patch filenames when loading the Patch firmware 2020-04-22 19:43:58 +02:00
btbcm.h Bluetooth: btbcm: Make btbcm_setup_patchram use btbcm_finalize 2020-04-22 19:43:58 +02:00
btintel.c Bluetooth: btintel: Replace zero-length array with flexible-array member 2020-02-13 08:28:38 +01:00
btintel.h Bluetooth: btusb: Remove return statement in btintel_reset_to_bootloader 2019-10-19 09:56:20 +02:00
btmrvl_debugfs.c Bluetooth: btmrvl: Re-use kstrtol_from_user() 2018-05-30 08:16:05 +02:00
btmrvl_drv.h Bluetooth: btmrvl: Drop unused GPIO includes 2019-01-22 09:51:20 +01:00
btmrvl_main.c Bluetooth: btmrvl: support sysfs initiated firmware coredump 2018-05-29 15:59:50 +02:00
btmrvl_sdio.c Bluetooth: btmrvl: add support for SD8987 chipset 2019-04-23 19:01:45 +02:00
btmrvl_sdio.h
btmtksdio.c Bluetooth: btmtksdio: add MODULE_DEVICE_TABLE() 2019-11-07 15:15:41 +01:00
btmtkuart.c Bluetooth: btmtkuart: add an implementation for clock osc property 2019-07-06 13:00:04 +02:00
btqca.c Bluetooth: hci_qca: Add support for Qualcomm Bluetooth SoC QCA6390 2020-04-02 08:25:19 +02:00
btqca.h Bluetooth: hci_qca: Add support for Qualcomm Bluetooth SoC QCA6390 2020-04-02 08:25:19 +02:00
btqcomsmd.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 284 2019-06-05 17:36:37 +02:00
btrsi.c Bluetooth: btrsi: fix bt tx timeout issue 2018-09-27 12:53:40 +02:00
btrtl.c Bluetooth: btrtl: Add support for RTL8761B 2020-04-11 07:58:23 +02:00
btrtl.h Bluetooth: Replace zero-length array with flexible-array member 2020-02-28 08:30:02 +01:00
btsdio.c Bluetooth: btsdio: Check for valid packet type 2020-01-15 22:28:51 +01:00
btusb.c Bluetooth: btusb: check for NULL in btusb_find_altsetting() 2020-04-08 08:16:56 +02:00
dtl1_cs.c
h4_recv.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
hci_ag6xx.c Bluetooth: hci_uart: Replace zero-length array with flexible-array member 2020-02-13 08:28:38 +01:00
hci_ath.c Bluetooth: hci_uart: check for missing tty operations 2019-07-31 13:17:33 -07:00
hci_bcm.c Bluetooth: btbcm: Make btbcm_setup_patchram use btbcm_finalize 2020-04-22 19:43:58 +02:00
hci_bcsp.c Bluetooth: Fix invalid-free in bcsp_close() 2019-11-04 15:19:02 +01:00
hci_h4.c Bluetooth: hci_h4: Remove a redundant assignment in 'h4_flush()' 2020-02-28 08:43:57 +01:00
hci_h5.c Bluetooth: hci_h5: Switch from BT_ERR to bt_dev_err where possible 2020-03-11 10:06:03 +02:00
hci_intel.c Bluetooth: hci_intel: Replace zero-length array with flexible-array member 2020-02-13 08:28:38 +01:00
hci_ldisc.c Bluetooth: hci_uart: check for missing tty operations 2019-07-31 13:17:33 -07:00
hci_ll.c Revert "Bluetooth: hci_ll: set operational frequency earlier" 2019-10-16 20:33:16 +02:00
hci_mrvl.c Bluetooth: hci_uart: check for missing tty operations 2019-07-31 13:17:33 -07:00
hci_nokia.c Bluetooth: hci_nokia: Save a few cycles in 'nokia_enqueue()' 2019-10-16 19:26:40 +02:00
hci_qca.c Bluetooth: hci_qca: Add support for Qualcomm Bluetooth SoC QCA6390 2020-04-02 08:25:19 +02:00
hci_serdev.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
hci_uart.h Bluetooth: hci_h4: Add support for ISO packets 2020-01-15 22:28:51 +01:00
hci_vhci.c Bluetooth: hci_vhci: Add support for ISO packets 2020-01-15 22:28:51 +01:00
Kconfig Bluetooth: hci_h5: btrtl: Add support for RTL8822C 2020-02-18 09:22:22 +01:00
Makefile Bluetooth: btwilink: drop superseded driver 2019-10-16 21:12:52 +02:00