From d84ad535beb94a20ca4d5c0ca7b923d49ea19196 Mon Sep 17 00:00:00 2001 From: Redecorating <69827514+Redecorating@users.noreply.github.com> Date: Thu, 30 Dec 2021 15:32:19 +1100 Subject: [PATCH 1/4] kernel: Update to v5.15.12 --- .SRCINFO | 50 +- ...onsolidate-early-memory-reservations.patch | 188 ----- ...several-reservations-of-start-of-mem.patch | 67 -- ...rim_snb_memory-later-in-setup_arch-t.patch | 87 --- ...p-always-reserve-the-first-1M-of-RAM.patch | 170 ---- ...-CONFIG_X86_RESERVE_LOW-and-reservel.patch | 114 --- ...86-crash-remove-crash_reserve_low_1M.patch | 58 -- ...convert-static-structures-to-drvdata.patch | 22 +- ...lesmc-make-io-port-base-addr-dynamic.patch | 12 +- ...-switch-to-acpi_device-from-platform.patch | 12 +- 3004-applesmc-key-interface-wrappers.patch | 6 +- ...-basic-mmio-interface-implementation.patch | 6 +- 3006-applesmc-fan-support-on-T2-Macs.patch | 10 +- ...lity-to-manually-specify-FW-rambase-.patch | 22 +- ...Add-initial-support-for-the-BRCM4355.patch | 4 +- ...Add-initial-support-for-the-BRCM4377.patch | 7 +- PKGBUILD | 38 +- config | 737 +++++++++++------- 18 files changed, 553 insertions(+), 1057 deletions(-) delete mode 100644 0002-x86-setup-Consolidate-early-memory-reservations.patch delete mode 100644 0003-x86-setup-Merge-several-reservations-of-start-of-mem.patch delete mode 100644 0004-x86-setup-Move-trim_snb_memory-later-in-setup_arch-t.patch delete mode 100644 0005-x86-setup-always-reserve-the-first-1M-of-RAM.patch delete mode 100644 0006-x86-setup-remove-CONFIG_X86_RESERVE_LOW-and-reservel.patch delete mode 100644 0007-x86-crash-remove-crash_reserve_low_1M.patch diff --git a/.SRCINFO b/.SRCINFO index ff392b2..0cdb610 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,8 +1,8 @@ pkgbase = linux-mbp pkgdesc = Linux for MBP - pkgver = 5.12.19 - pkgrel = 2 - url = https://git.archlinux.org/linux.git/log/?h=vv5.12-19 + pkgver = 5.15.12 + pkgrel = 1 + url = https://git.archlinux.org/linux.git/log/?h=vv5.15-12 arch = x86_64 license = GPL2 makedepends = bc @@ -20,16 +20,10 @@ pkgbase = linux-mbp makedepends = imagemagick makedepends = git options = !strip - source = https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.12.19.tar.xz - source = https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.12.19.tar.sign + source = https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.15.12.tar.xz + source = https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.15.12.tar.sign source = config source = 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch - source = 0002-x86-setup-Consolidate-early-memory-reservations.patch - source = 0003-x86-setup-Merge-several-reservations-of-start-of-mem.patch - source = 0004-x86-setup-Move-trim_snb_memory-later-in-setup_arch-t.patch - source = 0005-x86-setup-always-reserve-the-first-1M-of-RAM.patch - source = 0006-x86-setup-remove-CONFIG_X86_RESERVE_LOW-and-reservel.patch - source = 0007-x86-crash-remove-crash_reserve_low_1M.patch source = 2001-drm-amd-display-Force-link_rate-as-LINK_RATE_RBR2-fo.patch source = 3001-applesmc-convert-static-structures-to-drvdata.patch source = 3002-applesmc-make-io-port-base-addr-dynamic.patch @@ -55,23 +49,17 @@ pkgbase = linux-mbp source = 9001-brcmfmac-p2p-Ensure-virtual-interface-is-initialized.patch validpgpkeys = ABAF11C65A2970B130ABE3C479BE3E4300411886 validpgpkeys = 647F28654894E3BD457199BE38DBBDC86092693E - sha256sums = e9381cd3525a02f5b895f74147e2440be443ecd45484c6c64075046bc6f94c73 + sha256sums = 7de919772b62647591527e904e3b3583783381a29d812404f58a222484e751a0 sha256sums = SKIP - sha256sums = 90473ec7afd9ce7496fe7446aa8383f99d16824ff30e60febd565fd94281cda9 + sha256sums = 6ab7a66895804f832f1b9594b682be0e2e6982455a8fc3f7e87111e1c7dff866 sha256sums = ea16157696cb1807f8960de667a8c56da223bfae02c94d7b2aed6853c541f2ed - sha256sums = f0ae4223a64febc053d779a71d171a5e44bbd2bfa286f713fe7fe97ba0dcb802 - sha256sums = 250c98c9c3776ad8a49333ebd8d5a4e56c7cc3f6886b0058ea7c0744a4748780 - sha256sums = c9ccb0167883589c8f0aa6220d7c2005312f83018b9ab26a14527a592e426f1d - sha256sums = 5d1e578231a6742fe8ac4785c8d7129315daa4b5b5703cb968705f90344daabf - sha256sums = 4360ee51d90abb42021dd840337067ec743bbd367c23dc2a1136ff61c4fe70e2 - sha256sums = 46d2ae7147968daeb25d128ae9abb30a58f8371218a0b7643fb9916e55da8dfe sha256sums = 786dfc22e4c6ece883e7dedd0ba3f6c14018584df95450b2cb78f3da8b01f7cb - sha256sums = 0d3e591d7cb2532ee68c4621594a10b1d0240528a312159ee0731484bb180400 - sha256sums = 63187212c33d844b6b9a26f76e789d9f4144d0d8fe9444dfd499f31430b45648 - sha256sums = d66a0cdf4377d3e5c7f42a7ae45785d8da1a44fcc9001dcb721d987f490018c9 - sha256sums = 688dee43c42d2e572c31d26513d43f02f9838c3fe149446db79dfca451801ab9 - sha256sums = 560f1b89bd9ea93107903ed34100129ee0ac0ea5dd8b3d74db9a6835b1bfdb4c - sha256sums = e46140f502d8c00d88e206934a491a8a0dd1ff7fac187bbf93bb8c3a106e5bc7 + sha256sums = 7366a08383900a09f8e742b1e4f0a02e0839a385e68e70a89d1815c197df3300 + sha256sums = 8d8401a99a9dfbc41aa2dc5b6a409a19860b1b918465e19de4a4ff18de075ea3 + sha256sums = 08d165106fe35b68a7b48f216566951a5db0baac19098c015bcc81c5fcba678d + sha256sums = 459906cab172df9f6712a4168e7a5d529f85b2bb58a068f2d44746df14a6d27a + sha256sums = 2827dab6eeb2d2a08034938024f902846b5813e967a0ea253dc1ea88315da383 + sha256sums = 398dec7d54c6122ae2263cd5a6d52353800a1a60fd85e52427c372ea9974a625 sha256sums = 11565cff9c6a7db8846dc7d5930419045e9527863b8df5979a7465006211bd16 sha256sums = 83f4be6849ba4d5f9fad647ad2eb78bf6409ee98a40ac62e8a5b80496233d70a sha256sums = 44bd3643b2b22fedc59d79511199f30ce6759fa0acdd9a66262a53c5e046da6b @@ -80,13 +68,13 @@ pkgbase = linux-mbp sha256sums = 1deeacae1875cf9075b858a8bfb2463ebc531c9030b7c2ab46bbb8e4c3b974db sha256sums = 40eff5e88bb30c51c6b97e85c2e7b8dec5f97916f768e6c07618d9c5afe68574 sha256sums = cac035fe07663a319185c644c5b39b34bef89ada348881fa4a02d15290260445 - sha256sums = 45719489a9297d863ea60464e45a7e92f19606e527a7219d3582022e38439c0e + sha256sums = 9dfa9f02d17c5cd9620fa2c1d43ca967b81b6a56d33c2bafae14e0c64e498baa sha256sums = 4d22727c1456e268de1c39ac73f2dc0c1630ac25aa66364d99f94e29eba5c6b9 - sha256sums = 7f41e52285bbdeeaf565e7a1e69860439a4cc302092b473301040f29fc2f5b64 + sha256sums = cc8a177699862101cbed9172def8c3985d65f7b5c7755f600559aa45dd80e348 sha256sums = 9640178d6251686c980c30fc528b3d70beac6ce8246bf433506a3f843808326c sha256sums = 90a6012cdd8a64ede8e0bbaf7331960bd68f628e0973b65459188eb1ccb5b829 - sha256sums = 3a7baa28d5f45bdbff23e838133f2e3c6896412ffb5a919b4992a7b2d17469d9 - sha256sums = edb804461e3820ef3397e1e236f7caabf906b6a13d03f406c8462ec476ecbbe5 + sha256sums = fb73c8ba175ec2bdf765207f434d1e8977efa0be3097a6d1e2843536a531c351 + sha256sums = 294300fe5e290e18ee4062fe6847f7838c0f1a977af91157a1630828f55f7aa2 sha256sums = fa0ad2e2f171eafd727d780588f7ef5d47ddf2d75fab02c67356bbc7b26e25e0 pkgname = linux-mbp @@ -96,13 +84,13 @@ pkgname = linux-mbp depends = initramfs optdepends = crda: to set the correct wireless channels of your country optdepends = linux-firmware: firmware images needed for some devices - provides = linux=5.12.19 + provides = linux=5.15.12 replaces = virtualbox-guest-modules-arch replaces = wireguard-arch pkgname = linux-mbp-headers pkgdesc = Headers and scripts for building modules for the Linux for MBP kernel - provides = linux-headers=5.12.19 + provides = linux-headers=5.15.12 pkgname = linux-mbp-docs pkgdesc = Documentation for the Linux for MBP kernel diff --git a/0002-x86-setup-Consolidate-early-memory-reservations.patch b/0002-x86-setup-Consolidate-early-memory-reservations.patch deleted file mode 100644 index ee256a5..0000000 --- a/0002-x86-setup-Consolidate-early-memory-reservations.patch +++ /dev/null @@ -1,188 +0,0 @@ -From 8bd9e7d22ae0676f6dd2af4ea385111c052e745e Mon Sep 17 00:00:00 2001 -From: Mike Rapoport -Date: Tue, 2 Mar 2021 12:04:05 +0200 -Subject: [PATCH 2/7] x86/setup: Consolidate early memory reservations - -The early reservations of memory areas used by the firmware, bootloader, -kernel text and data are spread over setup_arch(). Moreover, some of them -happen *after* memblock allocations, e.g trim_platform_memory_ranges() and -trim_low_memory_range() are called after reserve_real_mode() that allocates -memory. - -There was no corruption of these memory regions because memblock always -allocates memory either from the end of memory (in top-down mode) or above -the kernel image (in bottom-up mode). However, the bottom up mode is going -to be updated to span the entire memory [1] to avoid limitations caused by -KASLR. - -Consolidate early memory reservations in a dedicated function to improve -robustness against future changes. Having the early reservations in one -place also makes it clearer what memory must be reserved before memblock -allocations are allowed. - -Signed-off-by: Mike Rapoport -Signed-off-by: Borislav Petkov -Reviewed-by: Baoquan He -Acked-by: Borislav Petkov -Acked-by: David Hildenbrand -Link: [1] https://lore.kernel.org/lkml/20201217201214.3414100-2-guro@fb.com -Link: https://lkml.kernel.org/r/20210302100406.22059-2-rppt@kernel.org ---- - arch/x86/kernel/setup.c | 92 ++++++++++++++++++++--------------------- - 1 file changed, 44 insertions(+), 48 deletions(-) - -diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c -index e79f21d13a0d..420d881da2bd 100644 ---- a/arch/x86/kernel/setup.c -+++ b/arch/x86/kernel/setup.c -@@ -646,18 +646,6 @@ static void __init trim_snb_memory(void) - } - } - --/* -- * Here we put platform-specific memory range workarounds, i.e. -- * memory known to be corrupt or otherwise in need to be reserved on -- * specific platforms. -- * -- * If this gets used more widely it could use a real dispatch mechanism. -- */ --static void __init trim_platform_memory_ranges(void) --{ -- trim_snb_memory(); --} -- - static void __init trim_bios_range(void) - { - /* -@@ -730,7 +718,38 @@ static void __init trim_low_memory_range(void) - { - memblock_reserve(0, ALIGN(reserve_low, PAGE_SIZE)); - } -- -+ -+static void __init early_reserve_memory(void) -+{ -+ /* -+ * Reserve the memory occupied by the kernel between _text and -+ * __end_of_kernel_reserve symbols. Any kernel sections after the -+ * __end_of_kernel_reserve symbol must be explicitly reserved with a -+ * separate memblock_reserve() or they will be discarded. -+ */ -+ memblock_reserve(__pa_symbol(_text), -+ (unsigned long)__end_of_kernel_reserve - (unsigned long)_text); -+ -+ /* -+ * Make sure page 0 is always reserved because on systems with -+ * L1TF its contents can be leaked to user processes. -+ */ -+ memblock_reserve(0, PAGE_SIZE); -+ -+ early_reserve_initrd(); -+ -+ if (efi_enabled(EFI_BOOT)) -+ efi_memblock_x86_reserve_range(); -+ -+ memblock_x86_reserve_range_setup_data(); -+ -+ reserve_ibft_region(); -+ reserve_bios_regions(); -+ -+ trim_snb_memory(); -+ trim_low_memory_range(); -+} -+ - /* - * Dump out kernel offset information on panic. - */ -@@ -765,29 +784,6 @@ dump_kernel_offset(struct notifier_block *self, unsigned long v, void *p) - - void __init setup_arch(char **cmdline_p) - { -- /* -- * Reserve the memory occupied by the kernel between _text and -- * __end_of_kernel_reserve symbols. Any kernel sections after the -- * __end_of_kernel_reserve symbol must be explicitly reserved with a -- * separate memblock_reserve() or they will be discarded. -- */ -- memblock_reserve(__pa_symbol(_text), -- (unsigned long)__end_of_kernel_reserve - (unsigned long)_text); -- -- /* -- * Make sure page 0 is always reserved because on systems with -- * L1TF its contents can be leaked to user processes. -- */ -- memblock_reserve(0, PAGE_SIZE); -- -- early_reserve_initrd(); -- -- /* -- * At this point everything still needed from the boot loader -- * or BIOS or kernel text should be early reserved or marked not -- * RAM in e820. All other memory is free game. -- */ -- - #ifdef CONFIG_X86_32 - memcpy(&boot_cpu_data, &new_cpu_data, sizeof(new_cpu_data)); - -@@ -911,8 +907,18 @@ void __init setup_arch(char **cmdline_p) - - parse_early_param(); - -- if (efi_enabled(EFI_BOOT)) -- efi_memblock_x86_reserve_range(); -+ /* -+ * Do some memory reservations *before* memory is added to -+ * memblock, so memblock allocations won't overwrite it. -+ * Do it after early param, so we could get (unlikely) panic from -+ * serial. -+ * -+ * After this point everything still needed from the boot loader or -+ * firmware or kernel text should be early reserved or marked not -+ * RAM in e820. All other memory is free game. -+ */ -+ early_reserve_memory(); -+ - #ifdef CONFIG_MEMORY_HOTPLUG - /* - * Memory used by the kernel cannot be hot-removed because Linux -@@ -939,9 +945,6 @@ void __init setup_arch(char **cmdline_p) - - x86_report_nx(); - -- /* after early param, so could get panic from serial */ -- memblock_x86_reserve_range_setup_data(); -- - if (acpi_mps_check()) { - #ifdef CONFIG_X86_LOCAL_APIC - disable_apic = 1; -@@ -1033,8 +1036,6 @@ void __init setup_arch(char **cmdline_p) - */ - find_smp_config(); - -- reserve_ibft_region(); -- - early_alloc_pgt_buf(); - - /* -@@ -1055,8 +1056,6 @@ void __init setup_arch(char **cmdline_p) - */ - sev_setup_arch(); - -- reserve_bios_regions(); -- - efi_fake_memmap(); - efi_find_mirror(); - efi_esrt_init(); -@@ -1082,9 +1081,6 @@ void __init setup_arch(char **cmdline_p) - - reserve_real_mode(); - -- trim_platform_memory_ranges(); -- trim_low_memory_range(); -- - init_mem_mapping(); - - idt_setup_early_pf(); --- -2.32.0 - diff --git a/0003-x86-setup-Merge-several-reservations-of-start-of-mem.patch b/0003-x86-setup-Merge-several-reservations-of-start-of-mem.patch deleted file mode 100644 index 14b6051..0000000 --- a/0003-x86-setup-Merge-several-reservations-of-start-of-mem.patch +++ /dev/null @@ -1,67 +0,0 @@ -From c1f1e2a2781a0c0ead90df1e873ba7f6aaad35ed Mon Sep 17 00:00:00 2001 -From: Mike Rapoport -Date: Tue, 2 Mar 2021 12:04:06 +0200 -Subject: [PATCH 3/7] x86/setup: Merge several reservations of start of memory - -Currently, the first several pages are reserved both to avoid leaking -their contents on systems with L1TF and to avoid corrupting BIOS memory. - -Merge the two memory reservations. - -Signed-off-by: Mike Rapoport -Signed-off-by: Borislav Petkov -Reviewed-by: David Hildenbrand -Acked-by: Borislav Petkov -Link: https://lkml.kernel.org/r/20210302100406.22059-3-rppt@kernel.org ---- - arch/x86/kernel/setup.c | 19 ++++++++++--------- - 1 file changed, 10 insertions(+), 9 deletions(-) - -diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c -index 420d881da2bd..282d572e49af 100644 ---- a/arch/x86/kernel/setup.c -+++ b/arch/x86/kernel/setup.c -@@ -714,11 +714,6 @@ static int __init parse_reservelow(char *p) - - early_param("reservelow", parse_reservelow); - --static void __init trim_low_memory_range(void) --{ -- memblock_reserve(0, ALIGN(reserve_low, PAGE_SIZE)); --} -- - static void __init early_reserve_memory(void) - { - /* -@@ -731,10 +726,17 @@ static void __init early_reserve_memory(void) - (unsigned long)__end_of_kernel_reserve - (unsigned long)_text); - - /* -- * Make sure page 0 is always reserved because on systems with -- * L1TF its contents can be leaked to user processes. -+ * The first 4Kb of memory is a BIOS owned area, but generally it is -+ * not listed as such in the E820 table. -+ * -+ * Reserve the first memory page and typically some additional -+ * memory (64KiB by default) since some BIOSes are known to corrupt -+ * low memory. See the Kconfig help text for X86_RESERVE_LOW. -+ * -+ * In addition, make sure page 0 is always reserved because on -+ * systems with L1TF its contents can be leaked to user processes. - */ -- memblock_reserve(0, PAGE_SIZE); -+ memblock_reserve(0, ALIGN(reserve_low, PAGE_SIZE)); - - early_reserve_initrd(); - -@@ -747,7 +749,6 @@ static void __init early_reserve_memory(void) - reserve_bios_regions(); - - trim_snb_memory(); -- trim_low_memory_range(); - } - - /* --- -2.32.0 - diff --git a/0004-x86-setup-Move-trim_snb_memory-later-in-setup_arch-t.patch b/0004-x86-setup-Move-trim_snb_memory-later-in-setup_arch-t.patch deleted file mode 100644 index 2f695f9..0000000 --- a/0004-x86-setup-Move-trim_snb_memory-later-in-setup_arch-t.patch +++ /dev/null @@ -1,87 +0,0 @@ -From 743e1a2b9b6e79fb237ac84e20dc4411217deb24 Mon Sep 17 00:00:00 2001 -From: Mike Rapoport -Date: Tue, 13 Apr 2021 21:08:39 +0300 -Subject: [PATCH 4/7] x86/setup: Move trim_snb_memory() later in setup_arch() - to fix boot hangs - -Commit - - a799c2bd29d1 ("x86/setup: Consolidate early memory reservations") - -moved reservation of the memory inaccessible by Sandy Bride integrated -graphics very early, and, as a result, on systems with such devices -the first 1M was reserved by trim_snb_memory() which prevented the -allocation of the real mode trampoline and made the boot hang very -early. - -Since the purpose of trim_snb_memory() is to prevent problematic pages -ever reaching the graphics device, it is safe to reserve these pages -after memblock allocations are possible. - -Move trim_snb_memory() later in boot so that it will be called after -reserve_real_mode() and make comments describing trim_snb_memory() -operation more elaborate. - - [ bp: Massage a bit. ] - -Fixes: a799c2bd29d1 ("x86/setup: Consolidate early memory reservations") -Reported-by: Randy Dunlap -Signed-off-by: Mike Rapoport -Signed-off-by: Borislav Petkov -Tested-by: Randy Dunlap -Tested-by: Hugh Dickins -Link: https://lkml.kernel.org/r/f67d3e03-af90-f790-baf4-8d412fe055af@infradead.org ---- - arch/x86/kernel/setup.c | 20 +++++++++++++++----- - 1 file changed, 15 insertions(+), 5 deletions(-) - -diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c -index 282d572e49af..7d466f51be1f 100644 ---- a/arch/x86/kernel/setup.c -+++ b/arch/x86/kernel/setup.c -@@ -634,11 +634,16 @@ static void __init trim_snb_memory(void) - printk(KERN_DEBUG "reserving inaccessible SNB gfx pages\n"); - - /* -- * Reserve all memory below the 1 MB mark that has not -- * already been reserved. -+ * SandyBridge integrated graphics devices have a bug that prevents -+ * them from accessing certain memory ranges, namely anything below -+ * 1M and in the pages listed in bad_pages[] above. -+ * -+ * To avoid these pages being ever accessed by SNB gfx devices -+ * reserve all memory below the 1 MB mark and bad_pages that have -+ * not already been reserved at boot time. - */ - memblock_reserve(0, 1<<20); -- -+ - for (i = 0; i < ARRAY_SIZE(bad_pages); i++) { - if (memblock_reserve(bad_pages[i], PAGE_SIZE)) - printk(KERN_WARNING "failed to reserve 0x%08lx\n", -@@ -747,8 +752,6 @@ static void __init early_reserve_memory(void) - - reserve_ibft_region(); - reserve_bios_regions(); -- -- trim_snb_memory(); - } - - /* -@@ -1082,6 +1085,13 @@ void __init setup_arch(char **cmdline_p) - - reserve_real_mode(); - -+ /* -+ * Reserving memory causing GPU hangs on Sandy Bridge integrated -+ * graphics devices should be done after we allocated memory under -+ * 1M for the real mode trampoline. -+ */ -+ trim_snb_memory(); -+ - init_mem_mapping(); - - idt_setup_early_pf(); --- -2.32.0 - diff --git a/0005-x86-setup-always-reserve-the-first-1M-of-RAM.patch b/0005-x86-setup-always-reserve-the-first-1M-of-RAM.patch deleted file mode 100644 index 5769218..0000000 --- a/0005-x86-setup-always-reserve-the-first-1M-of-RAM.patch +++ /dev/null @@ -1,170 +0,0 @@ -From f2c34dfc0b3903b5ebed62a7a8ec7c27c7c203d0 Mon Sep 17 00:00:00 2001 -From: Mike Rapoport -Date: Tue, 1 Jun 2021 10:53:52 +0300 -Subject: [PATCH 5/7] x86/setup: always reserve the first 1M of RAM - -There are BIOSes that are known to corrupt the memory under 1M, or more -precisely under 640K because the memory above 640K is anyway reserved for -the EGA/VGA frame buffer and BIOS. - -To prevent usage of the memory that will be potentially clobbered by the -kernel, the beginning of the memory is always reserved. The exact size of -the reserved area is determined by CONFIG_X86_RESERVE_LOW build time and -reservelow command line option. The reserved range may be from 4K to 640K -with the default of 64K. There are also configurations that reserve the -entire 1M range, like machines with SandyBridge graphic devices or systems -that enable crash kernel. - -In addition to the potentially clobbered memory, EBDA of unknown size may -be as low as 128K and the memory above that EBDA start is also reserved -early. - -It would have been possible to reserve the entire range under 1M unless for -the real mode trampoline that must reside in that area. - -To accommodate placement of the real mode trampoline and keep the memory -safe from being clobbered by BIOS reserve the first 64K of RAM before -memory allocations are possible and then, after the real mode trampoline is -allocated, reserve the entire range from 0 to 1M. - -Update trim_snb_memory() and reserve_real_mode() to avoid redundant -reservations of the same memory range. - -Also make sure the memory under 1M is not getting freed by -efi_free_boot_services(). - -Fixes: a799c2bd29d1 ("x86/setup: Consolidate early memory reservations") -Signed-off-by: Mike Rapoport ---- - arch/x86/kernel/setup.c | 35 ++++++++++++++++++++-------------- - arch/x86/platform/efi/quirks.c | 12 ++++++++++++ - arch/x86/realmode/init.c | 14 ++++++++------ - 3 files changed, 41 insertions(+), 20 deletions(-) - -diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c -index 7d466f51be1f..d7cfb927864f 100644 ---- a/arch/x86/kernel/setup.c -+++ b/arch/x86/kernel/setup.c -@@ -638,11 +638,11 @@ static void __init trim_snb_memory(void) - * them from accessing certain memory ranges, namely anything below - * 1M and in the pages listed in bad_pages[] above. - * -- * To avoid these pages being ever accessed by SNB gfx devices -- * reserve all memory below the 1 MB mark and bad_pages that have -- * not already been reserved at boot time. -+ * To avoid these pages being ever accessed by SNB gfx devices reserve -+ * bad_pages that have not already been reserved at boot time. -+ * All memory below the 1 MB mark is anyway reserved later during -+ * setup_arch(), so there is no need to reserve it here. - */ -- memblock_reserve(0, 1<<20); - - for (i = 0; i < ARRAY_SIZE(bad_pages); i++) { - if (memblock_reserve(bad_pages[i], PAGE_SIZE)) -@@ -734,14 +734,14 @@ static void __init early_reserve_memory(void) - * The first 4Kb of memory is a BIOS owned area, but generally it is - * not listed as such in the E820 table. - * -- * Reserve the first memory page and typically some additional -- * memory (64KiB by default) since some BIOSes are known to corrupt -- * low memory. See the Kconfig help text for X86_RESERVE_LOW. -+ * Reserve the first 64K of memory since some BIOSes are known to -+ * corrupt low memory. After the real mode trampoline is allocated the -+ * rest of the memory below 640k is reserved. - * - * In addition, make sure page 0 is always reserved because on - * systems with L1TF its contents can be leaked to user processes. - */ -- memblock_reserve(0, ALIGN(reserve_low, PAGE_SIZE)); -+ memblock_reserve(0, SZ_64K); - - early_reserve_initrd(); - -@@ -752,6 +752,7 @@ static void __init early_reserve_memory(void) - - reserve_ibft_region(); - reserve_bios_regions(); -+ trim_snb_memory(); - } - - /* -@@ -1083,14 +1084,20 @@ void __init setup_arch(char **cmdline_p) - (max_pfn_mapped< -Date: Tue, 1 Jun 2021 10:53:53 +0300 -Subject: [PATCH 6/7] x86/setup: remove CONFIG_X86_RESERVE_LOW and reservelow - options - -The CONFIG_X86_RESERVE_LOW build time and reservelow command line option -allowed to control the amount of memory under 1M that would be reserved at -boot to avoid using memory that can be potentially clobbered by BIOS. - -Since the entire range under 1M is always reserved there is no need for -these options and they can be removed. - -Signed-off-by: Mike Rapoport ---- - .../admin-guide/kernel-parameters.txt | 5 ---- - arch/x86/Kconfig | 29 ------------------- - arch/x86/kernel/setup.c | 24 --------------- - 3 files changed, 58 deletions(-) - -diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt -index 835f810f2f26..479cc44cc4e2 100644 ---- a/Documentation/admin-guide/kernel-parameters.txt -+++ b/Documentation/admin-guide/kernel-parameters.txt -@@ -4623,11 +4623,6 @@ - Reserves a hole at the top of the kernel virtual - address space. - -- reservelow= [X86] -- Format: nn[K] -- Set the amount of memory to reserve for BIOS at -- the bottom of the address space. -- - reset_devices [KNL] Force drivers to reset the underlying device - during initialization. - -diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig -index 861b1b794697..fc91be3b1bd1 100644 ---- a/arch/x86/Kconfig -+++ b/arch/x86/Kconfig -@@ -1688,35 +1688,6 @@ config X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK - Set whether the default state of memory_corruption_check is - on or off. - --config X86_RESERVE_LOW -- int "Amount of low memory, in kilobytes, to reserve for the BIOS" -- default 64 -- range 4 640 -- help -- Specify the amount of low memory to reserve for the BIOS. -- -- The first page contains BIOS data structures that the kernel -- must not use, so that page must always be reserved. -- -- By default we reserve the first 64K of physical RAM, as a -- number of BIOSes are known to corrupt that memory range -- during events such as suspend/resume or monitor cable -- insertion, so it must not be used by the kernel. -- -- You can set this to 4 if you are absolutely sure that you -- trust the BIOS to get all its memory reservations and usages -- right. If you know your BIOS have problems beyond the -- default 64K area, you can set this to 640 to avoid using the -- entire low memory range. -- -- If you have doubts about the BIOS (e.g. suspend/resume does -- not work or there's kernel crashes after certain hardware -- hotplug events) then you might want to enable -- X86_CHECK_BIOS_CORRUPTION=y to allow the kernel to check -- typical corruption patterns. -- -- Leave this to the default value of 64 if you are unsure. -- - config MATH_EMULATION - bool - depends on MODIFY_LDT_SYSCALL -diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c -index d7cfb927864f..fbda4bbf75c1 100644 ---- a/arch/x86/kernel/setup.c -+++ b/arch/x86/kernel/setup.c -@@ -695,30 +695,6 @@ static void __init e820_add_kernel_range(void) - e820__range_add(start, size, E820_TYPE_RAM); - } - --static unsigned reserve_low = CONFIG_X86_RESERVE_LOW << 10; -- --static int __init parse_reservelow(char *p) --{ -- unsigned long long size; -- -- if (!p) -- return -EINVAL; -- -- size = memparse(p, &p); -- -- if (size < 4096) -- size = 4096; -- -- if (size > 640*1024) -- size = 640*1024; -- -- reserve_low = size; -- -- return 0; --} -- --early_param("reservelow", parse_reservelow); -- - static void __init early_reserve_memory(void) - { - /* --- -2.32.0 - diff --git a/0007-x86-crash-remove-crash_reserve_low_1M.patch b/0007-x86-crash-remove-crash_reserve_low_1M.patch deleted file mode 100644 index afd2765..0000000 --- a/0007-x86-crash-remove-crash_reserve_low_1M.patch +++ /dev/null @@ -1,58 +0,0 @@ -From c0f0017776e7daff716b135824fb4ddb4cf14507 Mon Sep 17 00:00:00 2001 -From: Mike Rapoport -Date: Tue, 1 Jun 2021 10:53:54 +0300 -Subject: [PATCH 7/7] x86/crash: remove crash_reserve_low_1M() - -The entire memory range under 1M is unconditionally reserved at -setup_arch(), so there is no need for crash_reserve_low_1M() anymore. - -Remove this function. - -Signed-off-by: Mike Rapoport ---- - arch/x86/include/asm/crash.h | 6 ------ - arch/x86/kernel/crash.c | 13 ------------- - 2 files changed, 19 deletions(-) - -diff --git a/arch/x86/include/asm/crash.h b/arch/x86/include/asm/crash.h -index f58de66091e5..8b6bd63530dc 100644 ---- a/arch/x86/include/asm/crash.h -+++ b/arch/x86/include/asm/crash.h -@@ -9,10 +9,4 @@ int crash_setup_memmap_entries(struct kimage *image, - struct boot_params *params); - void crash_smp_send_stop(void); - --#ifdef CONFIG_KEXEC_CORE --void __init crash_reserve_low_1M(void); --#else --static inline void __init crash_reserve_low_1M(void) { } --#endif -- - #endif /* _ASM_X86_CRASH_H */ -diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c -index b1deacbeb266..e0b8d9662da5 100644 ---- a/arch/x86/kernel/crash.c -+++ b/arch/x86/kernel/crash.c -@@ -70,19 +70,6 @@ static inline void cpu_crash_vmclear_loaded_vmcss(void) - rcu_read_unlock(); - } - --/* -- * When the crashkernel option is specified, only use the low -- * 1M for the real mode trampoline. -- */ --void __init crash_reserve_low_1M(void) --{ -- if (cmdline_find_option(boot_command_line, "crashkernel", NULL, 0) < 0) -- return; -- -- memblock_reserve(0, 1<<20); -- pr_info("Reserving the low 1M of memory for crashkernel\n"); --} -- - #if defined(CONFIG_SMP) && defined(CONFIG_X86_LOCAL_APIC) - - static void kdump_nmi_callback(int cpu, struct pt_regs *regs) --- -2.32.0 - diff --git a/3001-applesmc-convert-static-structures-to-drvdata.patch b/3001-applesmc-convert-static-structures-to-drvdata.patch index 82371bc..0d2f1cb 100644 --- a/3001-applesmc-convert-static-structures-to-drvdata.patch +++ b/3001-applesmc-convert-static-structures-to-drvdata.patch @@ -1,4 +1,4 @@ -From 86717fd6722b0ddc607d45718c29d67f3671d71d Mon Sep 17 00:00:00 2001 +From 09dd6c563cd73d72e917de07e8d59358c41e051d Mon Sep 17 00:00:00 2001 From: Paul Pawlowski Date: Sun, 17 Nov 2019 23:12:55 +0100 Subject: [PATCH 1/6] applesmc: convert static structures to drvdata @@ -14,7 +14,7 @@ Signed-off-by: Aun-Ali Zaidi 1 file changed, 319 insertions(+), 221 deletions(-) diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c -index 28b137eedf2e..cf00f7b62a78 100644 +index 79b498f816fe..62211b590a61 100644 --- a/drivers/hwmon/applesmc.c +++ b/drivers/hwmon/applesmc.c @@ -6,6 +6,7 @@ @@ -600,7 +600,7 @@ index 28b137eedf2e..cf00f7b62a78 100644 + struct applesmc_device *smc = dev_get_drvdata(dev); + const char *key = smc->reg.index[to_index(devattr)]; - return snprintf(sysfsbuf, PAGE_SIZE, "%s\n", key); + return sysfs_emit(sysfsbuf, "%s\n", key); } @@ -821,12 +885,13 @@ static ssize_t applesmc_show_sensor_label(struct device *dev, static ssize_t applesmc_show_temperature(struct device *dev, @@ -712,10 +712,10 @@ index 28b137eedf2e..cf00f7b62a78 100644 static ssize_t applesmc_calibrate_show(struct device *dev, struct device_attribute *attr, char *sysfsbuf) { -- return snprintf(sysfsbuf, PAGE_SIZE, "(%d,%d)\n", rest_x, rest_y); +- return sysfs_emit(sysfsbuf, "(%d,%d)\n", rest_x, rest_y); + struct applesmc_device *smc = dev_get_drvdata(dev); + -+ return snprintf(sysfsbuf, PAGE_SIZE, "(%d,%d)\n", smc->rest_x, smc->rest_y); ++ return sysfs_emit(sysfsbuf, "(%d,%d)\n", smc->rest_x, smc->rest_y); } static ssize_t applesmc_calibrate_store(struct device *dev, @@ -822,10 +822,10 @@ index 28b137eedf2e..cf00f7b62a78 100644 static ssize_t applesmc_key_at_index_show(struct device *dev, struct device_attribute *attr, char *sysfsbuf) { -- return snprintf(sysfsbuf, PAGE_SIZE, "%d\n", key_at_index); +- return sysfs_emit(sysfsbuf, "%d\n", key_at_index); + struct applesmc_device *smc = dev_get_drvdata(dev); + -+ return snprintf(sysfsbuf, PAGE_SIZE, "%d\n", smc->key_at_index); ++ return sysfs_emit(sysfsbuf, PAGE_SIZE, "%d\n", smc->key_at_index); } static ssize_t applesmc_key_at_index_store(struct device *dev, @@ -1040,7 +1040,7 @@ index 28b137eedf2e..cf00f7b62a78 100644 } static int applesmc_dmi_match(const struct dmi_system_id *id) -@@ -1306,86 +1397,100 @@ static const struct dmi_system_id applesmc_whitelist[] __initconst = { +@@ -1302,86 +1393,100 @@ static const struct dmi_system_id applesmc_whitelist[] __initconst = { { .ident = NULL } }; @@ -1190,7 +1190,7 @@ index 28b137eedf2e..cf00f7b62a78 100644 out_driver: platform_driver_unregister(&applesmc_driver); out_region: -@@ -1397,14 +1502,6 @@ static int __init applesmc_init(void) +@@ -1393,14 +1498,6 @@ static int __init applesmc_init(void) static void __exit applesmc_exit(void) { @@ -1205,7 +1205,7 @@ index 28b137eedf2e..cf00f7b62a78 100644 platform_device_unregister(pdev); platform_driver_unregister(&applesmc_driver); release_region(APPLESMC_DATA_PORT, APPLESMC_NR_PORTS); -@@ -1414,6 +1511,7 @@ module_init(applesmc_init); +@@ -1410,6 +1507,7 @@ module_init(applesmc_init); module_exit(applesmc_exit); MODULE_AUTHOR("Nicolas Boichat"); @@ -1214,5 +1214,5 @@ index 28b137eedf2e..cf00f7b62a78 100644 MODULE_LICENSE("GPL v2"); MODULE_DEVICE_TABLE(dmi, applesmc_whitelist); -- -2.31.1 +2.30.0 diff --git a/3002-applesmc-make-io-port-base-addr-dynamic.patch b/3002-applesmc-make-io-port-base-addr-dynamic.patch index 0d53d24..cc332c7 100644 --- a/3002-applesmc-make-io-port-base-addr-dynamic.patch +++ b/3002-applesmc-make-io-port-base-addr-dynamic.patch @@ -1,4 +1,4 @@ -From d15ddc31af39d8c63b582a9c2027fff76ab7353e Mon Sep 17 00:00:00 2001 +From 713e78b8dbb8adb92d4ee09ea11e726b05577689 Mon Sep 17 00:00:00 2001 From: Paul Pawlowski Date: Sun, 17 Nov 2019 23:11:56 +0100 Subject: [PATCH 2/6] applesmc: make io port base addr dynamic @@ -16,7 +16,7 @@ Signed-off-by: Aun-Ali Zaidi 1 file changed, 49 insertions(+), 42 deletions(-) diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c -index cf00f7b62a78..51f4a05235b9 100644 +index 62211b590a61..39ed0bb21365 100644 --- a/drivers/hwmon/applesmc.c +++ b/drivers/hwmon/applesmc.c @@ -35,10 +35,11 @@ @@ -280,7 +280,7 @@ index cf00f7b62a78..51f4a05235b9 100644 if (ret) return ret; -@@ -1472,7 +1479,7 @@ static int __init applesmc_init(void) +@@ -1468,7 +1475,7 @@ static int __init applesmc_init(void) goto out; } @@ -289,7 +289,7 @@ index cf00f7b62a78..51f4a05235b9 100644 "applesmc")) { ret = -ENXIO; goto out; -@@ -1494,7 +1501,7 @@ static int __init applesmc_init(void) +@@ -1490,7 +1497,7 @@ static int __init applesmc_init(void) out_driver: platform_driver_unregister(&applesmc_driver); out_region: @@ -298,7 +298,7 @@ index cf00f7b62a78..51f4a05235b9 100644 out: pr_warn("driver init failed (ret=%d)!\n", ret); return ret; -@@ -1504,7 +1511,7 @@ static void __exit applesmc_exit(void) +@@ -1500,7 +1507,7 @@ static void __exit applesmc_exit(void) { platform_device_unregister(pdev); platform_driver_unregister(&applesmc_driver); @@ -308,5 +308,5 @@ index cf00f7b62a78..51f4a05235b9 100644 module_init(applesmc_init); -- -2.31.1 +2.30.0 diff --git a/3003-applesmc-switch-to-acpi_device-from-platform.patch b/3003-applesmc-switch-to-acpi_device-from-platform.patch index 8ce43d3..f8f7f82 100644 --- a/3003-applesmc-switch-to-acpi_device-from-platform.patch +++ b/3003-applesmc-switch-to-acpi_device-from-platform.patch @@ -1,4 +1,4 @@ -From 6192a81898ac42d249fa66dd0f7eb63ffe3d9ed3 Mon Sep 17 00:00:00 2001 +From ee3d4bf4a01bc94553bde2ae3e806a63a13faa12 Mon Sep 17 00:00:00 2001 From: Paul Pawlowski Date: Sun, 17 Nov 2019 23:12:08 +0100 Subject: [PATCH 3/6] applesmc: switch to acpi_device (from platform) @@ -21,7 +21,7 @@ Signed-off-by: Aun-Ali Zaidi 1 file changed, 85 insertions(+), 40 deletions(-) diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c -index 51f4a05235b9..3abc38b24128 100644 +index 39ed0bb21365..bdaaf696f7b6 100644 --- a/drivers/hwmon/applesmc.c +++ b/drivers/hwmon/applesmc.c @@ -19,7 +19,7 @@ @@ -210,7 +210,7 @@ index 51f4a05235b9..3abc38b24128 100644 if (!smc->reg.has_accelerometer) return 0; -@@ -1467,8 +1533,6 @@ static void applesmc_destroy_modules(struct applesmc_device *smc) +@@ -1463,8 +1529,6 @@ static void applesmc_destroy_modules(struct applesmc_device *smc) applesmc_destroy_nodes(smc, info_group); } @@ -219,7 +219,7 @@ index 51f4a05235b9..3abc38b24128 100644 static int __init applesmc_init(void) { int ret; -@@ -1479,29 +1543,12 @@ static int __init applesmc_init(void) +@@ -1475,29 +1539,12 @@ static int __init applesmc_init(void) goto out; } @@ -251,7 +251,7 @@ index 51f4a05235b9..3abc38b24128 100644 out: pr_warn("driver init failed (ret=%d)!\n", ret); return ret; -@@ -1509,9 +1556,7 @@ static int __init applesmc_init(void) +@@ -1505,9 +1552,7 @@ static int __init applesmc_init(void) static void __exit applesmc_exit(void) { @@ -263,5 +263,5 @@ index 51f4a05235b9..3abc38b24128 100644 module_init(applesmc_init); -- -2.31.1 +2.30.0 diff --git a/3004-applesmc-key-interface-wrappers.patch b/3004-applesmc-key-interface-wrappers.patch index de941a2..057a77d 100644 --- a/3004-applesmc-key-interface-wrappers.patch +++ b/3004-applesmc-key-interface-wrappers.patch @@ -1,4 +1,4 @@ -From 676e639293719f39118d1c28f5bfff45a74ad7b5 Mon Sep 17 00:00:00 2001 +From 43df89a1377782788760808d8ea4bcf0730effbb Mon Sep 17 00:00:00 2001 From: Paul Pawlowski Date: Sun, 17 Nov 2019 23:12:14 +0100 Subject: [PATCH 4/6] applesmc: key interface wrappers @@ -20,7 +20,7 @@ Signed-off-by: Aun-Ali Zaidi 1 file changed, 79 insertions(+), 40 deletions(-) diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c -index 3abc38b24128..e99b7d7b3166 100644 +index bdaaf696f7b6..3017d8ca2c79 100644 --- a/drivers/hwmon/applesmc.c +++ b/drivers/hwmon/applesmc.c @@ -172,7 +172,7 @@ static const int debug; @@ -294,5 +294,5 @@ index 3abc38b24128..e99b7d7b3166 100644 out: -- -2.31.1 +2.30.0 diff --git a/3005-applesmc-basic-mmio-interface-implementation.patch b/3005-applesmc-basic-mmio-interface-implementation.patch index 799e526..c370d05 100644 --- a/3005-applesmc-basic-mmio-interface-implementation.patch +++ b/3005-applesmc-basic-mmio-interface-implementation.patch @@ -1,4 +1,4 @@ -From 9b8dd8b3f1c53c484449234df6df52514542e94b Mon Sep 17 00:00:00 2001 +From 799e7a54c62a36007f7874c58d7dac87c9651759 Mon Sep 17 00:00:00 2001 From: Aun-Ali Zaidi Date: Sun, 17 Nov 2019 23:12:16 +0100 Subject: [PATCH 5/6] applesmc: basic mmio interface implementation @@ -21,7 +21,7 @@ Signed-off-by: Aun-Ali Zaidi 1 file changed, 231 insertions(+), 6 deletions(-) diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c -index e99b7d7b3166..ae0aa5dbc842 100644 +index 3017d8ca2c79..2d23bb9ad9dd 100644 --- a/drivers/hwmon/applesmc.c +++ b/drivers/hwmon/applesmc.c @@ -42,6 +42,18 @@ @@ -339,5 +339,5 @@ index e99b7d7b3166..ae0aa5dbc842 100644 } -- -2.31.1 +2.30.0 diff --git a/3006-applesmc-fan-support-on-T2-Macs.patch b/3006-applesmc-fan-support-on-T2-Macs.patch index f172afa..31b8205 100644 --- a/3006-applesmc-fan-support-on-T2-Macs.patch +++ b/3006-applesmc-fan-support-on-T2-Macs.patch @@ -1,4 +1,4 @@ -From 4b80a87b8273833a093cdac96dabdb865e0d6e86 Mon Sep 17 00:00:00 2001 +From 4e63e9b77422aae8e7411ddc7a8458c2585c86df Mon Sep 17 00:00:00 2001 From: Paul Pawlowski Date: Sun, 17 Nov 2019 23:12:18 +0100 Subject: [PATCH 6/6] applesmc: fan support on T2 Macs @@ -19,7 +19,7 @@ Signed-off-by: Aun-Ali Zaidi 1 file changed, 102 insertions(+), 17 deletions(-) diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c -index ae0aa5dbc842..867cf857448c 100644 +index 2d23bb9ad9dd..0938227be612 100644 --- a/drivers/hwmon/applesmc.c +++ b/drivers/hwmon/applesmc.c @@ -87,6 +87,7 @@ @@ -110,7 +110,7 @@ index ae0aa5dbc842..867cf857448c 100644 return ret; - speed = ((buffer[0] << 8 | buffer[1]) >> 2); - return snprintf(sysfsbuf, PAGE_SIZE, "%u\n", speed); + return sysfs_emit(sysfsbuf, "%u\n", speed); } @@ -1263,6 +1312,7 @@ static ssize_t applesmc_store_fan_speed(struct device *dev, @@ -169,7 +169,7 @@ index ae0aa5dbc842..867cf857448c 100644 return ret; - manual = ((buffer[0] << 8 | buffer[1]) >> to_index(attr)) & 0x01; - return snprintf(sysfsbuf, PAGE_SIZE, "%d\n", manual); + return sysfs_emit(sysfsbuf, "%d\n", manual); } @@ -1307,27 +1380,39 @@ static ssize_t applesmc_store_fan_manual(struct device *dev, @@ -223,5 +223,5 @@ index ae0aa5dbc842..867cf857448c 100644 out: if (ret) -- -2.31.1 +2.30.0 diff --git a/5002-brcmfmac-Add-ability-to-manually-specify-FW-rambase-.patch b/5002-brcmfmac-Add-ability-to-manually-specify-FW-rambase-.patch index 752c249..ad83cb1 100644 --- a/5002-brcmfmac-Add-ability-to-manually-specify-FW-rambase-.patch +++ b/5002-brcmfmac-Add-ability-to-manually-specify-FW-rambase-.patch @@ -43,7 +43,7 @@ index a3a257089696..039dcf7853a6 100644 + ci->pub.rambase = (settings && + settings->rambase_addr > 0) ? settings->rambase_addr + : brcmf_chip_tcm_rambase(ci); - if (!ci->pub.rambase) { + if (ci->pub.rambase == INVALID_RAMBASE) { brcmf_err("RAM base not provided with ARM CR4 core\n"); return -EINVAL; @@ -755,7 +757,9 @@ int brcmf_chip_get_raminfo(struct brcmf_chip *pub) @@ -54,7 +54,7 @@ index a3a257089696..039dcf7853a6 100644 + ci->pub.rambase = (settings && + settings->rambase_addr > 0) ? settings->rambase_addr + : brcmf_chip_tcm_rambase(ci); - if (!ci->pub.rambase) { + if (ci->pub.rambase == INVALID_RAMBASE) { brcmf_err("RAM base not provided with ARM CA7 core\n"); return -EINVAL; @@ -941,7 +945,7 @@ int brcmf_chip_dmp_erom_scan(struct brcmf_chip_priv *ci) @@ -78,7 +78,7 @@ index a3a257089696..039dcf7853a6 100644 @@ -1088,7 +1092,8 @@ static int brcmf_chip_setup(struct brcmf_chip_priv *chip) } - struct brcmf_chip *brcmf_chip_attach(void *ctx, + struct brcmf_chip *brcmf_chip_attach(void *ctx, u16 devid, - const struct brcmf_buscore_ops *ops) + const struct brcmf_buscore_ops *ops, + struct brcmf_mp_device *settings) @@ -113,7 +113,7 @@ index 8fa38658e727..7da0ef3129a0 100644 -int brcmf_chip_get_raminfo(struct brcmf_chip *pub); +int brcmf_chip_get_raminfo(struct brcmf_chip *pub, struct brcmf_mp_device *settings); - struct brcmf_chip *brcmf_chip_attach(void *ctx, + struct brcmf_chip *brcmf_chip_attach(void *ctx, u16 devid, - const struct brcmf_buscore_ops *ops); + const struct brcmf_buscore_ops *ops, + struct brcmf_mp_device *settings); @@ -168,12 +168,14 @@ index 39381cbde89e..a9575ae8add1 100644 if (ret) { brcmf_err(bus, "Failed to get RAM info\n"); goto fail; -@@ -1884,7 +1884,7 @@ brcmf_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id) +@@ -1884,8 +1884,8 @@ brcmf_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id) devinfo->pdev = pdev; pcie_bus_dev = NULL; -- devinfo->ci = brcmf_chip_attach(devinfo, &brcmf_pcie_buscore_ops); -+ devinfo->ci = brcmf_chip_attach(devinfo, &brcmf_pcie_buscore_ops, devinfo->settings); +- devinfo->ci = brcmf_chip_attach(devinfo, pdev->device, +- &brcmf_pcie_buscore_ops); ++ devinfo->ci = brcmf_chip_attach(devinfo, pdev->device, ++ &brcmf_pcie_buscore_ops, devinfo->settings); if (IS_ERR(devinfo->ci)) { ret = PTR_ERR(devinfo->ci); devinfo->ci = NULL; @@ -185,8 +187,10 @@ index ac3ee93a2378..d4bf1c7e3c81 100644 goto fail; } -- bus->ci = brcmf_chip_attach(sdiodev, &brcmf_sdio_buscore_ops); -+ bus->ci = brcmf_chip_attach(sdiodev, &brcmf_sdio_buscore_ops, sdiodev->settings); +- bus->ci = brcmf_chip_attach(sdiodev, sdiodev->func1->device, +- &brcmf_sdio_buscore_ops); ++ bus->ci = brcmf_chip_attach(sdiodev, sdiodev->func1->device, ++ &brcmf_sdio_buscore_ops, sdiodev->settings); if (IS_ERR(bus->ci)) { brcmf_err("brcmf_chip_attach failed!\n"); bus->ci = NULL; diff --git a/8001-brcmfmac-Add-initial-support-for-the-BRCM4355.patch b/8001-brcmfmac-Add-initial-support-for-the-BRCM4355.patch index 3b6bd7b..84ab31e 100644 --- a/8001-brcmfmac-Add-initial-support-for-the-BRCM4355.patch +++ b/8001-brcmfmac-Add-initial-support-for-the-BRCM4355.patch @@ -35,8 +35,8 @@ index 39381cbde89e..60e3b0ce4fd7 100644 BRCMF_FW_DEF(4350, "brcmfmac4350-pcie"); BRCMF_FW_DEF(4350C, "brcmfmac4350c2-pcie"); +BRCMF_FW_DEF(4355, "brcmfmac4355-pcie"); - BRCMF_FW_DEF(4356, "brcmfmac4356-pcie"); - BRCMF_FW_DEF(43570, "brcmfmac43570-pcie"); + BRCMF_FW_CLM_DEF(4356, "brcmfmac4356-pcie"); + BRCMF_FW_CLM_DEF(43570, "brcmfmac43570-pcie"); BRCMF_FW_DEF(4358, "brcmfmac4358-pcie"); @@ -65,6 +66,7 @@ static const struct brcmf_firmware_mapping brcmf_pcie_fwnames[] = { BRCMF_FW_ENTRY(BRCM_CC_4350_CHIP_ID, 0x000000FF, 4350C), diff --git a/8002-brcmfmac-Add-initial-support-for-the-BRCM4377.patch b/8002-brcmfmac-Add-initial-support-for-the-BRCM4377.patch index 825f7ee..22c0b53 100644 --- a/8002-brcmfmac-Add-initial-support-for-the-BRCM4377.patch +++ b/8002-brcmfmac-Add-initial-support-for-the-BRCM4377.patch @@ -18,15 +18,14 @@ diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c b/drivers/n index 6c39415a69d6..d2392a8fdbbb 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c -@@ -727,6 +727,8 @@ static u32 brcmf_chip_tcm_rambase(struct brcmf_chip_priv *ci) - case BRCM_CC_4364_CHIP_ID: +@@ -727,6 +727,7 @@ static u32 brcmf_chip_tcm_rambase(struct brcmf_chip_priv *ci) case CY_CC_4373_CHIP_ID: return 0x160000; + case CY_CC_43752_CHIP_ID: + case BRCM_CC_4377_CHIP_ID: -+ return 0x170000; + return 0x170000; default: brcmf_err("unknown chip: %s\n", ci->pub.name); - break; diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c index 60e3b0ce4fd7..a262e2eb36af 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c diff --git a/PKGBUILD b/PKGBUILD index c65fb4d..18ca6a5 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -2,9 +2,9 @@ # Contributor: Jan Alexander Steffens (heftig) pkgbase=linux-mbp -pkgver=5.12.19 +pkgver=5.15.12 _srcname=linux-${pkgver} -pkgrel=2 +pkgrel=1 pkgdesc='Linux for MBP' _srctag=v${pkgver%.*}-${pkgver##*.} url="https://git.archlinux.org/linux.git/log/?h=v$_srctag" @@ -24,12 +24,6 @@ source=( # Arch Linux patches 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch - 0002-x86-setup-Consolidate-early-memory-reservations.patch - 0003-x86-setup-Merge-several-reservations-of-start-of-mem.patch - 0004-x86-setup-Move-trim_snb_memory-later-in-setup_arch-t.patch - 0005-x86-setup-always-reserve-the-first-1M-of-RAM.patch - 0006-x86-setup-remove-CONFIG_X86_RESERVE_LOW-and-reservel.patch - 0007-x86-crash-remove-crash_reserve_low_1M.patch # Hack for AMD DC eDP link rate bug 2001-drm-amd-display-Force-link_rate-as-LINK_RATE_RBR2-fo.patch @@ -76,23 +70,17 @@ validpgpkeys=( '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman ) -sha256sums=('e9381cd3525a02f5b895f74147e2440be443ecd45484c6c64075046bc6f94c73' +sha256sums=('7de919772b62647591527e904e3b3583783381a29d812404f58a222484e751a0' 'SKIP' - '90473ec7afd9ce7496fe7446aa8383f99d16824ff30e60febd565fd94281cda9' + '6ab7a66895804f832f1b9594b682be0e2e6982455a8fc3f7e87111e1c7dff866' 'ea16157696cb1807f8960de667a8c56da223bfae02c94d7b2aed6853c541f2ed' - 'f0ae4223a64febc053d779a71d171a5e44bbd2bfa286f713fe7fe97ba0dcb802' - '250c98c9c3776ad8a49333ebd8d5a4e56c7cc3f6886b0058ea7c0744a4748780' - 'c9ccb0167883589c8f0aa6220d7c2005312f83018b9ab26a14527a592e426f1d' - '5d1e578231a6742fe8ac4785c8d7129315daa4b5b5703cb968705f90344daabf' - '4360ee51d90abb42021dd840337067ec743bbd367c23dc2a1136ff61c4fe70e2' - '46d2ae7147968daeb25d128ae9abb30a58f8371218a0b7643fb9916e55da8dfe' '786dfc22e4c6ece883e7dedd0ba3f6c14018584df95450b2cb78f3da8b01f7cb' - '0d3e591d7cb2532ee68c4621594a10b1d0240528a312159ee0731484bb180400' - '63187212c33d844b6b9a26f76e789d9f4144d0d8fe9444dfd499f31430b45648' - 'd66a0cdf4377d3e5c7f42a7ae45785d8da1a44fcc9001dcb721d987f490018c9' - '688dee43c42d2e572c31d26513d43f02f9838c3fe149446db79dfca451801ab9' - '560f1b89bd9ea93107903ed34100129ee0ac0ea5dd8b3d74db9a6835b1bfdb4c' - 'e46140f502d8c00d88e206934a491a8a0dd1ff7fac187bbf93bb8c3a106e5bc7' + '7366a08383900a09f8e742b1e4f0a02e0839a385e68e70a89d1815c197df3300' + '8d8401a99a9dfbc41aa2dc5b6a409a19860b1b918465e19de4a4ff18de075ea3' + '08d165106fe35b68a7b48f216566951a5db0baac19098c015bcc81c5fcba678d' + '459906cab172df9f6712a4168e7a5d529f85b2bb58a068f2d44746df14a6d27a' + '2827dab6eeb2d2a08034938024f902846b5813e967a0ea253dc1ea88315da383' + '398dec7d54c6122ae2263cd5a6d52353800a1a60fd85e52427c372ea9974a625' '11565cff9c6a7db8846dc7d5930419045e9527863b8df5979a7465006211bd16' '83f4be6849ba4d5f9fad647ad2eb78bf6409ee98a40ac62e8a5b80496233d70a' '44bd3643b2b22fedc59d79511199f30ce6759fa0acdd9a66262a53c5e046da6b' @@ -103,11 +91,11 @@ sha256sums=('e9381cd3525a02f5b895f74147e2440be443ecd45484c6c64075046bc6f94c73' 'cac035fe07663a319185c644c5b39b34bef89ada348881fa4a02d15290260445' '9dfa9f02d17c5cd9620fa2c1d43ca967b81b6a56d33c2bafae14e0c64e498baa' '4d22727c1456e268de1c39ac73f2dc0c1630ac25aa66364d99f94e29eba5c6b9' - '7f41e52285bbdeeaf565e7a1e69860439a4cc302092b473301040f29fc2f5b64' + 'cc8a177699862101cbed9172def8c3985d65f7b5c7755f600559aa45dd80e348' '9640178d6251686c980c30fc528b3d70beac6ce8246bf433506a3f843808326c' '90a6012cdd8a64ede8e0bbaf7331960bd68f628e0973b65459188eb1ccb5b829' - '3a7baa28d5f45bdbff23e838133f2e3c6896412ffb5a919b4992a7b2d17469d9' - 'edb804461e3820ef3397e1e236f7caabf906b6a13d03f406c8462ec476ecbbe5' + 'fb73c8ba175ec2bdf765207f434d1e8977efa0be3097a6d1e2843536a531c351' + '294300fe5e290e18ee4062fe6847f7838c0f1a977af91157a1630828f55f7aa2' 'fa0ad2e2f171eafd727d780588f7ef5d47ddf2d75fab02c67356bbc7b26e25e0') export KBUILD_BUILD_HOST=archlinux diff --git a/config b/config index 18a3884..9681fe0 100644 --- a/config +++ b/config @@ -1,11 +1,13 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/x86 5.12.13 Kernel Configuration +# Linux/x86 5.15.12-arch1 Kernel Configuration # CONFIG_CC_VERSION_TEXT="gcc (GCC) 11.1.0" CONFIG_CC_IS_GCC=y CONFIG_GCC_VERSION=110100 CONFIG_CLANG_VERSION=0 +CONFIG_AS_IS_GNU=y +CONFIG_AS_VERSION=23601 CONFIG_LD_IS_BFD=y CONFIG_LD_VERSION=23601 CONFIG_LLD_VERSION=0 @@ -14,6 +16,7 @@ CONFIG_CC_CAN_LINK_STATIC=y CONFIG_CC_HAS_ASM_GOTO=y CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y CONFIG_CC_HAS_ASM_INLINE=y +CONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y CONFIG_IRQ_WORK=y CONFIG_BUILDTIME_TABLE_SORT=y CONFIG_THREAD_INFO_IN_TASK=y @@ -23,6 +26,7 @@ CONFIG_THREAD_INFO_IN_TASK=y # CONFIG_INIT_ENV_ARG_LIMIT=32 # CONFIG_COMPILE_TEST is not set +# CONFIG_WERROR is not set CONFIG_LOCALVERSION="" CONFIG_LOCALVERSION_AUTO=y CONFIG_BUILD_SALT="" @@ -101,12 +105,31 @@ CONFIG_NO_HZ=y CONFIG_HIGH_RES_TIMERS=y # end of Timers subsystem +CONFIG_BPF=y +CONFIG_HAVE_EBPF_JIT=y +CONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y + +# +# BPF subsystem +# +CONFIG_BPF_SYSCALL=y +CONFIG_BPF_JIT=y +CONFIG_BPF_JIT_ALWAYS_ON=y +CONFIG_BPF_JIT_DEFAULT_ON=y +# CONFIG_BPF_UNPRIV_DEFAULT_OFF is not set +CONFIG_USERMODE_DRIVER=y +CONFIG_BPF_PRELOAD=y +CONFIG_BPF_PRELOAD_UMD=m +CONFIG_BPF_LSM=y +# end of BPF subsystem + # CONFIG_PREEMPT_NONE is not set # CONFIG_PREEMPT_VOLUNTARY is not set CONFIG_PREEMPT=y CONFIG_PREEMPT_COUNT=y CONFIG_PREEMPTION=y CONFIG_PREEMPT_DYNAMIC=y +CONFIG_SCHED_CORE=y # # CPU/Task time and stats accounting @@ -157,6 +180,7 @@ CONFIG_IKHEADERS=m CONFIG_LOG_BUF_SHIFT=17 CONFIG_LOG_CPU_MAX_BUF_SHIFT=12 CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=13 +CONFIG_PRINTK_INDEX=y CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y # @@ -194,6 +218,7 @@ CONFIG_CGROUP_DEVICE=y CONFIG_CGROUP_CPUACCT=y CONFIG_CGROUP_PERF=y CONFIG_CGROUP_BPF=y +CONFIG_CGROUP_MISC=y # CONFIG_CGROUP_DEBUG is not set CONFIG_SOCK_CGROUP_DATA=y CONFIG_NAMESPACES=y @@ -225,7 +250,6 @@ CONFIG_SYSCTL=y CONFIG_HAVE_UID16=y CONFIG_SYSCTL_EXCEPTION_TRACE=y CONFIG_HAVE_PCSPKR_PLATFORM=y -CONFIG_BPF=y # CONFIG_EXPERT is not set CONFIG_UID16=y CONFIG_MULTIUSER=y @@ -234,7 +258,6 @@ CONFIG_SYSFS_SYSCALL=y CONFIG_FHANDLE=y CONFIG_POSIX_TIMERS=y CONFIG_PRINTK=y -CONFIG_PRINTK_NMI=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_PCSPKR_PLATFORM=y @@ -250,19 +273,12 @@ CONFIG_AIO=y CONFIG_IO_URING=y CONFIG_ADVISE_SYSCALLS=y CONFIG_HAVE_ARCH_USERFAULTFD_WP=y +CONFIG_HAVE_ARCH_USERFAULTFD_MINOR=y CONFIG_MEMBARRIER=y CONFIG_KALLSYMS=y CONFIG_KALLSYMS_ALL=y CONFIG_KALLSYMS_ABSOLUTE_PERCPU=y CONFIG_KALLSYMS_BASE_RELATIVE=y -CONFIG_BPF_LSM=y -CONFIG_BPF_SYSCALL=y -CONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y -CONFIG_BPF_JIT_ALWAYS_ON=y -CONFIG_BPF_JIT_DEFAULT_ON=y -CONFIG_USERMODE_DRIVER=y -CONFIG_BPF_PRELOAD=y -CONFIG_BPF_PRELOAD_UMD=m CONFIG_USERFAULTFD=y CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y CONFIG_KCMP=y @@ -310,15 +326,14 @@ CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y CONFIG_ARCH_MAY_HAVE_PC_FDC=y CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_ARCH_HAS_CPU_RELAX=y -CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y CONFIG_ARCH_HAS_FILTER_PGPROT=y CONFIG_HAVE_SETUP_PER_CPU_AREA=y CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y CONFIG_ARCH_HIBERNATION_POSSIBLE=y +CONFIG_ARCH_NR_GPIO=1024 CONFIG_ARCH_SUSPEND_POSSIBLE=y CONFIG_ARCH_WANT_GENERAL_HUGETLB=y -CONFIG_ZONE_DMA32=y CONFIG_AUDIT_ARCH=y CONFIG_HAVE_INTEL_TXT=y CONFIG_X86_64_SMP=y @@ -331,7 +346,6 @@ CONFIG_CC_HAS_SANE_STACKPROTECTOR=y # # Processor type and features # -CONFIG_ZONE_DMA=y CONFIG_SMP=y CONFIG_X86_FEATURE_NAMES=y CONFIG_X86_X2APIC=y @@ -356,13 +370,14 @@ CONFIG_XEN=y CONFIG_XEN_PV=y CONFIG_XEN_512GB=y CONFIG_XEN_PV_SMP=y -CONFIG_XEN_DOM0=y +CONFIG_XEN_PV_DOM0=y CONFIG_XEN_PVHVM=y CONFIG_XEN_PVHVM_SMP=y CONFIG_XEN_PVHVM_GUEST=y CONFIG_XEN_SAVE_RESTORE=y # CONFIG_XEN_DEBUG_FS is not set CONFIG_XEN_PVH=y +CONFIG_XEN_DOM0=y CONFIG_KVM_GUEST=y CONFIG_ARCH_CPUIDLE_HALTPOLL=y CONFIG_PVH=y @@ -418,6 +433,7 @@ CONFIG_PERF_EVENTS_INTEL_UNCORE=m CONFIG_PERF_EVENTS_INTEL_RAPL=m CONFIG_PERF_EVENTS_INTEL_CSTATE=m CONFIG_PERF_EVENTS_AMD_POWER=m +CONFIG_PERF_EVENTS_AMD_UNCORE=m # end of Performance monitoring CONFIG_X86_16BIT=y @@ -502,12 +518,8 @@ CONFIG_HAVE_LIVEPATCH=y # end of Processor type and features CONFIG_ARCH_HAS_ADD_PAGES=y -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y -CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y +CONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y CONFIG_USE_PERCPU_NUMA_NODE_ID=y -CONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK=y -CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION=y -CONFIG_ARCH_ENABLE_THP_MIGRATION=y # # Power management and ACPI options @@ -602,7 +614,9 @@ CONFIG_BXT_WC_PMIC_OPREGION=y CONFIG_CHT_WC_PMIC_OPREGION=y CONFIG_CHT_DC_TI_PMIC_OPREGION=y CONFIG_TPS68470_PMIC_OPREGION=y +CONFIG_ACPI_VIOT=y CONFIG_X86_PM_TIMER=y +CONFIG_ACPI_PRMT=y # # CPU Frequency scaling @@ -663,7 +677,6 @@ CONFIG_PCI_XEN=y CONFIG_MMCONF_FAM10H=y CONFIG_ISA_DMA_API=y CONFIG_AMD_NB=y -# CONFIG_X86_SYSFB is not set # end of Bus options (PCI etc.) # @@ -677,62 +690,6 @@ CONFIG_COMPAT_FOR_U64_ALIGNMENT=y CONFIG_SYSVIPC_COMPAT=y # end of Binary Emulations -# -# Firmware Drivers -# -CONFIG_EDD=m -# CONFIG_EDD_OFF is not set -CONFIG_FIRMWARE_MEMMAP=y -CONFIG_DMIID=y -CONFIG_DMI_SYSFS=y -CONFIG_DMI_SCAN_MACHINE_NON_EFI_FALLBACK=y -CONFIG_ISCSI_IBFT_FIND=y -CONFIG_ISCSI_IBFT=m -CONFIG_FW_CFG_SYSFS=m -# CONFIG_FW_CFG_SYSFS_CMDLINE is not set -CONFIG_GOOGLE_FIRMWARE=y -# CONFIG_GOOGLE_SMI is not set -CONFIG_GOOGLE_COREBOOT_TABLE=m -CONFIG_GOOGLE_MEMCONSOLE=m -# CONFIG_GOOGLE_MEMCONSOLE_X86_LEGACY is not set -CONFIG_GOOGLE_FRAMEBUFFER_COREBOOT=m -CONFIG_GOOGLE_MEMCONSOLE_COREBOOT=m -CONFIG_GOOGLE_VPD=m - -# -# EFI (Extensible Firmware Interface) Support -# -# CONFIG_EFI_VARS is not set -CONFIG_EFI_ESRT=y -CONFIG_EFI_VARS_PSTORE=y -CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE=y -CONFIG_EFI_RUNTIME_MAP=y -# CONFIG_EFI_FAKE_MEMMAP is not set -CONFIG_EFI_SOFT_RESERVE=y -CONFIG_EFI_RUNTIME_WRAPPERS=y -CONFIG_EFI_GENERIC_STUB_INITRD_CMDLINE_LOADER=y -CONFIG_EFI_BOOTLOADER_CONTROL=m -CONFIG_EFI_CAPSULE_LOADER=m -# CONFIG_EFI_TEST is not set -CONFIG_APPLE_PROPERTIES=y -# CONFIG_RESET_ATTACK_MITIGATION is not set -CONFIG_EFI_RCI2_TABLE=y -# CONFIG_EFI_DISABLE_PCI_DMA is not set -# end of EFI (Extensible Firmware Interface) Support - -CONFIG_EFI_EMBEDDED_FIRMWARE=y -CONFIG_UEFI_CPER=y -CONFIG_UEFI_CPER_X86=y -CONFIG_EFI_DEV_PATH_PARSER=y -CONFIG_EFI_EARLYCON=y -CONFIG_EFI_CUSTOM_SSDT_OVERLAYS=y - -# -# Tegra firmware driver -# -# end of Tegra firmware driver -# end of Firmware Drivers - CONFIG_HAVE_KVM=y CONFIG_HAVE_KVM_IRQCHIP=y CONFIG_HAVE_KVM_IRQFD=y @@ -748,9 +705,11 @@ CONFIG_KVM_COMPAT=y CONFIG_HAVE_KVM_IRQ_BYPASS=y CONFIG_HAVE_KVM_NO_POLL=y CONFIG_KVM_XFER_TO_GUEST_WORK=y +CONFIG_HAVE_KVM_PM_NOTIFIER=y CONFIG_VIRTUALIZATION=y CONFIG_KVM=m CONFIG_KVM_INTEL=m +CONFIG_X86_SGX_KVM=y CONFIG_KVM_AMD=m CONFIG_KVM_AMD_SEV=y CONFIG_KVM_XEN=y @@ -785,6 +744,7 @@ CONFIG_HAVE_OPTPROBES=y CONFIG_HAVE_KPROBES_ON_FTRACE=y CONFIG_HAVE_FUNCTION_ERROR_INJECTION=y CONFIG_HAVE_NMI=y +CONFIG_TRACE_IRQFLAGS_SUPPORT=y CONFIG_HAVE_ARCH_TRACEHOOK=y CONFIG_HAVE_DMA_CONTIGUOUS=y CONFIG_GENERIC_SMP_IDLE_THREAD=y @@ -793,6 +753,7 @@ CONFIG_ARCH_HAS_SET_MEMORY=y CONFIG_ARCH_HAS_SET_DIRECT_MAP=y CONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y CONFIG_ARCH_WANTS_DYNAMIC_TASK_STRUCT=y +CONFIG_ARCH_WANTS_NO_INSTR=y CONFIG_HAVE_ASM_MODVERSIONS=y CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y CONFIG_HAVE_RSEQ=y @@ -857,6 +818,8 @@ CONFIG_COMPAT_OLD_SIGACTION=y CONFIG_COMPAT_32BIT_TIME=y CONFIG_HAVE_ARCH_VMAP_STACK=y CONFIG_VMAP_STACK=y +CONFIG_HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET=y +CONFIG_RANDOMIZE_KSTACK_OFFSET_DEFAULT=y CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y CONFIG_STRICT_KERNEL_RWX=y CONFIG_ARCH_HAS_STRICT_MODULE_RWX=y @@ -865,12 +828,14 @@ CONFIG_HAVE_ARCH_PREL32_RELOCATIONS=y CONFIG_ARCH_USE_MEMREMAP_PROT=y CONFIG_LOCK_EVENT_COUNTS=y CONFIG_ARCH_HAS_MEM_ENCRYPT=y +CONFIG_ARCH_HAS_CC_PLATFORM=y CONFIG_HAVE_STATIC_CALL=y CONFIG_HAVE_STATIC_CALL_INLINE=y CONFIG_HAVE_PREEMPT_DYNAMIC=y CONFIG_ARCH_WANT_LD_ORPHAN_WARN=y CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y CONFIG_ARCH_HAS_ELFCORE_COMPAT=y +CONFIG_ARCH_HAS_PARANOID_L1D_FLUSH=y # # GCOV-based kernel profiling @@ -903,27 +868,29 @@ CONFIG_MODULE_SIG_ALL=y # CONFIG_MODULE_SIG_SHA384 is not set CONFIG_MODULE_SIG_SHA512=y CONFIG_MODULE_SIG_HASH="sha512" -CONFIG_MODULE_COMPRESS=y +# CONFIG_MODULE_COMPRESS_NONE is not set # CONFIG_MODULE_COMPRESS_GZIP is not set -CONFIG_MODULE_COMPRESS_XZ=y +# CONFIG_MODULE_COMPRESS_XZ is not set +CONFIG_MODULE_COMPRESS_ZSTD=y CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS=y +CONFIG_MODPROBE_PATH="/sbin/modprobe" CONFIG_MODULES_TREE_LOOKUP=y CONFIG_BLOCK=y CONFIG_BLK_RQ_ALLOC_TIME=y -CONFIG_BLK_SCSI_REQUEST=y CONFIG_BLK_CGROUP_RWSTAT=y -CONFIG_BLK_DEV_BSG=y +CONFIG_BLK_DEV_BSG_COMMON=y CONFIG_BLK_DEV_BSGLIB=y CONFIG_BLK_DEV_INTEGRITY=y CONFIG_BLK_DEV_INTEGRITY_T10=y CONFIG_BLK_DEV_ZONED=y CONFIG_BLK_DEV_THROTTLING=y CONFIG_BLK_DEV_THROTTLING_LOW=y -# CONFIG_BLK_CMDLINE_PARSER is not set CONFIG_BLK_WBT=y +CONFIG_BLK_WBT_MQ=y CONFIG_BLK_CGROUP_IOLATENCY=y +CONFIG_BLK_CGROUP_FC_APPID=y CONFIG_BLK_CGROUP_IOCOST=y -CONFIG_BLK_WBT_MQ=y +CONFIG_BLK_CGROUP_IOPRIO=y CONFIG_BLK_DEBUG_FS=y CONFIG_BLK_DEBUG_FS_ZONED=y CONFIG_BLK_SED_OPAL=y @@ -961,6 +928,7 @@ CONFIG_BLK_MQ_PCI=y CONFIG_BLK_MQ_VIRTIO=y CONFIG_BLK_MQ_RDMA=y CONFIG_BLK_PM=y +CONFIG_BLOCK_HOLDER_DEPRECATED=y # # IO Schedulers @@ -1007,7 +975,6 @@ CONFIG_COREDUMP=y CONFIG_SELECT_MEMORY_MODEL=y CONFIG_SPARSEMEM_MANUAL=y CONFIG_SPARSEMEM=y -CONFIG_NEED_MULTIPLE_NODES=y CONFIG_SPARSEMEM_EXTREME=y CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y CONFIG_SPARSEMEM_VMEMMAP=y @@ -1015,19 +982,24 @@ CONFIG_HAVE_FAST_GUP=y CONFIG_NUMA_KEEP_MEMINFO=y CONFIG_MEMORY_ISOLATION=y CONFIG_HAVE_BOOTMEM_INFO_NODE=y +CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y CONFIG_MEMORY_HOTPLUG=y CONFIG_MEMORY_HOTPLUG_SPARSE=y CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE=y +CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y CONFIG_MEMORY_HOTREMOVE=y +CONFIG_MHP_MEMMAP_ON_MEMORY=y CONFIG_SPLIT_PTLOCK_CPUS=4 +CONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK=y CONFIG_MEMORY_BALLOON=y CONFIG_BALLOON_COMPACTION=y CONFIG_COMPACTION=y CONFIG_PAGE_REPORTING=y CONFIG_MIGRATION=y +CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION=y +CONFIG_ARCH_ENABLE_THP_MIGRATION=y CONFIG_CONTIG_ALLOC=y CONFIG_PHYS_ADDR_T_64BIT=y -CONFIG_BOUNCE=y CONFIG_VIRT_TO_BUS=y CONFIG_MMU_NOTIFIER=y CONFIG_KSM=y @@ -1045,6 +1017,7 @@ CONFIG_FRONTSWAP=y CONFIG_CMA=y # CONFIG_CMA_DEBUG is not set CONFIG_CMA_DEBUGFS=y +CONFIG_CMA_SYSFS=y CONFIG_CMA_AREAS=7 CONFIG_MEM_SOFT_DIRTY=y CONFIG_ZSWAP=y @@ -1067,8 +1040,12 @@ CONFIG_ZSMALLOC=y # CONFIG_ZSMALLOC_STAT is not set CONFIG_GENERIC_EARLY_IOREMAP=y # CONFIG_DEFERRED_STRUCT_PAGE_INIT is not set +CONFIG_PAGE_IDLE_FLAG=y CONFIG_IDLE_PAGE_TRACKING=y +CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y CONFIG_ARCH_HAS_PTE_DEVMAP=y +CONFIG_ZONE_DMA=y +CONFIG_ZONE_DMA32=y CONFIG_ZONE_DEVICE=y CONFIG_DEV_PAGEMAP_OPS=y CONFIG_HMM_MIRROR=y @@ -1081,6 +1058,13 @@ CONFIG_ARCH_HAS_PKEYS=y CONFIG_READ_ONLY_THP_FOR_FS=y CONFIG_ARCH_HAS_PTE_SPECIAL=y CONFIG_MAPPING_DIRTY_HELPERS=y +CONFIG_SECRETMEM=y + +# +# Data Access Monitoring +# +# CONFIG_DAMON is not set +# end of Data Access Monitoring # end of Memory Management options CONFIG_NET=y @@ -1097,6 +1081,7 @@ CONFIG_PACKET=y CONFIG_PACKET_DIAG=m CONFIG_UNIX=y CONFIG_UNIX_SCM=y +CONFIG_AF_UNIX_OOB=y CONFIG_UNIX_DIAG=m CONFIG_TLS=m CONFIG_TLS_DEVICE=y @@ -1207,6 +1192,7 @@ CONFIG_IPV6_SEG6_LWTUNNEL=y CONFIG_IPV6_SEG6_HMAC=y CONFIG_IPV6_SEG6_BPF=y CONFIG_IPV6_RPL_LWTUNNEL=y +CONFIG_IPV6_IOAM6_LWTUNNEL=y CONFIG_NETLABEL=y CONFIG_MPTCP=y CONFIG_INET_MPTCP_DIAG=m @@ -1225,13 +1211,13 @@ CONFIG_NETFILTER_INGRESS=y CONFIG_NETFILTER_NETLINK=m CONFIG_NETFILTER_FAMILY_BRIDGE=y CONFIG_NETFILTER_FAMILY_ARP=y +CONFIG_NETFILTER_NETLINK_HOOK=m CONFIG_NETFILTER_NETLINK_ACCT=m CONFIG_NETFILTER_NETLINK_QUEUE=m CONFIG_NETFILTER_NETLINK_LOG=m CONFIG_NETFILTER_NETLINK_OSF=m CONFIG_NF_CONNTRACK=m -CONFIG_NF_LOG_COMMON=m -CONFIG_NF_LOG_NETDEV=m +CONFIG_NF_LOG_SYSLOG=m CONFIG_NETFILTER_CONNCOUNT=m CONFIG_NF_CONNTRACK_MARK=y CONFIG_NF_CONNTRACK_SECMARK=y @@ -1305,6 +1291,7 @@ CONFIG_NFT_REJECT_NETDEV=m CONFIG_NF_FLOW_TABLE_INET=m CONFIG_NF_FLOW_TABLE=m CONFIG_NETFILTER_XTABLES=m +CONFIG_NETFILTER_XTABLES_COMPAT=y # # Xtables combined modules @@ -1545,7 +1532,6 @@ CONFIG_NF_DEFRAG_IPV6=m CONFIG_NF_TABLES_BRIDGE=m CONFIG_NFT_BRIDGE_META=m CONFIG_NFT_BRIDGE_REJECT=m -CONFIG_NF_LOG_BRIDGE=m CONFIG_NF_CONNTRACK_BRIDGE=m CONFIG_BRIDGE_NF_EBTABLES=m CONFIG_BRIDGE_EBT_BROUTE=m @@ -1607,12 +1593,11 @@ CONFIG_BRIDGE_IGMP_SNOOPING=y CONFIG_BRIDGE_VLAN_FILTERING=y CONFIG_BRIDGE_MRP=y CONFIG_BRIDGE_CFM=y -CONFIG_HAVE_NET_DSA=y CONFIG_NET_DSA=m -CONFIG_NET_DSA_TAG_8021Q=m CONFIG_NET_DSA_TAG_AR9331=m CONFIG_NET_DSA_TAG_BRCM_COMMON=m CONFIG_NET_DSA_TAG_BRCM=m +CONFIG_NET_DSA_TAG_BRCM_LEGACY=m CONFIG_NET_DSA_TAG_BRCM_PREPEND=m CONFIG_NET_DSA_TAG_HELLCREEK=m CONFIG_NET_DSA_TAG_GSWIP=m @@ -1800,6 +1785,8 @@ CONFIG_QRTR_TUN=m CONFIG_QRTR_MHI=m CONFIG_NET_NCSI=y CONFIG_NCSI_OEM_CMD_GET_MAC=y +CONFIG_NCSI_OEM_CMD_KEEP_PHY=y +CONFIG_PCPU_DEV_REFCNT=y CONFIG_RPS=y CONFIG_RFS_ACCEL=y CONFIG_SOCK_RX_QUEUE_MAPPING=y @@ -1808,7 +1795,6 @@ CONFIG_CGROUP_NET_PRIO=y CONFIG_CGROUP_NET_CLASSID=y CONFIG_NET_RX_BUSY_POLL=y CONFIG_BQL=y -CONFIG_BPF_JIT=y CONFIG_BPF_STREAM_PARSER=y CONFIG_NET_FLOW_LIMIT=y @@ -1900,6 +1886,7 @@ CONFIG_CAN_MCP251XFD=m CONFIG_CAN_8DEV_USB=m CONFIG_CAN_EMS_USB=m CONFIG_CAN_ESD_USB2=m +CONFIG_CAN_ETAS_ES58X=m CONFIG_CAN_GS_USB=m CONFIG_CAN_KVASER_USB=m CONFIG_CAN_MCBA_USB=m @@ -1924,6 +1911,7 @@ CONFIG_BT_LE=y CONFIG_BT_6LOWPAN=m CONFIG_BT_LEDS=y CONFIG_BT_MSFTEXT=y +CONFIG_BT_AOSPEXT=y CONFIG_BT_DEBUGFS=y # CONFIG_BT_SELFTEST is not set @@ -1967,6 +1955,7 @@ CONFIG_BT_ATH3K=m CONFIG_BT_MTKSDIO=m CONFIG_BT_MTKUART=m CONFIG_BT_HCIRSI=m +CONFIG_BT_VIRTIO=m # end of Bluetooth device drivers CONFIG_AF_RXRPC=m @@ -1976,6 +1965,7 @@ CONFIG_AF_RXRPC_DEBUG=y CONFIG_RXKAD=y CONFIG_AF_KCM=m CONFIG_STREAM_PARSER=y +CONFIG_MCTP=m CONFIG_FIB_RULES=y CONFIG_WIRELESS=y CONFIG_WIRELESS_EXT=y @@ -2075,12 +2065,12 @@ CONFIG_LWTUNNEL_BPF=y CONFIG_DST_CACHE=y CONFIG_GRO_CELLS=y CONFIG_SOCK_VALIDATE_XMIT=y +CONFIG_NET_SELFTESTS=m CONFIG_NET_SOCK_MSG=y CONFIG_NET_DEVLINK=y CONFIG_PAGE_POOL=y CONFIG_FAILOVER=m CONFIG_ETHTOOL_NETLINK=y -CONFIG_HAVE_EBPF_JIT=y # # Device Drivers @@ -2170,6 +2160,8 @@ CONFIG_PCI_SW_SWITCHTEC=m CONFIG_CXL_BUS=m CONFIG_CXL_MEM=m # CONFIG_CXL_MEM_RAW_COMMANDS is not set +CONFIG_CXL_ACPI=m +CONFIG_CXL_PMEM=m CONFIG_PCCARD=m CONFIG_PCMCIA=m CONFIG_PCMCIA_LOAD_CIS=y @@ -2229,6 +2221,7 @@ CONFIG_REGMAP_W1=m CONFIG_REGMAP_MMIO=y CONFIG_REGMAP_IRQ=y CONFIG_REGMAP_SOUNDWIRE=m +CONFIG_REGMAP_SOUNDWIRE_MBQ=m CONFIG_REGMAP_SCCB=m CONFIG_REGMAP_SPI_AVMM=m CONFIG_DMA_SHARED_BUFFER=y @@ -2245,6 +2238,70 @@ CONFIG_MHI_BUS_PCI_GENERIC=m CONFIG_CONNECTOR=y CONFIG_PROC_EVENTS=y + +# +# Firmware Drivers +# + +# +# ARM System Control and Management Interface Protocol +# +# end of ARM System Control and Management Interface Protocol + +CONFIG_EDD=m +# CONFIG_EDD_OFF is not set +CONFIG_FIRMWARE_MEMMAP=y +CONFIG_DMIID=y +CONFIG_DMI_SYSFS=y +CONFIG_DMI_SCAN_MACHINE_NON_EFI_FALLBACK=y +CONFIG_ISCSI_IBFT_FIND=y +CONFIG_ISCSI_IBFT=m +CONFIG_FW_CFG_SYSFS=m +# CONFIG_FW_CFG_SYSFS_CMDLINE is not set +CONFIG_SYSFB=y +# CONFIG_SYSFB_SIMPLEFB is not set +CONFIG_GOOGLE_FIRMWARE=y +# CONFIG_GOOGLE_SMI is not set +CONFIG_GOOGLE_COREBOOT_TABLE=m +CONFIG_GOOGLE_MEMCONSOLE=m +# CONFIG_GOOGLE_MEMCONSOLE_X86_LEGACY is not set +CONFIG_GOOGLE_MEMCONSOLE_COREBOOT=m +CONFIG_GOOGLE_VPD=m + +# +# EFI (Extensible Firmware Interface) Support +# +# CONFIG_EFI_VARS is not set +CONFIG_EFI_ESRT=y +CONFIG_EFI_VARS_PSTORE=y +CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE=y +CONFIG_EFI_RUNTIME_MAP=y +# CONFIG_EFI_FAKE_MEMMAP is not set +CONFIG_EFI_SOFT_RESERVE=y +CONFIG_EFI_RUNTIME_WRAPPERS=y +CONFIG_EFI_GENERIC_STUB_INITRD_CMDLINE_LOADER=y +CONFIG_EFI_BOOTLOADER_CONTROL=m +CONFIG_EFI_CAPSULE_LOADER=m +# CONFIG_EFI_TEST is not set +CONFIG_APPLE_PROPERTIES=y +# CONFIG_RESET_ATTACK_MITIGATION is not set +CONFIG_EFI_RCI2_TABLE=y +# CONFIG_EFI_DISABLE_PCI_DMA is not set +# end of EFI (Extensible Firmware Interface) Support + +CONFIG_EFI_EMBEDDED_FIRMWARE=y +CONFIG_UEFI_CPER=y +CONFIG_UEFI_CPER_X86=y +CONFIG_EFI_DEV_PATH_PARSER=y +CONFIG_EFI_EARLYCON=y +CONFIG_EFI_CUSTOM_SSDT_OVERLAYS=y + +# +# Tegra firmware driver +# +# end of Tegra firmware driver +# end of Firmware Drivers + CONFIG_GNSS=m CONFIG_GNSS_SERIAL=m CONFIG_GNSS_MTK_SERIAL=m @@ -2267,6 +2324,10 @@ CONFIG_MTD=m CONFIG_MTD_BLKDEVS=m CONFIG_MTD_BLOCK=m # CONFIG_MTD_BLOCK_RO is not set + +# +# Note that in some cases UBI block is preferred. See MTD_UBI_BLOCK. +# # CONFIG_FTL is not set # CONFIG_NFTL is not set # CONFIG_INFTL is not set @@ -2276,7 +2337,7 @@ CONFIG_MTD_BLOCK=m # CONFIG_MTD_OOPS is not set CONFIG_MTD_PSTORE=m # CONFIG_MTD_SWAP is not set -# CONFIG_MTD_PARTITIONED_MASTER is not set +CONFIG_MTD_PARTITIONED_MASTER=y # # RAM/ROM/Flash chip drivers @@ -2288,7 +2349,7 @@ CONFIG_MTD_MAP_BANK_WIDTH_2=y CONFIG_MTD_MAP_BANK_WIDTH_4=y CONFIG_MTD_CFI_I1=y CONFIG_MTD_CFI_I2=y -CONFIG_MTD_RAM=m +# CONFIG_MTD_RAM is not set CONFIG_MTD_ROM=m # CONFIG_MTD_ABSENT is not set # end of RAM/ROM/Flash chip drivers @@ -2299,7 +2360,7 @@ CONFIG_MTD_ROM=m # CONFIG_MTD_COMPLEX_MAPPINGS is not set # CONFIG_MTD_PHYSMAP is not set # CONFIG_MTD_INTEL_VR_NOR is not set -CONFIG_MTD_PLATRAM=m +# CONFIG_MTD_PLATRAM is not set # end of Mapping drivers for chip access # @@ -2308,10 +2369,13 @@ CONFIG_MTD_PLATRAM=m # CONFIG_MTD_PMC551 is not set # CONFIG_MTD_DATAFLASH is not set # CONFIG_MTD_MCHP23K256 is not set +# CONFIG_MTD_MCHP48L640 is not set # CONFIG_MTD_SST25L is not set # CONFIG_MTD_SLRAM is not set CONFIG_MTD_PHRAM=m -# CONFIG_MTD_MTDRAM is not set +CONFIG_MTD_MTDRAM=m +CONFIG_MTDRAM_TOTAL_SIZE=4096 +CONFIG_MTDRAM_ERASE_SIZE=128 CONFIG_MTD_BLOCK2MTD=m # @@ -2410,7 +2474,6 @@ CONFIG_ZRAM_DEF_COMP_LZORLE=y CONFIG_ZRAM_DEF_COMP="lzo-rle" CONFIG_ZRAM_WRITEBACK=y # CONFIG_ZRAM_MEMORY_TRACKING is not set -CONFIG_BLK_DEV_UMEM=m CONFIG_BLK_DEV_LOOP=m CONFIG_BLK_DEV_LOOP_MIN_COUNT=0 CONFIG_BLK_DEV_CRYPTOLOOP=m @@ -2480,10 +2543,10 @@ CONFIG_DS1682=m CONFIG_VMWARE_BALLOON=m CONFIG_LATTICE_ECP3_CONFIG=m # CONFIG_SRAM is not set +CONFIG_DW_XDATA_PCIE=m CONFIG_PCI_ENDPOINT_TEST=m CONFIG_XILINX_SDFEC=m CONFIG_MISC_RTSX=m -CONFIG_PVPANIC=m CONFIG_C2PORT=m CONFIG_C2PORT_DURAMAR_2150=m @@ -2527,16 +2590,17 @@ CONFIG_MISC_RTSX_PCI=m CONFIG_MISC_RTSX_USB=m CONFIG_HABANA_AI=m CONFIG_UACCE=m +CONFIG_PVPANIC=y +CONFIG_PVPANIC_MMIO=m +CONFIG_PVPANIC_PCI=m # end of Misc devices -CONFIG_HAVE_IDE=y -# CONFIG_IDE is not set - # # SCSI device support # CONFIG_SCSI_MOD=y CONFIG_RAID_ATTRS=m +CONFIG_SCSI_COMMON=y CONFIG_SCSI=y CONFIG_SCSI_DMA=y CONFIG_SCSI_NETLINK=y @@ -2549,6 +2613,7 @@ CONFIG_BLK_DEV_SD=y CONFIG_CHR_DEV_ST=m CONFIG_BLK_DEV_SR=m CONFIG_CHR_DEV_SG=m +CONFIG_BLK_DEV_BSG=y CONFIG_CHR_DEV_SCH=m CONFIG_SCSI_ENCLOSURE=m CONFIG_SCSI_CONSTANTS=y @@ -2613,6 +2678,7 @@ CONFIG_SCSI_MPT3SAS=m CONFIG_SCSI_MPT2SAS_MAX_SGE=128 CONFIG_SCSI_MPT3SAS_MAX_SGE=128 CONFIG_SCSI_MPT2SAS=m +CONFIG_SCSI_MPI3MR=m CONFIG_SCSI_SMARTPQI=m CONFIG_SCSI_UFSHCD=m CONFIG_SCSI_UFSHCD_PCI=m @@ -2622,6 +2688,7 @@ CONFIG_SCSI_UFS_CDNS_PLATFORM=m # CONFIG_SCSI_UFS_DWC_TC_PLATFORM is not set CONFIG_SCSI_UFS_BSG=y CONFIG_SCSI_UFS_CRYPTO=y +CONFIG_SCSI_UFS_HPB=y CONFIG_SCSI_HPTIOP=m CONFIG_SCSI_BUSLOGIC=m CONFIG_SCSI_FLASHPOINT=y @@ -2665,6 +2732,7 @@ CONFIG_QEDI=m CONFIG_QEDF=m CONFIG_SCSI_LPFC=m # CONFIG_SCSI_LPFC_DEBUG_FS is not set +CONFIG_SCSI_EFCT=m CONFIG_SCSI_DC395x=m CONFIG_SCSI_AM53C974=m CONFIG_SCSI_WD719X=m @@ -2963,6 +3031,7 @@ CONFIG_NET_DSA_MICROCHIP_KSZ9477_I2C=m CONFIG_NET_DSA_MICROCHIP_KSZ9477_SPI=m CONFIG_NET_DSA_MICROCHIP_KSZ8795=m CONFIG_NET_DSA_MICROCHIP_KSZ8795_SPI=m +CONFIG_NET_DSA_MICROCHIP_KSZ8863_SMI=m CONFIG_NET_DSA_MV88E6XXX=m CONFIG_NET_DSA_MV88E6XXX_PTP=y CONFIG_NET_DSA_MSCC_SEVILLE=m @@ -3125,7 +3194,10 @@ CONFIG_I40EVF=m CONFIG_ICE=m CONFIG_FM10K=m CONFIG_IGC=m +CONFIG_NET_VENDOR_MICROSOFT=y +CONFIG_MICROSOFT_MANA=m CONFIG_JME=m +CONFIG_NET_VENDOR_LITEX=y CONFIG_NET_VENDOR_MARVELL=y CONFIG_MVMDIO=m CONFIG_SKGE=m @@ -3149,8 +3221,10 @@ CONFIG_MLX5_EN_ARFS=y CONFIG_MLX5_EN_RXNFC=y CONFIG_MLX5_MPFS=y CONFIG_MLX5_ESWITCH=y +CONFIG_MLX5_BRIDGE=y CONFIG_MLX5_CLS_ACT=y CONFIG_MLX5_TC_CT=y +CONFIG_MLX5_TC_SAMPLE=y CONFIG_MLX5_CORE_EN_DCB=y CONFIG_MLX5_CORE_IPOIB=y CONFIG_MLX5_FPGA_IPSEC=y @@ -3167,8 +3241,6 @@ CONFIG_MLXSW_CORE_HWMON=y CONFIG_MLXSW_CORE_THERMAL=y CONFIG_MLXSW_PCI=m CONFIG_MLXSW_I2C=m -CONFIG_MLXSW_SWITCHIB=m -CONFIG_MLXSW_SWITCHX2=m CONFIG_MLXSW_SPECTRUM=m CONFIG_MLXSW_SPECTRUM_DCB=y CONFIG_MLXSW_MINIMAL=m @@ -3276,6 +3348,7 @@ CONFIG_STMMAC_ETH=m CONFIG_STMMAC_PLATFORM=m CONFIG_DWMAC_GENERIC=m CONFIG_DWMAC_INTEL=m +CONFIG_DWMAC_LOONGSON=m CONFIG_STMMAC_PCI=m CONFIG_NET_VENDOR_SUN=y CONFIG_HAPPYMEAL=m @@ -3309,7 +3382,6 @@ CONFIG_NET_VENDOR_XIRCOM=y CONFIG_PCMCIA_XIRC2PS=m CONFIG_FDDI=m CONFIG_DEFXX=m -CONFIG_DEFXX_MMIO=y CONFIG_SKFP=m # CONFIG_HIPPI is not set CONFIG_NET_SB1000=m @@ -3342,11 +3414,16 @@ CONFIG_INTEL_XWAY_PHY=m CONFIG_LSI_ET1011C_PHY=m CONFIG_MARVELL_PHY=m CONFIG_MARVELL_10G_PHY=m +CONFIG_MARVELL_88X2222_PHY=m +CONFIG_MAXLINEAR_GPHY=m +CONFIG_MEDIATEK_GE_PHY=m CONFIG_MICREL_PHY=m CONFIG_MICROCHIP_PHY=m CONFIG_MICROCHIP_T1_PHY=m CONFIG_MICROSEMI_PHY=m +CONFIG_MOTORCOMM_PHY=m CONFIG_NATIONAL_PHY=m +CONFIG_NXP_C45_TJA11XX_PHY=m CONFIG_NXP_TJA11XX_PHY=m CONFIG_AT803X_PHY=m CONFIG_QSEMI_PHY=m @@ -3364,8 +3441,14 @@ CONFIG_DP83869_PHY=m CONFIG_VITESSE_PHY=m CONFIG_XILINX_GMII2RGMII=m CONFIG_MICREL_KS8995MA=m + +# +# MCTP Device Drivers +# CONFIG_MDIO_DEVICE=m CONFIG_MDIO_BUS=m +CONFIG_FWNODE_MDIO=m +CONFIG_ACPI_MDIO=m CONFIG_MDIO_DEVRES=m CONFIG_MDIO_BITBANG=m CONFIG_MDIO_BCM_UNIMAC=m @@ -3622,7 +3705,6 @@ CONFIG_P54_PCI=m CONFIG_P54_SPI=m # CONFIG_P54_SPI_DEFAULT_EEPROM is not set CONFIG_P54_LEDS=y -CONFIG_PRISM54=m CONFIG_WLAN_VENDOR_MARVELL=y CONFIG_LIBERTAS=m CONFIG_LIBERTAS_USB=m @@ -3777,6 +3859,18 @@ CONFIG_IEEE802154_CA8210=m # CONFIG_IEEE802154_CA8210_DEBUGFS is not set CONFIG_IEEE802154_MCR20A=m CONFIG_IEEE802154_HWSIM=m + +# +# Wireless WAN +# +CONFIG_WWAN=y +CONFIG_WWAN_HWSIM=m +CONFIG_MHI_WWAN_CTRL=m +CONFIG_MHI_WWAN_MBIM=m +CONFIG_RPMSG_WWAN_CTRL=m +CONFIG_IOSM=m +# end of Wireless WAN + CONFIG_XEN_NETDEV_FRONTEND=m CONFIG_XEN_NETDEV_BACKEND=m CONFIG_VMXNET3=m @@ -3807,9 +3901,6 @@ CONFIG_MISDN_NETJET=m CONFIG_MISDN_HDLC=m CONFIG_MISDN_IPAC=m CONFIG_MISDN_ISAR=m -CONFIG_NVM=y -CONFIG_NVM_PBLK=m -# CONFIG_NVM_PBLK_DEBUG is not set # # Input device support @@ -3839,7 +3930,7 @@ CONFIG_KEYBOARD_ADC=m CONFIG_KEYBOARD_ADP5520=m CONFIG_KEYBOARD_ADP5588=m CONFIG_KEYBOARD_ADP5589=m -CONFIG_KEYBOARD_APPLESPI=y +CONFIG_KEYBOARD_APPLESPI=m CONFIG_KEYBOARD_ATKBD=m CONFIG_KEYBOARD_QT1050=m CONFIG_KEYBOARD_QT1070=m @@ -3930,6 +4021,7 @@ CONFIG_JOYSTICK_WALKERA0701=m CONFIG_JOYSTICK_PSXPAD_SPI=m CONFIG_JOYSTICK_PSXPAD_SPI_FF=y CONFIG_JOYSTICK_PXRC=m +CONFIG_JOYSTICK_QWIIC=m CONFIG_JOYSTICK_FSIA6B=m CONFIG_INPUT_TABLET=y CONFIG_TABLET_USB_ACECAD=m @@ -3939,7 +4031,6 @@ CONFIG_TABLET_USB_KBTAB=m CONFIG_TABLET_USB_PEGASUS=m CONFIG_TABLET_SERIAL_WACOM4=m CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_PROPERTIES=y CONFIG_TOUCHSCREEN_88PM860X=m CONFIG_TOUCHSCREEN_ADS7846=m CONFIG_TOUCHSCREEN_AD7877=m @@ -3971,7 +4062,9 @@ CONFIG_TOUCHSCREEN_EXC3000=m CONFIG_TOUCHSCREEN_FUJITSU=m CONFIG_TOUCHSCREEN_GOODIX=m CONFIG_TOUCHSCREEN_HIDEEP=m +CONFIG_TOUCHSCREEN_HYCON_HY46XX=m CONFIG_TOUCHSCREEN_ILI210X=m +CONFIG_TOUCHSCREEN_ILITEK=m CONFIG_TOUCHSCREEN_S6SY761=m CONFIG_TOUCHSCREEN_GUNZE=m CONFIG_TOUCHSCREEN_EKTF2127=m @@ -3983,6 +4076,7 @@ CONFIG_TOUCHSCREEN_MAX11801=m CONFIG_TOUCHSCREEN_MCS5000=m CONFIG_TOUCHSCREEN_MMS114=m CONFIG_TOUCHSCREEN_MELFAS_MIP4=m +CONFIG_TOUCHSCREEN_MSG2638=m CONFIG_TOUCHSCREEN_MTOUCH=m CONFIG_TOUCHSCREEN_INEXIO=m CONFIG_TOUCHSCREEN_MK712=m @@ -4048,6 +4142,7 @@ CONFIG_INPUT_AD714X=m CONFIG_INPUT_AD714X_I2C=m CONFIG_INPUT_AD714X_SPI=m CONFIG_INPUT_ARIZONA_HAPTICS=m +CONFIG_INPUT_ATC260X_ONKEY=m CONFIG_INPUT_BMA150=m CONFIG_INPUT_E3X0_BUTTON=m CONFIG_INPUT_PCSPKR=m @@ -4091,6 +4186,7 @@ CONFIG_INPUT_ADXL34X_I2C=m CONFIG_INPUT_ADXL34X_SPI=m CONFIG_INPUT_IMS_PCU=m CONFIG_INPUT_IQS269A=m +CONFIG_INPUT_IQS626A=m CONFIG_INPUT_CMA3000=m CONFIG_INPUT_CMA3000_I2C=m CONFIG_INPUT_XEN_KBDDEV_FRONTEND=m @@ -4216,19 +4312,13 @@ CONFIG_SERIAL_SPRD=m CONFIG_SERIAL_MCTRL_GPIO=y CONFIG_SERIAL_NONSTANDARD=y -CONFIG_ROCKETPORT=m -CONFIG_CYCLADES=m -CONFIG_CYZ_INTR=y CONFIG_MOXA_INTELLIO=m CONFIG_MOXA_SMARTIO=m CONFIG_SYNCLINK_GT=m -CONFIG_ISI=m CONFIG_N_HDLC=m CONFIG_N_GSM=m CONFIG_NOZOMI=m CONFIG_NULL_TTY=m -CONFIG_TRACE_ROUTER=m -CONFIG_TRACE_SINK=m CONFIG_HVC_DRIVER=y CONFIG_HVC_IRQ=y CONFIG_HVC_XEN=y @@ -4271,10 +4361,7 @@ CONFIG_IPWIRELESS=m CONFIG_MWAVE=m CONFIG_DEVMEM=y -# CONFIG_DEVKMEM is not set CONFIG_NVRAM=y -CONFIG_RAW_DRIVER=m -CONFIG_MAX_RAW_DEVS=8192 CONFIG_DEVPORT=y CONFIG_HPET=y # CONFIG_HPET_MMAP is not set @@ -4299,12 +4386,13 @@ CONFIG_TCG_TIS_ST33ZP24=m CONFIG_TCG_TIS_ST33ZP24_I2C=m CONFIG_TCG_TIS_ST33ZP24_SPI=m CONFIG_TELCLOCK=m +CONFIG_XILLYBUS_CLASS=m CONFIG_XILLYBUS=m CONFIG_XILLYBUS_PCIE=m -# end of Character devices - +CONFIG_XILLYUSB=m # CONFIG_RANDOM_TRUST_CPU is not set # CONFIG_RANDOM_TRUST_BOOTLOADER is not set +# end of Character devices # # I2C support @@ -4329,7 +4417,7 @@ CONFIG_I2C_MUX_MLXCPLD=m CONFIG_I2C_HELPER_AUTO=y CONFIG_I2C_SMBUS=m -CONFIG_I2C_ALGOBIT=m +CONFIG_I2C_ALGOBIT=y CONFIG_I2C_ALGOPCA=m # @@ -4388,6 +4476,7 @@ CONFIG_I2C_XILINX=m # CONFIG_I2C_DIOLAN_U2C=m CONFIG_I2C_DLN2=m +CONFIG_I2C_CP2615=m CONFIG_I2C_PARPORT=m CONFIG_I2C_ROBOTFUZZ_OSIF=m CONFIG_I2C_TAOS_EVM=m @@ -4399,6 +4488,7 @@ CONFIG_I2C_VIPERBOARD=m # CONFIG_I2C_MLXCPLD=m CONFIG_I2C_CROS_EC_TUNNEL=m +CONFIG_I2C_VIRTIO=m # end of I2C Hardware Bus support CONFIG_I2C_STUB=m @@ -4420,6 +4510,8 @@ CONFIG_SPI_MEM=y # SPI Master Controller Drivers # CONFIG_SPI_ALTERA=m +CONFIG_SPI_ALTERA_CORE=m +CONFIG_SPI_ALTERA_DFL=m CONFIG_SPI_AXI_SPI_ENGINE=m CONFIG_SPI_BITBANG=m CONFIG_SPI_BUTTERFLY=m @@ -4481,6 +4573,7 @@ CONFIG_PPS_CLIENT_GPIO=m # PTP clock support # CONFIG_PTP_1588_CLOCK=y +CONFIG_PTP_1588_CLOCK_OPTIONAL=y CONFIG_DP83640_PHY=m CONFIG_PTP_1588_CLOCK_INES=m CONFIG_PTP_1588_CLOCK_KVM=m @@ -4643,6 +4736,7 @@ CONFIG_GPIO_VIPERBOARD=m # CONFIG_GPIO_AGGREGATOR=m CONFIG_GPIO_MOCKUP=m +CONFIG_GPIO_VIRTIO=m # end of Virtual GPIO drivers CONFIG_W1=m @@ -4684,8 +4778,10 @@ CONFIG_W1_SLAVE_DS28E17=m # end of 1-wire Slaves CONFIG_POWER_RESET=y +CONFIG_POWER_RESET_ATC260X=m CONFIG_POWER_RESET_MT6323=y CONFIG_POWER_RESET_RESTART=y +CONFIG_POWER_RESET_TPS65086=y CONFIG_POWER_SUPPLY=y # CONFIG_POWER_SUPPLY_DEBUG is not set CONFIG_POWER_SUPPLY_HWMON=y @@ -4740,6 +4836,7 @@ CONFIG_CHARGER_MAX77693=m CONFIG_CHARGER_MAX8997=m CONFIG_CHARGER_MAX8998=m CONFIG_CHARGER_MP2629=m +CONFIG_CHARGER_MT6360=m CONFIG_CHARGER_BQ2415X=m CONFIG_CHARGER_BQ24190=m CONFIG_CHARGER_BQ24257=m @@ -4751,11 +4848,15 @@ CONFIG_CHARGER_BQ256XX=m CONFIG_CHARGER_SMB347=m CONFIG_CHARGER_TPS65090=m CONFIG_BATTERY_GAUGE_LTC2941=m +CONFIG_BATTERY_GOLDFISH=m CONFIG_BATTERY_RT5033=m CONFIG_CHARGER_RT9455=m CONFIG_CHARGER_CROS_USBPD=m +CONFIG_CHARGER_CROS_PCHG=m CONFIG_CHARGER_BD99954=m CONFIG_CHARGER_WILCO=m +CONFIG_BATTERY_SURFACE=m +CONFIG_CHARGER_SURFACE=m CONFIG_HWMON=y CONFIG_HWMON_VID=m # CONFIG_HWMON_DEBUG_CHIP is not set @@ -4783,14 +4884,14 @@ CONFIG_SENSORS_ADT7462=m CONFIG_SENSORS_ADT7470=m CONFIG_SENSORS_ADT7475=m CONFIG_SENSORS_AHT10=m +CONFIG_SENSORS_AQUACOMPUTER_D5NEXT=m CONFIG_SENSORS_AS370=m CONFIG_SENSORS_ASC7621=m CONFIG_SENSORS_AXI_FAN_CONTROL=m CONFIG_SENSORS_K8TEMP=m CONFIG_SENSORS_K10TEMP=m CONFIG_SENSORS_FAM15H_POWER=m -CONFIG_SENSORS_AMD_ENERGY=m -CONFIG_SENSORS_APPLESMC=y +CONFIG_SENSORS_APPLESMC=m CONFIG_SENSORS_ASB100=m CONFIG_SENSORS_ASPEED=m CONFIG_SENSORS_ATXP1=m @@ -4880,15 +4981,20 @@ CONFIG_SENSORS_NCT6775=m CONFIG_SENSORS_NCT7802=m CONFIG_SENSORS_NCT7904=m CONFIG_SENSORS_NPCM7XX=m +CONFIG_SENSORS_NZXT_KRAKEN2=m CONFIG_SENSORS_PCF8591=m CONFIG_PMBUS=m CONFIG_SENSORS_PMBUS=m CONFIG_SENSORS_ADM1266=m CONFIG_SENSORS_ADM1275=m CONFIG_SENSORS_BEL_PFE=m +CONFIG_SENSORS_BPA_RS600=m +CONFIG_SENSORS_FSP_3Y=m CONFIG_SENSORS_IBM_CFFPS=m +CONFIG_SENSORS_DPS920AB=m CONFIG_SENSORS_INSPUR_IPSPS=m CONFIG_SENSORS_IR35221=m +CONFIG_SENSORS_IR36021=m CONFIG_SENSORS_IR38064=m CONFIG_SENSORS_IRPS5401=m CONFIG_SENSORS_ISL68137=m @@ -4896,6 +5002,7 @@ CONFIG_SENSORS_LM25066=m CONFIG_SENSORS_LTC2978=m # CONFIG_SENSORS_LTC2978_REGULATOR is not set CONFIG_SENSORS_LTC3815=m +CONFIG_SENSORS_MAX15301=m CONFIG_SENSORS_MAX16064=m CONFIG_SENSORS_MAX16601=m CONFIG_SENSORS_MAX20730=m @@ -4903,10 +5010,13 @@ CONFIG_SENSORS_MAX20751=m CONFIG_SENSORS_MAX31785=m CONFIG_SENSORS_MAX34440=m CONFIG_SENSORS_MAX8688=m +CONFIG_SENSORS_MP2888=m CONFIG_SENSORS_MP2975=m +CONFIG_SENSORS_PIM4328=m CONFIG_SENSORS_PM6764TR=m CONFIG_SENSORS_PXE1610=m CONFIG_SENSORS_Q54SJ108A2=m +CONFIG_SENSORS_STPDDC60=m CONFIG_SENSORS_TPS40422=m CONFIG_SENSORS_TPS53679=m CONFIG_SENSORS_UCD9000=m @@ -4914,9 +5024,11 @@ CONFIG_SENSORS_UCD9200=m CONFIG_SENSORS_XDPE122=m CONFIG_SENSORS_ZL6100=m CONFIG_SENSORS_SBTSI=m +CONFIG_SENSORS_SBRMI=m CONFIG_SENSORS_SHT15=m CONFIG_SENSORS_SHT21=m CONFIG_SENSORS_SHT3x=m +CONFIG_SENSORS_SHT4x=m CONFIG_SENSORS_SHTC1=m CONFIG_SENSORS_SIS5595=m CONFIG_SENSORS_DME1737=m @@ -5009,6 +5121,8 @@ CONFIG_PROC_THERMAL_MMIO_RAPL=m CONFIG_INTEL_BXT_PMIC_THERMAL=m CONFIG_INTEL_PCH_THERMAL=m +CONFIG_INTEL_TCC_COOLING=m +CONFIG_INTEL_MENLOW=m # end of Intel thermal drivers CONFIG_GENERIC_ADC_THERMAL=m @@ -5018,6 +5132,7 @@ CONFIG_WATCHDOG_CORE=y CONFIG_WATCHDOG_HANDLE_BOOT_ENABLED=y CONFIG_WATCHDOG_OPEN_TIMEOUT=0 CONFIG_WATCHDOG_SYSFS=y +# CONFIG_WATCHDOG_HRTIMER_PRETIMEOUT is not set # # Watchdog Pretimeout Governors @@ -5200,16 +5315,13 @@ CONFIG_PCF50633_ADC=m CONFIG_PCF50633_GPIO=m CONFIG_UCB1400_CORE=m CONFIG_MFD_RDC321X=m +CONFIG_MFD_RT4831=m CONFIG_MFD_RT5033=m CONFIG_MFD_RC5T583=y -CONFIG_MFD_SEC_CORE=y CONFIG_MFD_SI476X_CORE=m CONFIG_MFD_SM501=m CONFIG_MFD_SM501_GPIO=y CONFIG_MFD_SKY81452=m -CONFIG_ABX500_CORE=y -CONFIG_AB3100_CORE=y -CONFIG_AB3100_OTP=y CONFIG_MFD_SYSCON=y CONFIG_MFD_TI_AM335X_TSCADC=m CONFIG_MFD_LP3943=m @@ -5221,7 +5333,6 @@ CONFIG_TPS65010=m CONFIG_TPS6507X=m CONFIG_MFD_TPS65086=m CONFIG_MFD_TPS65090=y -CONFIG_MFD_TPS68470=y CONFIG_MFD_TI_LP873X=m CONFIG_MFD_TPS6586X=y CONFIG_MFD_TPS65910=y @@ -5236,7 +5347,7 @@ CONFIG_MFD_WL1273_CORE=m CONFIG_MFD_LM3533=m CONFIG_MFD_TQMX86=m CONFIG_MFD_VX855=m -CONFIG_MFD_ARIZONA=y +CONFIG_MFD_ARIZONA=m CONFIG_MFD_ARIZONA_I2C=m CONFIG_MFD_ARIZONA_SPI=m CONFIG_MFD_CS47L24=y @@ -5252,6 +5363,8 @@ CONFIG_MFD_WM8350=y CONFIG_MFD_WM8350_I2C=y CONFIG_MFD_WM8994=m CONFIG_MFD_WCD934X=m +CONFIG_MFD_ATC260X=m +CONFIG_MFD_ATC260X_I2C=m CONFIG_RAVE_SP_CORE=m CONFIG_MFD_INTEL_M10_BMC=m # end of Multifunction device drivers @@ -5270,6 +5383,7 @@ CONFIG_REGULATOR_AAT2870=m CONFIG_REGULATOR_ARIZONA_LDO1=m CONFIG_REGULATOR_ARIZONA_MICSUPP=m CONFIG_REGULATOR_AS3711=m +CONFIG_REGULATOR_ATC260X=m CONFIG_REGULATOR_AXP20X=m CONFIG_REGULATOR_BCM590XX=m CONFIG_REGULATOR_BD9571MWV=m @@ -5295,6 +5409,7 @@ CONFIG_REGULATOR_MAX14577=m CONFIG_REGULATOR_MAX1586=m CONFIG_REGULATOR_MAX8649=m CONFIG_REGULATOR_MAX8660=m +CONFIG_REGULATOR_MAX8893=m CONFIG_REGULATOR_MAX8907=m CONFIG_REGULATOR_MAX8925=m CONFIG_REGULATOR_MAX8952=m @@ -5309,6 +5424,7 @@ CONFIG_REGULATOR_MP8859=m CONFIG_REGULATOR_MT6311=m CONFIG_REGULATOR_MT6323=m CONFIG_REGULATOR_MT6358=m +CONFIG_REGULATOR_MT6359=m CONFIG_REGULATOR_MT6360=m CONFIG_REGULATOR_MT6397=m CONFIG_REGULATOR_PALMAS=m @@ -5322,11 +5438,13 @@ CONFIG_REGULATOR_PWM=m CONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_ATTINY=m CONFIG_REGULATOR_RC5T583=m CONFIG_REGULATOR_RT4801=m +CONFIG_REGULATOR_RT4831=m CONFIG_REGULATOR_RT5033=m +CONFIG_REGULATOR_RT6160=m +CONFIG_REGULATOR_RT6245=m +CONFIG_REGULATOR_RTQ2134=m CONFIG_REGULATOR_RTMV20=m -CONFIG_REGULATOR_S2MPA01=m -CONFIG_REGULATOR_S2MPS11=m -CONFIG_REGULATOR_S5M8767=m +CONFIG_REGULATOR_RTQ6752=m CONFIG_REGULATOR_SKY81452=m CONFIG_REGULATOR_SLG51000=m CONFIG_REGULATOR_TPS51632=m @@ -5384,7 +5502,7 @@ CONFIG_IR_SERIAL_TRANSMITTER=y CONFIG_IR_SIR=m CONFIG_RC_XBOX_DVD=m CONFIG_IR_TOY=m -CONFIG_CEC_CORE=m +CONFIG_CEC_CORE=y CONFIG_CEC_NOTIFIER=y CONFIG_CEC_PIN=y CONFIG_MEDIA_CEC_RC=y @@ -5429,6 +5547,7 @@ CONFIG_VIDEO_TUNER=m CONFIG_V4L2_MEM2MEM_DEV=m CONFIG_V4L2_FLASH_LED_CLASS=m CONFIG_V4L2_FWNODE=m +CONFIG_V4L2_ASYNC=m CONFIG_VIDEOBUF_GEN=m CONFIG_VIDEOBUF_DMA_SG=m CONFIG_VIDEOBUF_VMALLOC=m @@ -5463,7 +5582,6 @@ CONFIG_DVB_DYNAMIC_MINORS=y # # Drivers filtered as selected at 'Filter media drivers' # -CONFIG_TTPCI_EEPROM=m CONFIG_MEDIA_USB_SUPPORT=y # @@ -5634,10 +5752,8 @@ CONFIG_VIDEO_TW686X=m # Media capture/analog TV support # CONFIG_VIDEO_IVTV=m -# CONFIG_VIDEO_IVTV_DEPRECATED_IOCTLS is not set CONFIG_VIDEO_IVTV_ALSA=m -CONFIG_VIDEO_FB_IVTV=m -# CONFIG_VIDEO_FB_IVTV_FORCE_PAT is not set +# CONFIG_VIDEO_FB_IVTV is not set CONFIG_VIDEO_HEXIUM_GEMINI=m CONFIG_VIDEO_HEXIUM_ORION=m CONFIG_VIDEO_MXB=m @@ -5671,14 +5787,10 @@ CONFIG_VIDEO_SAA7164=m # # Media digital TV PCI Adapters # -CONFIG_DVB_AV7110_IR=y -CONFIG_DVB_AV7110=m -CONFIG_DVB_AV7110_OSD=y CONFIG_DVB_BUDGET_CORE=m CONFIG_DVB_BUDGET=m CONFIG_DVB_BUDGET_CI=m CONFIG_DVB_BUDGET_AV=m -CONFIG_DVB_BUDGET_PATCH=m CONFIG_DVB_B2C2_FLEXCOP_PCI=m # CONFIG_DVB_B2C2_FLEXCOP_PCI_DEBUG is not set CONFIG_DVB_PLUTO2=m @@ -5725,6 +5837,7 @@ CONFIG_MEDIA_COMMON_OPTIONS=y # CONFIG_VIDEO_CX2341X=m CONFIG_VIDEO_TVEEPROM=m +CONFIG_TTPCI_EEPROM=m CONFIG_CYPRESS_FIRMWARE=m CONFIG_VIDEOBUF2_CORE=m CONFIG_VIDEOBUF2_V4L2=m @@ -5824,6 +5937,7 @@ CONFIG_VIDEO_M52790=m CONFIG_VIDEO_APTINA_PLL=m CONFIG_VIDEO_CCS_PLL=m CONFIG_VIDEO_HI556=m +CONFIG_VIDEO_IMX208=m CONFIG_VIDEO_IMX214=m CONFIG_VIDEO_IMX219=m CONFIG_VIDEO_IMX258=m @@ -6009,7 +6123,6 @@ CONFIG_DVB_TDA10071=m # # DVB-T (terrestrial) frontends # -CONFIG_DVB_SP8870=m CONFIG_DVB_SP887X=m CONFIG_DVB_CX22700=m CONFIG_DVB_CX22702=m @@ -6117,7 +6230,7 @@ CONFIG_DVB_DUMMY_FE=m # # Graphics support # -CONFIG_AGP=m +CONFIG_AGP=y CONFIG_AGP_AMD64=m CONFIG_AGP_INTEL=m CONFIG_AGP_SIS=m @@ -6126,13 +6239,13 @@ CONFIG_INTEL_GTT=m CONFIG_VGA_ARB=y CONFIG_VGA_ARB_MAX_GPUS=10 CONFIG_VGA_SWITCHEROO=y -CONFIG_DRM=m +CONFIG_DRM=y CONFIG_DRM_MIPI_DBI=m CONFIG_DRM_MIPI_DSI=y CONFIG_DRM_DP_AUX_CHARDEV=y +# CONFIG_DRM_DEBUG_MM is not set # CONFIG_DRM_DEBUG_SELFTEST is not set -CONFIG_DRM_KMS_HELPER=m -CONFIG_DRM_KMS_FB_HELPER=y +CONFIG_DRM_KMS_HELPER=y CONFIG_DRM_FBDEV_EMULATION=y CONFIG_DRM_FBDEV_OVERALLOC=100 CONFIG_DRM_LOAD_EDID_FIRMWARE=y @@ -6165,7 +6278,6 @@ CONFIG_DRM_AMDGPU=m CONFIG_DRM_AMDGPU_SI=y CONFIG_DRM_AMDGPU_CIK=y CONFIG_DRM_AMDGPU_USERPTR=y -# CONFIG_DRM_AMDGPU_GART_DEBUGFS is not set # # ACP (Audio CoProcessor) Configuration @@ -6180,9 +6292,11 @@ CONFIG_DRM_AMD_DC=y CONFIG_DRM_AMD_DC_DCN=y CONFIG_DRM_AMD_DC_HDCP=y CONFIG_DRM_AMD_DC_SI=y +CONFIG_DRM_AMD_SECURE_DISPLAY=y # end of Display Engine Configuration CONFIG_HSA_AMD=y +CONFIG_HSA_AMD_SVM=y CONFIG_DRM_NOUVEAU=m # CONFIG_NOUVEAU_LEGACY_CTX_SUPPORT is not set CONFIG_NOUVEAU_DEBUG=5 @@ -6198,6 +6312,7 @@ CONFIG_DRM_I915_COMPRESS_ERROR=y CONFIG_DRM_I915_USERPTR=y CONFIG_DRM_I915_GVT=y CONFIG_DRM_I915_GVT_KVMGT=m +CONFIG_DRM_I915_REQUEST_TIMEOUT=20000 CONFIG_DRM_I915_FENCE_TIMEOUT=10000 CONFIG_DRM_I915_USERFAULT_AUTOSUSPEND=250 CONFIG_DRM_I915_HEARTBEAT_INTERVAL=2500 @@ -6209,13 +6324,12 @@ CONFIG_DRM_VGEM=m CONFIG_DRM_VKMS=m CONFIG_DRM_VMWGFX=m CONFIG_DRM_VMWGFX_FBCON=y +CONFIG_DRM_VMWGFX_MKSSTATS=y CONFIG_DRM_GMA500=m -CONFIG_DRM_GMA600=y CONFIG_DRM_UDL=m CONFIG_DRM_AST=m CONFIG_DRM_MGAG200=m CONFIG_DRM_QXL=m -CONFIG_DRM_BOCHS=m CONFIG_DRM_VIRTIO_GPU=m CONFIG_DRM_PANEL=y @@ -6223,6 +6337,7 @@ CONFIG_DRM_PANEL=y # Display Panels # CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN=m +CONFIG_DRM_PANEL_WIDECHIPS_WS2401=m # end of Display Panels CONFIG_DRM_BRIDGE=y @@ -6236,8 +6351,10 @@ CONFIG_DRM_ANALOGIX_DP=m # end of Display Interface Bridges # CONFIG_DRM_ETNAVIV is not set +CONFIG_DRM_BOCHS=m CONFIG_DRM_CIRRUS_QEMU=m CONFIG_DRM_GM12U320=m +CONFIG_DRM_SIMPLEDRM=y CONFIG_TINYDRM_HX8357D=m CONFIG_TINYDRM_ILI9225=m CONFIG_TINYDRM_ILI9341=m @@ -6249,6 +6366,8 @@ CONFIG_TINYDRM_ST7735R=m CONFIG_DRM_XEN=y CONFIG_DRM_XEN_FRONTEND=m CONFIG_DRM_VBOXVIDEO=m +CONFIG_DRM_GUD=m +CONFIG_DRM_HYPERV=m # CONFIG_DRM_LEGACY is not set CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y @@ -6263,11 +6382,11 @@ CONFIG_FB_BOOT_VESA_SUPPORT=y CONFIG_FB_CFB_FILLRECT=y CONFIG_FB_CFB_COPYAREA=y CONFIG_FB_CFB_IMAGEBLIT=y -CONFIG_FB_SYS_FILLRECT=m -CONFIG_FB_SYS_COPYAREA=m -CONFIG_FB_SYS_IMAGEBLIT=m +CONFIG_FB_SYS_FILLRECT=y +CONFIG_FB_SYS_COPYAREA=y +CONFIG_FB_SYS_IMAGEBLIT=y # CONFIG_FB_FOREIGN_ENDIAN is not set -CONFIG_FB_SYS_FOPS=m +CONFIG_FB_SYS_FOPS=y CONFIG_FB_DEFERRED_IO=y CONFIG_FB_MODE_HELPERS=y CONFIG_FB_TILEBLITTING=y @@ -6282,7 +6401,7 @@ CONFIG_FB_TILEBLITTING=y # CONFIG_FB_ASILIANT is not set # CONFIG_FB_IMSTT is not set # CONFIG_FB_VGA16 is not set -CONFIG_FB_UVESA=m +# CONFIG_FB_UVESA is not set CONFIG_FB_VESA=y CONFIG_FB_EFI=y # CONFIG_FB_N411 is not set @@ -6315,11 +6434,11 @@ CONFIG_FB_EFI=y # CONFIG_FB_UDL is not set # CONFIG_FB_IBM_GXT4500 is not set # CONFIG_FB_VIRTUAL is not set -CONFIG_XEN_FBDEV_FRONTEND=m +# CONFIG_XEN_FBDEV_FRONTEND is not set # CONFIG_FB_METRONOME is not set # CONFIG_FB_MB862XX is not set -CONFIG_FB_HYPERV=m -CONFIG_FB_SIMPLE=y +# CONFIG_FB_HYPERV is not set +# CONFIG_FB_SSD1307 is not set # CONFIG_FB_SM712 is not set # end of Frame buffer Devices @@ -6348,6 +6467,7 @@ CONFIG_BACKLIGHT_DA9052=m CONFIG_BACKLIGHT_MAX8925=m CONFIG_BACKLIGHT_APPLE=m CONFIG_BACKLIGHT_QCOM_WLED=m +CONFIG_BACKLIGHT_RT4831=m CONFIG_BACKLIGHT_SAHARA=m CONFIG_BACKLIGHT_WM831X=m CONFIG_BACKLIGHT_ADP5520=m @@ -6423,6 +6543,7 @@ CONFIG_SND_DEBUG=y # CONFIG_SND_JACK_INJECTION_DEBUG is not set CONFIG_SND_VMASTER=y CONFIG_SND_DMA_SGBUF=y +CONFIG_SND_CTL_LED=m CONFIG_SND_SEQUENCER=m CONFIG_SND_SEQ_DUMMY=m CONFIG_SND_SEQUENCER_OSS=m @@ -6540,6 +6661,7 @@ CONFIG_SND_HDA_CODEC_SIGMATEL=m CONFIG_SND_HDA_CODEC_VIA=m CONFIG_SND_HDA_CODEC_HDMI=m CONFIG_SND_HDA_CODEC_CIRRUS=m +CONFIG_SND_HDA_CODEC_CS8409=m CONFIG_SND_HDA_CODEC_CONEXANT=m CONFIG_SND_HDA_CODEC_CA0110=m CONFIG_SND_HDA_CODEC_CA0132=m @@ -6560,7 +6682,7 @@ CONFIG_SND_HDA_PREALLOC_SIZE=0 CONFIG_SND_INTEL_NHLT=y CONFIG_SND_INTEL_DSP_CONFIG=m CONFIG_SND_INTEL_SOUNDWIRE_ACPI=m -CONFIG_SND_INTEL_BYT_PREFER_SOF=y +# CONFIG_SND_INTEL_BYT_PREFER_SOF is not set CONFIG_SND_SPI=y CONFIG_SND_USB=y CONFIG_SND_USB_AUDIO=m @@ -6608,6 +6730,7 @@ CONFIG_SND_SOC_AMD_ACP3x=m CONFIG_SND_SOC_AMD_RV_RT5682_MACH=m CONFIG_SND_SOC_AMD_RENOIR=m CONFIG_SND_SOC_AMD_RENOIR_MACH=m +CONFIG_SND_SOC_AMD_ACP5x=m CONFIG_SND_ATMEL_SOC=m # CONFIG_SND_BCM63XX_I2S_WHISTLER is not set CONFIG_SND_DESIGNWARE_I2S=m @@ -6628,6 +6751,7 @@ CONFIG_SND_DESIGNWARE_PCM=y # CONFIG_SND_SOC_FSL_ESAI is not set # CONFIG_SND_SOC_FSL_MICFIL is not set CONFIG_SND_SOC_FSL_XCVR=m +CONFIG_SND_SOC_FSL_RPMSG=m # CONFIG_SND_SOC_IMX_AUDMUX is not set # end of SoC Audio for Freescale CPUs @@ -6661,6 +6785,8 @@ CONFIG_SND_SOC_INTEL_SKYLAKE_COMMON=m CONFIG_SND_SOC_ACPI_INTEL_MATCH=m CONFIG_SND_SOC_INTEL_MACH=y CONFIG_SND_SOC_INTEL_USER_FRIENDLY_LONG_NAMES=y +CONFIG_SND_SOC_INTEL_HDA_DSP_COMMON=m +CONFIG_SND_SOC_INTEL_SOF_MAXIM_COMMON=m CONFIG_SND_SOC_INTEL_HASWELL_MACH=m CONFIG_SND_SOC_INTEL_BDW_RT5650_MACH=m CONFIG_SND_SOC_INTEL_BDW_RT5677_MACH=m @@ -6693,6 +6819,7 @@ CONFIG_SND_SOC_INTEL_GLK_DA7219_MAX98357A_MACH=m CONFIG_SND_SOC_INTEL_GLK_RT5682_MAX98357A_MACH=m CONFIG_SND_SOC_INTEL_SKL_HDA_DSP_GENERIC_MACH=m CONFIG_SND_SOC_INTEL_SOF_RT5682_MACH=m +CONFIG_SND_SOC_INTEL_SOF_CS42L42_MACH=m CONFIG_SND_SOC_INTEL_SOF_PCM512x_MACH=m CONFIG_SND_SOC_INTEL_CML_LP_DA7219_MAX98357A_MACH=m CONFIG_SND_SOC_INTEL_SOF_CML_RT1011_RT5682_MACH=m @@ -6732,7 +6859,6 @@ CONFIG_SND_SOC_SOF_ALDERLAKE=m CONFIG_SND_SOC_SOF_HDA_COMMON=m CONFIG_SND_SOC_SOF_HDA_LINK=y CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC=y -# CONFIG_SND_SOC_SOF_HDA_ALWAYS_ENABLE_DMI_L1 is not set CONFIG_SND_SOC_SOF_HDA_LINK_BASELINE=m CONFIG_SND_SOC_SOF_HDA=m CONFIG_SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE=m @@ -6818,6 +6944,7 @@ CONFIG_SND_SOC_ES8328_SPI=m CONFIG_SND_SOC_GTM601=m CONFIG_SND_SOC_HDAC_HDMI=m CONFIG_SND_SOC_HDAC_HDA=m +CONFIG_SND_SOC_ICS43432=m CONFIG_SND_SOC_INNO_RK3036=m CONFIG_SND_SOC_MAX98088=m CONFIG_SND_SOC_MAX98090=m @@ -6857,8 +6984,10 @@ CONFIG_SND_SOC_RT286=m CONFIG_SND_SOC_RT298=m CONFIG_SND_SOC_RT1011=m CONFIG_SND_SOC_RT1015=m +CONFIG_SND_SOC_RT1015P=m CONFIG_SND_SOC_RT1308=m CONFIG_SND_SOC_RT1308_SDW=m +CONFIG_SND_SOC_RT1316_SDW=m CONFIG_SND_SOC_RT5514=m CONFIG_SND_SOC_RT5514_SPI=m CONFIG_SND_SOC_RT5616=m @@ -6879,8 +7008,11 @@ CONFIG_SND_SOC_RT700=m CONFIG_SND_SOC_RT700_SDW=m CONFIG_SND_SOC_RT711=m CONFIG_SND_SOC_RT711_SDW=m +CONFIG_SND_SOC_RT711_SDCA_SDW=m CONFIG_SND_SOC_RT715=m CONFIG_SND_SOC_RT715_SDW=m +CONFIG_SND_SOC_RT715_SDCA_SDW=m +# CONFIG_SND_SOC_SDW_MOCKUP is not set CONFIG_SND_SOC_SGTL5000=m CONFIG_SND_SOC_SI476X=m CONFIG_SND_SOC_SIGMADSP=m @@ -6890,6 +7022,7 @@ CONFIG_SND_SOC_SIMPLE_AMPLIFIER=m CONFIG_SND_SOC_SIMPLE_MUX=m CONFIG_SND_SOC_SPDIF=m CONFIG_SND_SOC_SSM2305=m +CONFIG_SND_SOC_SSM2518=m CONFIG_SND_SOC_SSM2602=m CONFIG_SND_SOC_SSM2602_SPI=m CONFIG_SND_SOC_SSM2602_I2C=m @@ -6907,6 +7040,7 @@ CONFIG_SND_SOC_TAS5720=m CONFIG_SND_SOC_TAS6424=m CONFIG_SND_SOC_TDA7419=m CONFIG_SND_SOC_TFA9879=m +CONFIG_SND_SOC_TFA989X=m CONFIG_SND_SOC_TLV320AIC23=m CONFIG_SND_SOC_TLV320AIC23_I2C=m CONFIG_SND_SOC_TLV320AIC23_SPI=m @@ -6915,13 +7049,18 @@ CONFIG_SND_SOC_TLV320AIC32X4=m CONFIG_SND_SOC_TLV320AIC32X4_I2C=m CONFIG_SND_SOC_TLV320AIC32X4_SPI=m CONFIG_SND_SOC_TLV320AIC3X=m +CONFIG_SND_SOC_TLV320AIC3X_I2C=m +CONFIG_SND_SOC_TLV320AIC3X_SPI=m CONFIG_SND_SOC_TLV320ADCX140=m CONFIG_SND_SOC_TS3A227E=m CONFIG_SND_SOC_TSCS42XX=m CONFIG_SND_SOC_TSCS454=m CONFIG_SND_SOC_UDA1334=m CONFIG_SND_SOC_WCD9335=m +CONFIG_SND_SOC_WCD_MBHC=m CONFIG_SND_SOC_WCD934X=m +CONFIG_SND_SOC_WCD938X=m +CONFIG_SND_SOC_WCD938X_SDW=m CONFIG_SND_SOC_WM5102=m CONFIG_SND_SOC_WM8510=m CONFIG_SND_SOC_WM8523=m @@ -6949,7 +7088,6 @@ CONFIG_SND_SOC_WM8978=m CONFIG_SND_SOC_WM8985=m CONFIG_SND_SOC_WSA881X=m CONFIG_SND_SOC_ZL38060=m -CONFIG_SND_SOC_ZX_AUD96P22=m CONFIG_SND_SOC_MAX9759=m CONFIG_SND_SOC_MT6351=m CONFIG_SND_SOC_MT6358=m @@ -6973,6 +7111,7 @@ CONFIG_SND_X86=y CONFIG_HDMI_LPE_AUDIO=m CONFIG_SND_SYNTH_EMUX=m CONFIG_SND_XEN_FRONTEND=m +CONFIG_SND_VIRTIO=m CONFIG_AC97_BUS=m # @@ -7015,6 +7154,7 @@ CONFIG_HID_ELAN=m CONFIG_HID_ELECOM=m CONFIG_HID_ELO=m CONFIG_HID_EZKEY=m +CONFIG_HID_FT260=m CONFIG_HID_GEMBIRD=m CONFIG_HID_GFRM=m CONFIG_HID_GLORIOUS=m @@ -7072,6 +7212,7 @@ CONFIG_HID_RETRODE=m CONFIG_HID_ROCCAT=m CONFIG_HID_SAITEK=m CONFIG_HID_SAMSUNG=m +CONFIG_HID_SEMITEK=m CONFIG_HID_SONY=m CONFIG_SONY_FF=y CONFIG_HID_SPEEDLINK=m @@ -7131,6 +7272,15 @@ CONFIG_INTEL_ISH_FIRMWARE_DOWNLOADER=m # CONFIG_AMD_SFH_HID=m # end of AMD SFH HID Support + +# +# Surface System Aggregator Module HID support +# +CONFIG_SURFACE_HID=m +CONFIG_SURFACE_KBD=m +# end of Surface System Aggregator Module HID support + +CONFIG_SURFACE_HID_CORE=m # end of HID support CONFIG_USB_OHCI_LITTLE_ENDIAN=y @@ -7519,8 +7669,8 @@ CONFIG_TYPEC_WCOVE=m CONFIG_TYPEC_UCSI=m CONFIG_UCSI_CCG=m CONFIG_UCSI_ACPI=m -CONFIG_TYPEC_HD3SS3220=m CONFIG_TYPEC_TPS6598X=m +CONFIG_TYPEC_HD3SS3220=m CONFIG_TYPEC_STUSB160X=m # @@ -7603,12 +7753,10 @@ CONFIG_LEDS_BRIGHTNESS_HW_CHANGED=y # CONFIG_LEDS_88PM860X=m CONFIG_LEDS_APU=m -CONFIG_LEDS_AS3645A=m CONFIG_LEDS_LM3530=m CONFIG_LEDS_LM3532=m CONFIG_LEDS_LM3533=m CONFIG_LEDS_LM3642=m -CONFIG_LEDS_LM3601X=m CONFIG_LEDS_MT6323=m CONFIG_LEDS_PCA9532=m CONFIG_LEDS_PCA9532_GPIO=y @@ -7630,6 +7778,7 @@ CONFIG_LEDS_PWM=m CONFIG_LEDS_REGULATOR=m CONFIG_LEDS_BD2802=m CONFIG_LEDS_INTEL_SS4200=m +CONFIG_LEDS_LT3593=m CONFIG_LEDS_ADP5520=m CONFIG_LEDS_MC13783=m CONFIG_LEDS_TCA6507=m @@ -7649,12 +7798,14 @@ CONFIG_LEDS_NIC78BX=m CONFIG_LEDS_TI_LMU_COMMON=m CONFIG_LEDS_LM36274=m CONFIG_LEDS_TPS6105X=m -CONFIG_LEDS_SGM3140=m # # Flash and Torch LED drivers # +CONFIG_LEDS_AS3645A=m +CONFIG_LEDS_LM3601X=m CONFIG_LEDS_RT8515=m +CONFIG_LEDS_SGM3140=m # # LED Triggers @@ -7681,11 +7832,6 @@ CONFIG_LEDS_TRIGGER_NETDEV=m CONFIG_LEDS_TRIGGER_PATTERN=m CONFIG_LEDS_TRIGGER_AUDIO=m CONFIG_LEDS_TRIGGER_TTY=m - -# -# LED Blink -# -CONFIG_LEDS_BLINK=y CONFIG_ACCESSIBILITY=y CONFIG_A11Y_BRAILLE_CONSOLE=y @@ -7720,7 +7866,7 @@ CONFIG_INFINIBAND_QIB=m CONFIG_INFINIBAND_QIB_DCA=y CONFIG_INFINIBAND_CXGB4=m CONFIG_INFINIBAND_EFA=m -CONFIG_INFINIBAND_I40IW=m +CONFIG_INFINIBAND_IRDMA=m CONFIG_MLX4_INFINIBAND=m CONFIG_MLX5_INFINIBAND=m CONFIG_INFINIBAND_OCRDMA=m @@ -7834,7 +7980,6 @@ CONFIG_RTC_DRV_EM3027=m CONFIG_RTC_DRV_RV3028=m CONFIG_RTC_DRV_RV3032=m CONFIG_RTC_DRV_RV8803=m -CONFIG_RTC_DRV_S5M=m CONFIG_RTC_DRV_SD3078=m # @@ -7909,6 +8054,7 @@ CONFIG_RTC_DRV_MT6397=m # HID Sensor RTC drivers # CONFIG_RTC_DRV_HID_SENSOR_TIME=m +CONFIG_RTC_DRV_GOLDFISH=m CONFIG_RTC_DRV_WILCO_EC=m CONFIG_DMADEVICES=y # CONFIG_DMADEVICES_DEBUG is not set @@ -7921,11 +8067,14 @@ CONFIG_DMA_VIRTUAL_CHANNELS=y CONFIG_DMA_ACPI=y CONFIG_ALTERA_MSGDMA=m CONFIG_INTEL_IDMA64=m +CONFIG_INTEL_IDXD_BUS=m CONFIG_INTEL_IDXD=m +# CONFIG_INTEL_IDXD_COMPAT is not set CONFIG_INTEL_IDXD_SVM=y +CONFIG_INTEL_IDXD_PERFMON=y CONFIG_INTEL_IOATDMA=m CONFIG_PLX_DMA=m -CONFIG_XILINX_ZYNQMP_DPDMA=m +CONFIG_AMD_PTDMA=m CONFIG_QCOM_HIDMA_MGMT=m CONFIG_QCOM_HIDMA=m CONFIG_DW_DMAC_CORE=y @@ -7954,30 +8103,14 @@ CONFIG_UDMABUF=y # CONFIG_DMABUF_DEBUG is not set # CONFIG_DMABUF_SELFTESTS is not set CONFIG_DMABUF_HEAPS=y +CONFIG_DMABUF_SYSFS_STATS=y CONFIG_DMABUF_HEAPS_SYSTEM=y CONFIG_DMABUF_HEAPS_CMA=y # end of DMABUF options CONFIG_DCA=m -CONFIG_AUXDISPLAY=y -CONFIG_CHARLCD=m -CONFIG_HD44780_COMMON=m -CONFIG_HD44780=m -CONFIG_KS0108=m -CONFIG_KS0108_PORT=0x378 -CONFIG_KS0108_DELAY=2 -CONFIG_CFAG12864B=m -CONFIG_CFAG12864B_RATE=20 -CONFIG_IMG_ASCII_LCD=m -CONFIG_LCD2S=m -CONFIG_PARPORT_PANEL=m -CONFIG_PANEL_PARPORT=0 -CONFIG_PANEL_PROFILE=5 -# CONFIG_PANEL_CHANGE_MESSAGE is not set -# CONFIG_CHARLCD_BL_OFF is not set -# CONFIG_CHARLCD_BL_ON is not set -CONFIG_CHARLCD_BL_FLASH=y -CONFIG_PANEL=m +# CONFIG_AUXDISPLAY is not set +# CONFIG_PANEL is not set CONFIG_UIO=m CONFIG_UIO_CIF=m CONFIG_UIO_PDRV_GENIRQ=m @@ -7989,23 +8122,25 @@ CONFIG_UIO_NETX=m CONFIG_UIO_PRUSS=m CONFIG_UIO_MF624=m CONFIG_UIO_HV_GENERIC=m +CONFIG_UIO_DFL=m +CONFIG_VFIO=m CONFIG_VFIO_IOMMU_TYPE1=m CONFIG_VFIO_VIRQFD=m -CONFIG_VFIO=m # CONFIG_VFIO_NOIOMMU is not set -CONFIG_VFIO_PCI=m -CONFIG_VFIO_PCI_VGA=y +CONFIG_VFIO_PCI_CORE=m CONFIG_VFIO_PCI_MMAP=y CONFIG_VFIO_PCI_INTX=y +CONFIG_VFIO_PCI=m +CONFIG_VFIO_PCI_VGA=y CONFIG_VFIO_PCI_IGD=y CONFIG_VFIO_MDEV=m -CONFIG_VFIO_MDEV_DEVICE=m CONFIG_IRQ_BYPASS_MANAGER=m CONFIG_VIRT_DRIVERS=y CONFIG_VBOXGUEST=m CONFIG_NITRO_ENCLAVES=m CONFIG_ACRN_HSM=m CONFIG_VIRTIO=y +CONFIG_ARCH_HAS_RESTRICTED_VIRTIO_MEMORY_ACCESS=y CONFIG_VIRTIO_PCI_LIB=m CONFIG_VIRTIO_MENU=y CONFIG_VIRTIO_PCI=m @@ -8021,9 +8156,12 @@ CONFIG_VIRTIO_DMA_SHARED_BUFFER=m CONFIG_VDPA=m CONFIG_VDPA_SIM=m CONFIG_VDPA_SIM_NET=m +CONFIG_VDPA_SIM_BLOCK=m +CONFIG_VDPA_USER=m CONFIG_IFCVF=m CONFIG_MLX5_VDPA=y CONFIG_MLX5_VDPA_NET=m +CONFIG_VP_VDPA=m CONFIG_VHOST_IOTLB=m CONFIG_VHOST_RING=m CONFIG_VHOST=m @@ -8079,9 +8217,9 @@ CONFIG_XEN_UNPOPULATED_ALLOC=y # end of Xen driver support # CONFIG_GREYBUS is not set +# CONFIG_COMEDI is not set CONFIG_STAGING=y CONFIG_PRISM2_USB=m -# CONFIG_COMEDI is not set CONFIG_RTL8192U=m CONFIG_RTLLIB=m CONFIG_RTLLIB_CRYPTO_CCMP=m @@ -8125,7 +8263,6 @@ CONFIG_ADT7316_I2C=m # # Capacitance to digital converters # -CONFIG_AD7150=m CONFIG_AD7746=m # end of Capacitance to digital converters @@ -8172,6 +8309,11 @@ CONFIG_VIDEO_ATOMISP_OV5693=m CONFIG_VIDEO_ATOMISP_LM3554=m # CONFIG_VIDEO_ZORAN is not set CONFIG_VIDEO_IPU3_IMGU=m +CONFIG_DVB_AV7110_IR=y +CONFIG_DVB_AV7110=m +CONFIG_DVB_AV7110_OSD=y +CONFIG_DVB_BUDGET_PATCH=m +CONFIG_DVB_SP8870=m # # Android @@ -8190,50 +8332,32 @@ CONFIG_UNISYS_VISORHBA=m # CONFIG_FB_TFT is not set CONFIG_MOST_COMPONENTS=m CONFIG_MOST_NET=m -CONFIG_MOST_SOUND=m CONFIG_MOST_VIDEO=m CONFIG_MOST_I2C=m CONFIG_KS7010=m CONFIG_PI433=m - -# -# Gasket devices -# -CONFIG_STAGING_GASKET_FRAMEWORK=m -CONFIG_STAGING_APEX_DRIVER=m -# end of Gasket devices - CONFIG_FIELDBUS_DEV=m -CONFIG_KPC2000=y -CONFIG_KPC2000_CORE=m -CONFIG_KPC2000_SPI=m -CONFIG_KPC2000_I2C=m -CONFIG_KPC2000_DMA=m CONFIG_QLGE=m -CONFIG_WIMAX=m -CONFIG_WIMAX_DEBUG_LEVEL=8 -CONFIG_WIMAX_I2400M=m -CONFIG_WIMAX_I2400M_USB=m -CONFIG_WIMAX_I2400M_DEBUG_LEVEL=8 CONFIG_WFX=m CONFIG_X86_PLATFORM_DEVICES=y CONFIG_ACPI_WMI=m CONFIG_WMI_BMOF=m CONFIG_HUAWEI_WMI=m -CONFIG_INTEL_WMI_SBL_FW_UPDATE=m -CONFIG_INTEL_WMI_THUNDERBOLT=m CONFIG_MXM_WMI=m CONFIG_PEAQ_WMI=m CONFIG_XIAOMI_WMI=m +CONFIG_GIGABYTE_WMI=m CONFIG_ACERHDF=m CONFIG_ACER_WIRELESS=m CONFIG_ACER_WMI=m CONFIG_AMD_PMC=m +CONFIG_ADV_SWBUTTON=m CONFIG_APPLE_GMUX=m CONFIG_ASUS_LAPTOP=m CONFIG_ASUS_WIRELESS=m CONFIG_ASUS_WMI=m CONFIG_ASUS_NB_WMI=m +CONFIG_MERAKI_MX100=m CONFIG_EEEPC_LAPTOP=m CONFIG_EEEPC_WMI=m CONFIG_X86_PLATFORM_DRIVERS_DELL=y @@ -8247,6 +8371,7 @@ CONFIG_DELL_SMBIOS_WMI=y CONFIG_DELL_SMBIOS_SMM=y CONFIG_DELL_SMO8800=m CONFIG_DELL_WMI=m +CONFIG_DELL_WMI_PRIVACY=y CONFIG_DELL_WMI_AIO=m CONFIG_DELL_WMI_DESCRIPTOR=m CONFIG_DELL_WMI_LED=m @@ -8256,7 +8381,7 @@ CONFIG_FUJITSU_LAPTOP=m CONFIG_FUJITSU_TABLET=m CONFIG_GPD_POCKET_FAN=m CONFIG_HP_ACCEL=m -CONFIG_HP_WIRELESS=m +CONFIG_WIRELESS_HOTKEY=m CONFIG_HP_WMI=m CONFIG_IBM_RTL=m CONFIG_IDEAPAD_LAPTOP=m @@ -8268,13 +8393,39 @@ CONFIG_THINKPAD_ACPI_ALSA_SUPPORT=y # CONFIG_THINKPAD_ACPI_UNSAFE_LEDS is not set CONFIG_THINKPAD_ACPI_VIDEO=y CONFIG_THINKPAD_ACPI_HOTKEY_POLL=y +CONFIG_THINKPAD_LMI=m +CONFIG_INTEL_ATOMISP2_PDX86=y CONFIG_INTEL_ATOMISP2_LED=m +CONFIG_INTEL_SAR_INT1092=m CONFIG_INTEL_CHT_INT33FE=m +CONFIG_INTEL_SKL_INT3472=m +CONFIG_INTEL_PMC_CORE=y +CONFIG_INTEL_PMT_CLASS=m +CONFIG_INTEL_PMT_TELEMETRY=m +CONFIG_INTEL_PMT_CRASHLOG=m + +# +# Intel Speed Select Technology interface support +# +CONFIG_INTEL_SPEED_SELECT_INTERFACE=m +# end of Intel Speed Select Technology interface support + +CONFIG_INTEL_TELEMETRY=m +CONFIG_INTEL_WMI=y +CONFIG_INTEL_WMI_SBL_FW_UPDATE=m +CONFIG_INTEL_WMI_THUNDERBOLT=m CONFIG_INTEL_HID_EVENT=m +CONFIG_INTEL_VBTN=m CONFIG_INTEL_INT0002_VGPIO=m -CONFIG_INTEL_MENLOW=m CONFIG_INTEL_OAKTRAIL=m -CONFIG_INTEL_VBTN=m +CONFIG_INTEL_BXTWC_PMIC_TMU=m +CONFIG_INTEL_CHTDC_TI_PWRBTN=m +CONFIG_INTEL_MRFLD_PWRBTN=m +CONFIG_INTEL_PUNIT_IPC=m +CONFIG_INTEL_RST=m +CONFIG_INTEL_SMARTCONNECT=m +CONFIG_INTEL_TURBO_MAX_3=y +CONFIG_INTEL_UNCORE_FREQ_CONTROL=m CONFIG_MSI_LAPTOP=m CONFIG_MSI_WMI=m CONFIG_PCENGINES_APU2=m @@ -8295,32 +8446,13 @@ CONFIG_TOPSTAR_LAPTOP=m CONFIG_I2C_MULTI_INSTANTIATE=m CONFIG_MLX_PLATFORM=m CONFIG_TOUCHSCREEN_DMI=y +CONFIG_FW_ATTR_CLASS=m CONFIG_INTEL_IPS=m -CONFIG_INTEL_RST=m -CONFIG_INTEL_SMARTCONNECT=m - -# -# Intel Speed Select Technology interface support -# -CONFIG_INTEL_SPEED_SELECT_INTERFACE=m -# end of Intel Speed Select Technology interface support - -CONFIG_INTEL_TURBO_MAX_3=y -CONFIG_INTEL_UNCORE_FREQ_CONTROL=m -CONFIG_INTEL_BXTWC_PMIC_TMU=m -CONFIG_INTEL_CHTDC_TI_PWRBTN=m -CONFIG_INTEL_MRFLD_PWRBTN=m -CONFIG_INTEL_PMC_CORE=y -CONFIG_INTEL_PMT_CLASS=m -CONFIG_INTEL_PMT_TELEMETRY=m -CONFIG_INTEL_PMT_CRASHLOG=m -CONFIG_INTEL_PUNIT_IPC=m CONFIG_INTEL_SCU_IPC=y CONFIG_INTEL_SCU=y CONFIG_INTEL_SCU_PCI=y CONFIG_INTEL_SCU_PLATFORM=m CONFIG_INTEL_SCU_IPC_UTIL=m -CONFIG_INTEL_TELEMETRY=m CONFIG_PMC_ATOM=y CONFIG_CHROME_PLATFORMS=y CONFIG_CHROMEOS_LAPTOP=m @@ -8354,24 +8486,34 @@ CONFIG_SURFACE_3_BUTTON=m CONFIG_SURFACE_3_POWER_OPREGION=m CONFIG_SURFACE_ACPI_NOTIFY=m CONFIG_SURFACE_AGGREGATOR_CDEV=m +CONFIG_SURFACE_AGGREGATOR_REGISTRY=m +CONFIG_SURFACE_DTX=m CONFIG_SURFACE_GPE=m CONFIG_SURFACE_HOTPLUG=m +CONFIG_SURFACE_PLATFORM_PROFILE=m CONFIG_SURFACE_PRO3_BUTTON=m CONFIG_SURFACE_AGGREGATOR=m CONFIG_SURFACE_AGGREGATOR_BUS=y # CONFIG_SURFACE_AGGREGATOR_ERROR_INJECTION is not set CONFIG_HAVE_CLK=y -CONFIG_CLKDEV_LOOKUP=y CONFIG_HAVE_CLK_PREPARE=y CONFIG_COMMON_CLK=y CONFIG_COMMON_CLK_WM831X=m + +# +# Clock driver for ARM Reference designs +# +# CONFIG_ICST is not set +# CONFIG_CLK_SP810 is not set +# end of Clock driver for ARM Reference designs + +CONFIG_LMK04832=m CONFIG_COMMON_CLK_MAX9485=m CONFIG_COMMON_CLK_SI5341=m CONFIG_COMMON_CLK_SI5351=m CONFIG_COMMON_CLK_SI544=m CONFIG_COMMON_CLK_CDCE706=m CONFIG_COMMON_CLK_CS2000_CP=m -CONFIG_COMMON_CLK_S2MPS11=m CONFIG_CLK_TWL6040=m CONFIG_COMMON_CLK_PALMAS=m CONFIG_COMMON_CLK_PWM=m @@ -8401,8 +8543,11 @@ CONFIG_IOMMU_IO_PGTABLE=y # end of Generic IOMMU Pagetable Support # CONFIG_IOMMU_DEBUGFS is not set +# CONFIG_IOMMU_DEFAULT_DMA_STRICT is not set +CONFIG_IOMMU_DEFAULT_DMA_LAZY=y # CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set CONFIG_IOMMU_DMA=y +CONFIG_IOMMU_SVA_LIB=y CONFIG_AMD_IOMMU=y CONFIG_AMD_IOMMU_V2=y CONFIG_DMAR_TABLE=y @@ -8413,6 +8558,7 @@ CONFIG_INTEL_IOMMU_FLOPPY_WA=y CONFIG_INTEL_IOMMU_SCALABLE_MODE_DEFAULT_ON=y CONFIG_IRQ_REMAP=y CONFIG_HYPERV_IOMMU=y +CONFIG_VIRTIO_IOMMU=m # # Remoteproc drivers @@ -8506,7 +8652,6 @@ CONFIG_EXTCON=y # Extcon Device Drivers # CONFIG_EXTCON_ADC_JACK=m -CONFIG_EXTCON_ARIZONA=m CONFIG_EXTCON_AXP288=m CONFIG_EXTCON_FSA9480=m CONFIG_EXTCON_GPIO=m @@ -8557,10 +8702,15 @@ CONFIG_BMA400_SPI=m CONFIG_BMC150_ACCEL=m CONFIG_BMC150_ACCEL_I2C=m CONFIG_BMC150_ACCEL_SPI=m +CONFIG_BMI088_ACCEL=m +CONFIG_BMI088_ACCEL_SPI=m CONFIG_DA280=m CONFIG_DA311=m CONFIG_DMARD09=m CONFIG_DMARD10=m +CONFIG_FXLS8962AF=m +CONFIG_FXLS8962AF_I2C=m +CONFIG_FXLS8962AF_SPI=m CONFIG_HID_SENSOR_ACCEL_3D=m CONFIG_IIO_CROS_EC_ACCEL_LEGACY=m CONFIG_IIO_ST_ACCEL_3AXIS=m @@ -8582,6 +8732,7 @@ CONFIG_MMA9553=m CONFIG_MXC4005=m CONFIG_MXC6255=m CONFIG_SCA3000=m +CONFIG_SCA3300=m CONFIG_STK8312=m CONFIG_STK8BA50=m # end of Accelerometers @@ -8647,8 +8798,10 @@ CONFIG_TI_ADC128S052=m CONFIG_TI_ADC161S626=m CONFIG_TI_ADS1015=m CONFIG_TI_ADS7950=m +CONFIG_TI_ADS131E08=m CONFIG_TI_AM335X_ADC=m CONFIG_TI_TLC4541=m +CONFIG_TI_TSC2046=m CONFIG_TWL4030_MADC=m CONFIG_TWL6030_GPADC=m CONFIG_VIPERBOARD_ADC=m @@ -8667,6 +8820,12 @@ CONFIG_AD8366=m CONFIG_HMC425=m # end of Amplifiers +# +# Capacitance to digital converters +# +CONFIG_AD7150=m +# end of Capacitance to digital converters + # # Chemical Sensors # @@ -8682,7 +8841,10 @@ CONFIG_SCD30_CORE=m CONFIG_SCD30_I2C=m CONFIG_SCD30_SERIAL=m CONFIG_SENSIRION_SGP30=m +CONFIG_SENSIRION_SGP40=m CONFIG_SPS30=m +CONFIG_SPS30_I2C=m +CONFIG_SPS30_SERIAL=m CONFIG_VZ89X=m # end of Chemical Sensors @@ -8699,6 +8861,11 @@ CONFIG_HID_SENSOR_IIO_TRIGGER=m CONFIG_IIO_MS_SENSORS_I2C=m +# +# IIO SCMI Sensors +# +# end of IIO SCMI Sensors + # # SSP Sensor Common # @@ -8850,6 +9017,9 @@ CONFIG_INV_MPU6050_SPI=m CONFIG_IIO_ST_LSM6DSX=m CONFIG_IIO_ST_LSM6DSX_I2C=m CONFIG_IIO_ST_LSM6DSX_SPI=m +CONFIG_IIO_ST_LSM9DS0=m +CONFIG_IIO_ST_LSM9DS0_I2C=m +CONFIG_IIO_ST_LSM9DS0_SPI=m # end of Inertial measurement units CONFIG_IIO_ADIS_LIB=m @@ -8901,6 +9071,7 @@ CONFIG_TCS3414=m CONFIG_TCS3472=m CONFIG_SENSORS_TSL2563=m CONFIG_TSL2583=m +CONFIG_TSL2591=m CONFIG_TSL2772=m CONFIG_TSL4531=m CONFIG_US5182D=m @@ -8966,6 +9137,7 @@ CONFIG_HID_SENSOR_CUSTOM_INTEL_HINGE=m # # Digital potentiometers # +CONFIG_AD5110=m CONFIG_AD5272=m CONFIG_DS1803=m CONFIG_MAX5432=m @@ -9024,6 +9196,7 @@ CONFIG_AS3935=m # # Proximity and distance sensors # +CONFIG_CROS_EC_MKBP_PROXIMITY=m CONFIG_ISL29501=m CONFIG_LIDAR_LITE_V2=m CONFIG_MB1232=m @@ -9055,6 +9228,7 @@ CONFIG_MLX90614=m CONFIG_MLX90632=m CONFIG_TMP006=m CONFIG_TMP007=m +CONFIG_TMP117=m CONFIG_TSYS01=m CONFIG_TSYS02D=m CONFIG_MAX31856=m @@ -9098,7 +9272,6 @@ CONFIG_IPACK_BUS=m CONFIG_BOARD_TPCI200=m CONFIG_SERIAL_IPOCTAL=m CONFIG_RESET_CONTROLLER=y -CONFIG_RESET_BRCMSTB_RESCAL=y CONFIG_RESET_TI_SYSCON=m # @@ -9106,6 +9279,7 @@ CONFIG_RESET_TI_SYSCON=m # CONFIG_GENERIC_PHY=y CONFIG_USB_LGM_PHY=m +CONFIG_PHY_CAN_TRANSCEIVER=m CONFIG_BCM_KONA_USB2_PHY=m CONFIG_PHY_PXA_28NM_HSIC=m CONFIG_PHY_PXA_28NM_USB2=m @@ -9231,9 +9405,12 @@ CONFIG_SLIMBUS=m CONFIG_SLIM_QCOM_CTRL=m CONFIG_INTERCONNECT=y CONFIG_COUNTER=m +CONFIG_INTERRUPT_CNT=m +CONFIG_INTEL_QEP=m CONFIG_MOST=m CONFIG_MOST_USB_HDM=m CONFIG_MOST_CDEV=m +CONFIG_MOST_SND=m # end of Device Drivers # @@ -9297,10 +9474,11 @@ CONFIG_F2FS_CHECK_FS=y # CONFIG_F2FS_FAULT_INJECTION is not set CONFIG_F2FS_FS_COMPRESSION=y CONFIG_F2FS_FS_LZO=y +CONFIG_F2FS_FS_LZORLE=y CONFIG_F2FS_FS_LZ4=y CONFIG_F2FS_FS_LZ4HC=y CONFIG_F2FS_FS_ZSTD=y -CONFIG_F2FS_FS_LZORLE=y +CONFIG_F2FS_IOSTAT=y CONFIG_ZONEFS_FS=m CONFIG_FS_DAX=y CONFIG_FS_DAX_PMD=y @@ -9308,7 +9486,6 @@ CONFIG_FS_POSIX_ACL=y CONFIG_EXPORTFS=y CONFIG_EXPORTFS_BLOCK_OPS=y CONFIG_FILE_LOCKING=y -# CONFIG_MANDATORY_FILE_LOCKING is not set CONFIG_FS_ENCRYPTION=y CONFIG_FS_ENCRYPTION_ALGS=m CONFIG_FS_ENCRYPTION_INLINE_CRYPT=y @@ -9344,14 +9521,13 @@ CONFIG_OVERLAY_FS_METACOPY=y # # Caches # +CONFIG_NETFS_SUPPORT=m +CONFIG_NETFS_STATS=y CONFIG_FSCACHE=m CONFIG_FSCACHE_STATS=y -# CONFIG_FSCACHE_HISTOGRAM is not set # CONFIG_FSCACHE_DEBUG is not set -CONFIG_FSCACHE_OBJECT_LIST=y CONFIG_CACHEFILES=m # CONFIG_CACHEFILES_DEBUG is not set -# CONFIG_CACHEFILES_HISTOGRAM is not set # end of Caches # @@ -9375,6 +9551,10 @@ CONFIG_FAT_DEFAULT_UTF8=y CONFIG_EXFAT_FS=m CONFIG_EXFAT_DEFAULT_IOCHARSET="utf8" # CONFIG_NTFS_FS is not set +CONFIG_NTFS3_FS=m +# CONFIG_NTFS3_64BIT_CLUSTER is not set +CONFIG_NTFS3_LZX_XPRESS=y +CONFIG_NTFS3_FS_POSIX_ACL=y # end of DOS/FAT/EXFAT/NT Filesystems # @@ -9397,6 +9577,8 @@ CONFIG_TMPFS_XATTR=y CONFIG_TMPFS_INODE64=y CONFIG_HUGETLBFS=y CONFIG_HUGETLB_PAGE=y +CONFIG_HUGETLB_PAGE_FREE_VMEMMAP=y +CONFIG_HUGETLB_PAGE_FREE_VMEMMAP_DEFAULT_ON=y CONFIG_MEMFD_CREATE=y CONFIG_ARCH_HAS_GIGANTIC_PAGE=y CONFIG_CONFIGFS_FS=y @@ -9498,7 +9680,6 @@ CONFIG_EROFS_FS_XATTR=y CONFIG_EROFS_FS_POSIX_ACL=y CONFIG_EROFS_FS_SECURITY=y CONFIG_EROFS_FS_ZIP=y -CONFIG_EROFS_FS_CLUSTER_PAGE_LIMIT=2 CONFIG_VBOXSF_FS=m CONFIG_NETWORK_FILESYSTEMS=y CONFIG_NFS_FS=m @@ -9537,7 +9718,7 @@ CONFIG_LOCKD=m CONFIG_LOCKD_V4=y CONFIG_NFS_ACL_SUPPORT=m CONFIG_NFS_COMMON=y -CONFIG_NFS_V4_2_SSC_HELPER=m +CONFIG_NFS_V4_2_SSC_HELPER=y CONFIG_SUNRPC=m CONFIG_SUNRPC_GSS=m CONFIG_SUNRPC_BACKCHANNEL=y @@ -9553,7 +9734,6 @@ CONFIG_CEPH_FS_SECURITY_LABEL=y CONFIG_CIFS=m # CONFIG_CIFS_STATS2 is not set CONFIG_CIFS_ALLOW_INSECURE_LEGACY=y -# CONFIG_CIFS_WEAK_PW_HASH is not set CONFIG_CIFS_UPCALL=y CONFIG_CIFS_XATTR=y CONFIG_CIFS_POSIX=y @@ -9564,6 +9744,11 @@ CONFIG_CIFS_DFS_UPCALL=y CONFIG_CIFS_SWN_UPCALL=y # CONFIG_CIFS_SMB_DIRECT is not set CONFIG_CIFS_FSCACHE=y +CONFIG_SMB_SERVER=m +CONFIG_SMB_SERVER_SMBDIRECT=y +CONFIG_SMB_SERVER_CHECK_CAP_NET_ADMIN=y +CONFIG_SMB_SERVER_KERBEROS5=y +CONFIG_SMBFS_COMMON=m CONFIG_CODA_FS=m CONFIG_AFS_FS=m # CONFIG_AFS_DEBUG is not set @@ -9688,6 +9873,7 @@ CONFIG_SECURITY_LOCKDOWN_LSM=y CONFIG_LOCK_DOWN_KERNEL_FORCE_NONE=y # CONFIG_LOCK_DOWN_KERNEL_FORCE_INTEGRITY is not set # CONFIG_LOCK_DOWN_KERNEL_FORCE_CONFIDENTIALITY is not set +CONFIG_SECURITY_LANDLOCK=y # CONFIG_INTEGRITY is not set # CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT is not set # CONFIG_DEFAULT_SECURITY_SELINUX is not set @@ -9695,7 +9881,7 @@ CONFIG_LOCK_DOWN_KERNEL_FORCE_NONE=y # CONFIG_DEFAULT_SECURITY_TOMOYO is not set # CONFIG_DEFAULT_SECURITY_APPARMOR is not set CONFIG_DEFAULT_SECURITY_DAC=y -CONFIG_LSM="lockdown,yama" +CONFIG_LSM="landlock,lockdown,yama,bpf" # # Kernel hardening options @@ -9713,6 +9899,8 @@ CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL=y # CONFIG_GCC_PLUGIN_STACKLEAK is not set CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y # CONFIG_INIT_ON_FREE_DEFAULT_ON is not set +CONFIG_CC_HAS_ZERO_CALL_USED_REGS=y +CONFIG_ZERO_CALL_USED_REGS=y # end of Memory initialization # end of Kernel hardening options # end of Security options @@ -9738,7 +9926,7 @@ CONFIG_CRYPTO_HASH=y CONFIG_CRYPTO_HASH2=y CONFIG_CRYPTO_RNG=y CONFIG_CRYPTO_RNG2=y -CONFIG_CRYPTO_RNG_DEFAULT=m +CONFIG_CRYPTO_RNG_DEFAULT=y CONFIG_CRYPTO_AKCIPHER2=y CONFIG_CRYPTO_AKCIPHER=y CONFIG_CRYPTO_KPP2=y @@ -9763,8 +9951,9 @@ CONFIG_CRYPTO_ENGINE=m # CONFIG_CRYPTO_RSA=y CONFIG_CRYPTO_DH=y -CONFIG_CRYPTO_ECC=m +CONFIG_CRYPTO_ECC=y CONFIG_CRYPTO_ECDH=m +CONFIG_CRYPTO_ECDSA=y CONFIG_CRYPTO_ECRDSA=m CONFIG_CRYPTO_SM2=m CONFIG_CRYPTO_CURVE25519=m @@ -9868,6 +10057,8 @@ CONFIG_CRYPTO_SERPENT_SSE2_X86_64=m CONFIG_CRYPTO_SERPENT_AVX_X86_64=m CONFIG_CRYPTO_SERPENT_AVX2_X86_64=m CONFIG_CRYPTO_SM4=m +CONFIG_CRYPTO_SM4_AESNI_AVX_X86_64=m +CONFIG_CRYPTO_SM4_AESNI_AVX2_X86_64=m CONFIG_CRYPTO_TWOFISH=m CONFIG_CRYPTO_TWOFISH_COMMON=m CONFIG_CRYPTO_TWOFISH_X86_64=m @@ -9888,11 +10079,11 @@ CONFIG_CRYPTO_ZSTD=y # Random Number Generation # CONFIG_CRYPTO_ANSI_CPRNG=m -CONFIG_CRYPTO_DRBG_MENU=m +CONFIG_CRYPTO_DRBG_MENU=y CONFIG_CRYPTO_DRBG_HMAC=y CONFIG_CRYPTO_DRBG_HASH=y CONFIG_CRYPTO_DRBG_CTR=y -CONFIG_CRYPTO_DRBG=m +CONFIG_CRYPTO_DRBG=y CONFIG_CRYPTO_JITTERENTROPY=y CONFIG_CRYPTO_USER_API=m CONFIG_CRYPTO_USER_API_HASH=m @@ -9925,6 +10116,7 @@ CONFIG_CRYPTO_LIB_POLY1305_GENERIC=m CONFIG_CRYPTO_LIB_POLY1305=m CONFIG_CRYPTO_LIB_CHACHA20POLY1305=m CONFIG_CRYPTO_LIB_SHA256=y +CONFIG_CRYPTO_LIB_SM4=m CONFIG_CRYPTO_HW=y CONFIG_CRYPTO_DEV_PADLOCK=m CONFIG_CRYPTO_DEV_PADLOCK_AES=m @@ -9967,12 +10159,16 @@ CONFIG_SIGNED_PE_FILE_VERIFICATION=y # Certificates for signature checking # CONFIG_MODULE_SIG_KEY="certs/signing_key.pem" +# CONFIG_MODULE_SIG_KEY_TYPE_RSA is not set +CONFIG_MODULE_SIG_KEY_TYPE_ECDSA=y CONFIG_SYSTEM_TRUSTED_KEYRING=y CONFIG_SYSTEM_TRUSTED_KEYS="" # CONFIG_SYSTEM_EXTRA_CERTIFICATE is not set CONFIG_SECONDARY_TRUSTED_KEYRING=y CONFIG_SYSTEM_BLACKLIST_KEYRING=y CONFIG_SYSTEM_BLACKLIST_HASH_LIST="" +CONFIG_SYSTEM_REVOCATION_LIST=y +CONFIG_SYSTEM_REVOCATION_KEYS="" # end of Certificates for signature checking CONFIG_BINARY_PRINTF=y @@ -10021,7 +10217,7 @@ CONFIG_ZLIB_DEFLATE=y CONFIG_LZO_COMPRESS=y CONFIG_LZO_DECOMPRESS=y CONFIG_LZ4_COMPRESS=y -CONFIG_LZ4HC_COMPRESS=y +CONFIG_LZ4HC_COMPRESS=m CONFIG_LZ4_DECOMPRESS=y CONFIG_ZSTD_COMPRESS=y CONFIG_ZSTD_DECOMPRESS=y @@ -10119,10 +10315,10 @@ CONFIG_ARCH_STACKWALK=y CONFIG_SBITMAP=y CONFIG_PARMAN=m CONFIG_OBJAGG=m -# CONFIG_STRING_SELFTEST is not set # end of Library routines CONFIG_PLDMFW=y +CONFIG_ASN1_ENCODER=m # # Kernel hacking @@ -10133,6 +10329,7 @@ CONFIG_PLDMFW=y # CONFIG_PRINTK_TIME=y # CONFIG_PRINTK_CALLER is not set +CONFIG_STACKTRACE_BUILD_ID=y CONFIG_CONSOLE_LOGLEVEL_DEFAULT=4 CONFIG_CONSOLE_LOGLEVEL_QUIET=1 CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4 @@ -10153,6 +10350,8 @@ CONFIG_DEBUG_INFO=y # CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT is not set CONFIG_DEBUG_INFO_DWARF4=y CONFIG_DEBUG_INFO_BTF=y +CONFIG_PAHOLE_HAS_SPLIT_BTF=y +CONFIG_DEBUG_INFO_BTF_MODULES=y # CONFIG_GDB_SCRIPTS is not set CONFIG_FRAME_WARN=2048 CONFIG_STRIP_ASM_SYMS=y @@ -10224,8 +10423,7 @@ CONFIG_CC_HAS_WORKING_NOSANITIZE_ADDRESS=y # CONFIG_KASAN is not set CONFIG_HAVE_ARCH_KFENCE=y CONFIG_KFENCE=y -CONFIG_KFENCE_STATIC_KEYS=y -CONFIG_KFENCE_SAMPLE_INTERVAL=0 +CONFIG_KFENCE_SAMPLE_INTERVAL=100 CONFIG_KFENCE_NUM_OBJECTS=255 CONFIG_KFENCE_STRESS_TEST_FAULTS=0 # end of Memory Debugging @@ -10312,11 +10510,9 @@ CONFIG_DEBUG_LIST=y CONFIG_RCU_CPU_STALL_TIMEOUT=60 # CONFIG_RCU_TRACE is not set # CONFIG_RCU_EQS_DEBUG is not set -# CONFIG_RCU_STRICT_GRACE_PERIOD is not set # end of RCU Debugging # CONFIG_DEBUG_WQ_FORCE_RR_CPU is not set -# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set # CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set CONFIG_LATENCYTOP=y CONFIG_USER_STACKTRACE_SUPPORT=y @@ -10347,12 +10543,15 @@ CONFIG_FUNCTION_GRAPH_TRACER=y CONFIG_DYNAMIC_FTRACE=y CONFIG_DYNAMIC_FTRACE_WITH_REGS=y CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS=y +CONFIG_DYNAMIC_FTRACE_WITH_ARGS=y CONFIG_FUNCTION_PROFILER=y CONFIG_STACK_TRACER=y # CONFIG_IRQSOFF_TRACER is not set # CONFIG_PREEMPT_TRACER is not set CONFIG_SCHED_TRACER=y CONFIG_HWLAT_TRACER=y +CONFIG_OSNOISE_TRACER=y +CONFIG_TIMERLAT_TRACER=y CONFIG_MMIOTRACE=y CONFIG_FTRACE_SYSCALLS=y CONFIG_TRACER_SNAPSHOT=y @@ -10394,7 +10593,6 @@ CONFIG_IO_STRICT_DEVMEM=y # # x86 Debugging # -CONFIG_TRACE_IRQFLAGS_SUPPORT=y CONFIG_TRACE_IRQFLAGS_NMI_SUPPORT=y CONFIG_EARLY_PRINTK_USB=y # CONFIG_X86_VERBOSE_BOOTUP is not set @@ -10431,9 +10629,8 @@ CONFIG_CC_HAS_SANCOV_TRACE_PC=y # CONFIG_KCOV is not set CONFIG_RUNTIME_TESTING_MENU=y # CONFIG_LKDTM is not set -# CONFIG_TEST_LIST_SORT is not set # CONFIG_TEST_MIN_HEAP is not set -# CONFIG_TEST_SORT is not set +# CONFIG_TEST_DIV64 is not set # CONFIG_KPROBES_SANITY_TEST is not set # CONFIG_BACKTRACE_SELF_TEST is not set # CONFIG_RBTREE_TEST is not set @@ -10443,10 +10640,12 @@ CONFIG_RUNTIME_TESTING_MENU=y # CONFIG_ATOMIC64_SELFTEST is not set CONFIG_ASYNC_RAID6_TEST=m # CONFIG_TEST_HEXDUMP is not set +# CONFIG_STRING_SELFTEST is not set # CONFIG_TEST_STRING_HELPERS is not set # CONFIG_TEST_STRSCPY is not set # CONFIG_TEST_KSTRTOX is not set # CONFIG_TEST_PRINTF is not set +# CONFIG_TEST_SCANF is not set # CONFIG_TEST_BITMAP is not set # CONFIG_TEST_UUID is not set # CONFIG_TEST_XARRAY is not set @@ -10474,6 +10673,8 @@ CONFIG_ASYNC_RAID6_TEST=m # CONFIG_TEST_HMM is not set # CONFIG_TEST_FREE_PAGES is not set # CONFIG_TEST_FPU is not set +# CONFIG_TEST_CLOCKSOURCE_WATCHDOG is not set +CONFIG_ARCH_USE_MEMTEST=y # CONFIG_MEMTEST is not set # CONFIG_HYPERV_TESTING is not set # end of Kernel Testing and Coverage From 9913751449d1a0e061ea4574bfa49206e28edc30 Mon Sep 17 00:00:00 2001 From: Redecorating <69827514+Redecorating@users.noreply.github.com> Date: Thu, 30 Dec 2021 15:45:13 +1100 Subject: [PATCH 2/4] applesmc: Add iMacPro to applesmc_whitelist --- ...mc-Add-iMacPro-to-applesmc_whitelist.patch | 31 +++++++++++++++++++ PKGBUILD | 4 ++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 3007-applesmc-Add-iMacPro-to-applesmc_whitelist.patch diff --git a/3007-applesmc-Add-iMacPro-to-applesmc_whitelist.patch b/3007-applesmc-Add-iMacPro-to-applesmc_whitelist.patch new file mode 100644 index 0000000..b0cd1d4 --- /dev/null +++ b/3007-applesmc-Add-iMacPro-to-applesmc_whitelist.patch @@ -0,0 +1,31 @@ +From 101657def81e8d1ff7522eedf9cec63a531ea2e6 Mon Sep 17 00:00:00 2001 +From: Orlando Chamberlain +Date: Sat, 25 Dec 2021 13:41:26 +1100 +Subject: [PATCH 1/1] applesmc: Add iMacPro to applesmc_whitelist + +The iMacPro1,1 is the only iMacPro model released before its product +line was discontinued. Add it to the dmi_system_id table. + +Signed-off-by: Orlando Chamberlain +--- + drivers/hwmon/applesmc.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c +index 8b3f73fcbb8a..b196f9939b28 100644 +--- a/drivers/hwmon/applesmc.c ++++ b/drivers/hwmon/applesmc.c +@@ -1812,6 +1812,10 @@ static const struct dmi_system_id applesmc_whitelist[] __initconst = { + DMI_MATCH(DMI_BOARD_VENDOR, "Apple"), + DMI_MATCH(DMI_PRODUCT_NAME, "iMac") }, + }, ++ { applesmc_dmi_match, "Apple iMacPro", { ++ DMI_MATCH(DMI_BOARD_VENDOR, "Apple"), ++ DMI_MATCH(DMI_PRODUCT_NAME, "iMacPro") }, ++ }, + { applesmc_dmi_match, "Apple Xserve", { + DMI_MATCH(DMI_BOARD_VENDOR, "Apple"), + DMI_MATCH(DMI_PRODUCT_NAME, "Xserve") }, +-- +2.34.1 + diff --git a/PKGBUILD b/PKGBUILD index 18ca6a5..1aa49e8 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -4,7 +4,7 @@ pkgbase=linux-mbp pkgver=5.15.12 _srcname=linux-${pkgver} -pkgrel=1 +pkgrel=2 pkgdesc='Linux for MBP' _srctag=v${pkgver%.*}-${pkgver##*.} url="https://git.archlinux.org/linux.git/log/?h=v$_srctag" @@ -35,6 +35,7 @@ source=( 3004-applesmc-key-interface-wrappers.patch 3005-applesmc-basic-mmio-interface-implementation.patch 3006-applesmc-fan-support-on-T2-Macs.patch + 3007-applesmc-Add-iMacPro-to-applesmc_whitelist.patch # T2 USB Keyboard/Touchpad support 4001-HID-apple-Add-support-for-keyboard-backlight-on-supp.patch @@ -81,6 +82,7 @@ sha256sums=('7de919772b62647591527e904e3b3583783381a29d812404f58a222484e751a0' '459906cab172df9f6712a4168e7a5d529f85b2bb58a068f2d44746df14a6d27a' '2827dab6eeb2d2a08034938024f902846b5813e967a0ea253dc1ea88315da383' '398dec7d54c6122ae2263cd5a6d52353800a1a60fd85e52427c372ea9974a625' + '3aaab94e7dc3b73ec51778db07fde1f15a7606b7dce3cc13ee472ae24deddbc9' '11565cff9c6a7db8846dc7d5930419045e9527863b8df5979a7465006211bd16' '83f4be6849ba4d5f9fad647ad2eb78bf6409ee98a40ac62e8a5b80496233d70a' '44bd3643b2b22fedc59d79511199f30ce6759fa0acdd9a66262a53c5e046da6b' From ab58dc8c9d068ea184bfcf94be5805a4763987a9 Mon Sep 17 00:00:00 2001 From: Redecorating <69827514+Redecorating@users.noreply.github.com> Date: Thu, 30 Dec 2021 16:03:56 +1100 Subject: [PATCH 3/4] bluetooth: support mbp16,2, fix lpss panic, disable read tx power The 9001 patch was renamed to 8003 as we are running out of numbers for sections of patches. The new 9001 patch adds a quirk for mbp16,1/2/4 models that disables the LE Read Min/Max Tx Power command, which is reported by the chip as a supported command, but when Linux uses the command it fails. There is a different patch fixing this on the bluetooth-next tree, but that doesn't apply to stable. 9002 Adds the pcie id of the uart controller on the MBP16,2 to the intel-lpss-pci driver. The clock speed is corrected on the patch included. 9003 Fixes a kernel panic caused by an intel lpss acpi device, which doesn't seem to be used for anything on macOS (not much in ioreg about it). --- .SRCINFO | 12 +++- ...ure-virtual-interface-is-initialized.patch | 0 ...ooth-add-disable-read-tx-power-quirk.patch | 63 +++++++++++++++++++ ...dd-support-for-MacBookPro16-2-ICL-N-.patch | 30 +++++++++ ...ix-too-early-PM-enablement-in-the-AC.patch | 58 +++++++++++++++++ PKGBUILD | 18 ++++-- 6 files changed, 175 insertions(+), 6 deletions(-) rename 9001-brcmfmac-p2p-Ensure-virtual-interface-is-initialized.patch => 8003-brcmfmac-p2p-Ensure-virtual-interface-is-initialized.patch (100%) create mode 100644 9001-bluetooth-add-disable-read-tx-power-quirk.patch create mode 100644 9002-mfd-intel-lpss-Add-support-for-MacBookPro16-2-ICL-N-.patch create mode 100644 9003-mfd-intel-lpss-Fix-too-early-PM-enablement-in-the-AC.patch diff --git a/.SRCINFO b/.SRCINFO index 0cdb610..b7df84f 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,7 +1,7 @@ pkgbase = linux-mbp pkgdesc = Linux for MBP pkgver = 5.15.12 - pkgrel = 1 + pkgrel = 3 url = https://git.archlinux.org/linux.git/log/?h=vv5.15-12 arch = x86_64 license = GPL2 @@ -31,6 +31,7 @@ pkgbase = linux-mbp source = 3004-applesmc-key-interface-wrappers.patch source = 3005-applesmc-basic-mmio-interface-implementation.patch source = 3006-applesmc-fan-support-on-T2-Macs.patch + source = 3007-applesmc-Add-iMacPro-to-applesmc_whitelist.patch source = 4001-HID-apple-Add-support-for-keyboard-backlight-on-supp.patch source = 4002-HID-apple-Add-support-for-MacbookAir8-1-keyboard-tra.patch source = 4003-HID-apple-Add-support-for-MacBookPro15-2-keyboard-tr.patch @@ -46,7 +47,10 @@ pkgbase = linux-mbp source = 7001-drm-i915-fbdev-Discard-BIOS-framebuffers-exceeding-h.patch source = 8001-brcmfmac-Add-initial-support-for-the-BRCM4355.patch source = 8002-brcmfmac-Add-initial-support-for-the-BRCM4377.patch - source = 9001-brcmfmac-p2p-Ensure-virtual-interface-is-initialized.patch + source = 8003-brcmfmac-p2p-Ensure-virtual-interface-is-initialized.patch + source = 9001-bluetooth-add-disable-read-tx-power-quirk.patch + source = 9002-mfd-intel-lpss-Add-support-for-MacBookPro16-2-ICL-N-.patch + source = 9003-mfd-intel-lpss-Fix-too-early-PM-enablement-in-the-AC.patch validpgpkeys = ABAF11C65A2970B130ABE3C479BE3E4300411886 validpgpkeys = 647F28654894E3BD457199BE38DBBDC86092693E sha256sums = 7de919772b62647591527e904e3b3583783381a29d812404f58a222484e751a0 @@ -60,6 +64,7 @@ pkgbase = linux-mbp sha256sums = 459906cab172df9f6712a4168e7a5d529f85b2bb58a068f2d44746df14a6d27a sha256sums = 2827dab6eeb2d2a08034938024f902846b5813e967a0ea253dc1ea88315da383 sha256sums = 398dec7d54c6122ae2263cd5a6d52353800a1a60fd85e52427c372ea9974a625 + sha256sums = 3aaab94e7dc3b73ec51778db07fde1f15a7606b7dce3cc13ee472ae24deddbc9 sha256sums = 11565cff9c6a7db8846dc7d5930419045e9527863b8df5979a7465006211bd16 sha256sums = 83f4be6849ba4d5f9fad647ad2eb78bf6409ee98a40ac62e8a5b80496233d70a sha256sums = 44bd3643b2b22fedc59d79511199f30ce6759fa0acdd9a66262a53c5e046da6b @@ -76,6 +81,9 @@ pkgbase = linux-mbp sha256sums = fb73c8ba175ec2bdf765207f434d1e8977efa0be3097a6d1e2843536a531c351 sha256sums = 294300fe5e290e18ee4062fe6847f7838c0f1a977af91157a1630828f55f7aa2 sha256sums = fa0ad2e2f171eafd727d780588f7ef5d47ddf2d75fab02c67356bbc7b26e25e0 + sha256sums = 31e414978a947bdb71f27ed364c4da73b81fcf1921250cb69ee1bcf2bbd25636 + sha256sums = 8aeed7ebb2544aabf2361c7eaeea4ab76f1ce2c5f6257224545b82ef42cf4b44 + sha256sums = 3bffb2bb84800453ba05676293de9b0b1619d0c19b6295e803f0d9c3a07be23a pkgname = linux-mbp pkgdesc = The Linux for MBP kernel and modules diff --git a/9001-brcmfmac-p2p-Ensure-virtual-interface-is-initialized.patch b/8003-brcmfmac-p2p-Ensure-virtual-interface-is-initialized.patch similarity index 100% rename from 9001-brcmfmac-p2p-Ensure-virtual-interface-is-initialized.patch rename to 8003-brcmfmac-p2p-Ensure-virtual-interface-is-initialized.patch diff --git a/9001-bluetooth-add-disable-read-tx-power-quirk.patch b/9001-bluetooth-add-disable-read-tx-power-quirk.patch new file mode 100644 index 0000000..0f0011f --- /dev/null +++ b/9001-bluetooth-add-disable-read-tx-power-quirk.patch @@ -0,0 +1,63 @@ +From 64dad24333ddb290f4e2f6c489abe03247030320 Mon Sep 17 00:00:00 2001 +From: Orlando Chamberlain +Date: Tue, 28 Sep 2021 20:41:35 +1000 +Subject: [PATCH] bluetooth: add disable read tx power quirk + +--- + drivers/bluetooth/btbcm.c | 4 ++++ + include/net/bluetooth/hci.h | 9 +++++++++ + net/bluetooth/hci_core.c | 3 ++- + 3 files changed, 15 insertions(+), 1 deletion(-) + +diff --git a/drivers/bluetooth/btbcm.c b/drivers/bluetooth/btbcm.c +index e4182acee488..4ecc50d93107 100644 +--- a/drivers/bluetooth/btbcm.c ++++ b/drivers/bluetooth/btbcm.c +@@ -353,6 +353,10 @@ static int btbcm_read_info(struct hci_dev *hdev) + return PTR_ERR(skb); + + bt_dev_info(hdev, "BCM: chip id %u", skb->data[1]); ++ ++ if (skb->data[1] == 150) ++ set_bit(HCI_QUIRK_BROKEN_READ_TRANSMIT_POWER, &hdev->quirks); ++ + kfree_skb(skb); + + /* Read Controller Features */ +diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h +index b80415011dcd..9ce46cb8564d 100644 +--- a/include/net/bluetooth/hci.h ++++ b/include/net/bluetooth/hci.h +@@ -246,6 +246,15 @@ enum { + * HCI after resume. + */ + HCI_QUIRK_NO_SUSPEND_NOTIFIER, ++ ++ /* ++ * When this quirk is set, LE tx power is not queried on startup ++ * and the min/max tx power values default to HCI_TX_POWER_INVALID. ++ * ++ * This quirk can be set before hci_register_dev is called or ++ * during the hdev->setup vendor callback. ++ */ ++ HCI_QUIRK_BROKEN_READ_TRANSMIT_POWER, + }; + + /* HCI device flags */ +diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c +index 8a47a3017d61..9a23fe7c8d67 100644 +--- a/net/bluetooth/hci_core.c ++++ b/net/bluetooth/hci_core.c +@@ -742,7 +742,8 @@ static int hci_init3_req(struct hci_request *req, unsigned long opt) + hci_req_add(req, HCI_OP_LE_READ_ADV_TX_POWER, 0, NULL); + } + +- if (hdev->commands[38] & 0x80) { ++ if (hdev->commands[38] & 0x80 && ++ !test_bit(HCI_QUIRK_BROKEN_READ_TRANSMIT_POWER, &hdev->quirks)) { + /* Read LE Min/Max Tx Power*/ + hci_req_add(req, HCI_OP_LE_READ_TRANSMIT_POWER, + 0, NULL); +-- +2.33.0 + diff --git a/9002-mfd-intel-lpss-Add-support-for-MacBookPro16-2-ICL-N-.patch b/9002-mfd-intel-lpss-Add-support-for-MacBookPro16-2-ICL-N-.patch new file mode 100644 index 0000000..1bfa60a --- /dev/null +++ b/9002-mfd-intel-lpss-Add-support-for-MacBookPro16-2-ICL-N-.patch @@ -0,0 +1,30 @@ +From 76d8253d90233b2c2d3fbc82355c603bf0eb9964 Mon Sep 17 00:00:00 2001 +From: Orlando Chamberlain +Date: Sat, 02 Oct 2021 11:16:30 +0000 +Subject: [PATCHv4] mfd: intel-lpss: Add support for MacBookPro16,2 ICL-N UART + +Added 8086:38a8 to the intel_lpss_pci driver. It is an Intel Ice Lake +PCH-N UART controler present on the MacBookPro16,2. + +Signed-off-by: Orlando Chamberlain +Reviewed-by: Andy Shevchenko +--- +v3->v4: reviewed-by line + drivers/mfd/intel-lpss-pci.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/drivers/mfd/intel-lpss-pci.c b/drivers/mfd/intel-lpss-pci.c +index c54d19fb184c..a872b4485eac 100644 +--- a/drivers/mfd/intel-lpss-pci.c ++++ b/drivers/mfd/intel-lpss-pci.c +@@ -253,6 +253,8 @@ static const struct pci_device_id intel_lpss_pci_ids[] = { + { PCI_VDEVICE(INTEL, 0x34ea), (kernel_ulong_t)&bxt_i2c_info }, + { PCI_VDEVICE(INTEL, 0x34eb), (kernel_ulong_t)&bxt_i2c_info }, + { PCI_VDEVICE(INTEL, 0x34fb), (kernel_ulong_t)&spt_info }, ++ /* ICL-N */ ++ { PCI_VDEVICE(INTEL, 0x38a8), (kernel_ulong_t)&spt_uart_info }, + /* TGL-H */ + { PCI_VDEVICE(INTEL, 0x43a7), (kernel_ulong_t)&bxt_uart_info }, + { PCI_VDEVICE(INTEL, 0x43a8), (kernel_ulong_t)&bxt_uart_info }, +-- +2.33.0 diff --git a/9003-mfd-intel-lpss-Fix-too-early-PM-enablement-in-the-AC.patch b/9003-mfd-intel-lpss-Fix-too-early-PM-enablement-in-the-AC.patch new file mode 100644 index 0000000..92b383a --- /dev/null +++ b/9003-mfd-intel-lpss-Fix-too-early-PM-enablement-in-the-AC.patch @@ -0,0 +1,58 @@ +From: "Andy Shevchenko" +To: "Andy Shevchenko" , "Lee Jones" , +Cc: "Orlando Chamberlain" , "Aditya Garg" +Subject: [PATCH v2 1/1] mfd: intel-lpss: Fix too early PM enablement in the ACPI ->probe() +Date: Tue, 02 Nov 2021 06:00:08 +1100 + +The runtime PM callback may be called as soon as the runtime PM facility +is enabled and activated. It means that ->suspend() may be called before +we finish probing the device in the ACPI case. Hence, NULL pointer +dereference: + + intel-lpss INT34BA:00: IRQ index 0 not found + BUG: kernel NULL pointer dereference, address: 0000000000000030 + ... + Workqueue: pm pm_runtime_work + RIP: 0010:intel_lpss_suspend+0xb/0x40 [intel_lpss] + +To fix this, first try to register the device and only after that enable +runtime PM facility. + +Fixes: 4b45efe85263 ("mfd: Add support for Intel Sunrisepoint LPSS devices") +Reported-by: Orlando Chamberlain +Reported-by: Aditya Garg +Signed-off-by: Andy Shevchenko +--- + drivers/mfd/intel-lpss-acpi.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/drivers/mfd/intel-lpss-acpi.c b/drivers/mfd/intel-lpss-acpi.c +index 3f1d976eb67c..be81507afb5e 100644 +--- a/drivers/mfd/intel-lpss-acpi.c ++++ b/drivers/mfd/intel-lpss-acpi.c +@@ -136,6 +136,7 @@ static int intel_lpss_acpi_probe(struct platform_device *pdev) + { + struct intel_lpss_platform_info *info; + const struct acpi_device_id *id; ++ int ret; + + id = acpi_match_device(intel_lpss_acpi_ids, &pdev->dev); + if (!id) +@@ -149,10 +150,14 @@ static int intel_lpss_acpi_probe(struct platform_device *pdev) + info->mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); + info->irq = platform_get_irq(pdev, 0); + ++ ret = intel_lpss_probe(&pdev->dev, info); ++ if (ret) ++ return ret; ++ + pm_runtime_set_active(&pdev->dev); + pm_runtime_enable(&pdev->dev); + +- return intel_lpss_probe(&pdev->dev, info); ++ return 0; + } + + static int intel_lpss_acpi_remove(struct platform_device *pdev) +-- +2.33.0 diff --git a/PKGBUILD b/PKGBUILD index 1aa49e8..46cc8c8 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -4,7 +4,7 @@ pkgbase=linux-mbp pkgver=5.15.12 _srcname=linux-${pkgver} -pkgrel=2 +pkgrel=3 pkgdesc='Linux for MBP' _srctag=v${pkgver%.*}-${pkgver##*.} url="https://git.archlinux.org/linux.git/log/?h=v$_srctag" @@ -58,12 +58,19 @@ source=( # Hack for i915 overscan issues 7001-drm-i915-fbdev-Discard-BIOS-framebuffers-exceeding-h.patch - # Broadcom WIFI/BT device support + # Broadcom WIFI device support 8001-brcmfmac-Add-initial-support-for-the-BRCM4355.patch 8002-brcmfmac-Add-initial-support-for-the-BRCM4377.patch # Broadcom P2P VIF fix - 9001-brcmfmac-p2p-Ensure-virtual-interface-is-initialized.patch + 8003-brcmfmac-p2p-Ensure-virtual-interface-is-initialized.patch + + # Broadcom BT device support + 9001-bluetooth-add-disable-read-tx-power-quirk.patch + 9002-mfd-intel-lpss-Add-support-for-MacBookPro16-2-ICL-N-.patch + 9003-mfd-intel-lpss-Fix-too-early-PM-enablement-in-the-AC.patch + + ) validpgpkeys=( @@ -98,7 +105,10 @@ sha256sums=('7de919772b62647591527e904e3b3583783381a29d812404f58a222484e751a0' '90a6012cdd8a64ede8e0bbaf7331960bd68f628e0973b65459188eb1ccb5b829' 'fb73c8ba175ec2bdf765207f434d1e8977efa0be3097a6d1e2843536a531c351' '294300fe5e290e18ee4062fe6847f7838c0f1a977af91157a1630828f55f7aa2' - 'fa0ad2e2f171eafd727d780588f7ef5d47ddf2d75fab02c67356bbc7b26e25e0') + 'fa0ad2e2f171eafd727d780588f7ef5d47ddf2d75fab02c67356bbc7b26e25e0' + '31e414978a947bdb71f27ed364c4da73b81fcf1921250cb69ee1bcf2bbd25636' + '8aeed7ebb2544aabf2361c7eaeea4ab76f1ce2c5f6257224545b82ef42cf4b44' + '3bffb2bb84800453ba05676293de9b0b1619d0c19b6295e803f0d9c3a07be23a') export KBUILD_BUILD_HOST=archlinux export KBUILD_BUILD_USER=$pkgbase From 416d9390a003e0e66caeaae28a98c3815dae059e Mon Sep 17 00:00:00 2001 From: Redecorating <69827514+Redecorating@users.noreply.github.com> Date: Thu, 30 Dec 2021 16:30:06 +1100 Subject: [PATCH 4/4] brcmfmac: use asahilinux's wifi/take5 patches The 5001 and 5002 patches were removed as new patches modify brcmf_mp_device. Given that the rambases for the WiFi chips on all T2 Macs are now known, this shouldn't be too much of an issue. This patchset supports OTP firmware selection and the 64 bit regs that BCM4377 has. The firmware naming format has changed because of OTP. To install firmware with the required naming scheme: # in macos (or linux if you have a copy of the wifi folder): git clone https://github.com/AsahiLinux/asahi-installer --depth=1 cd asahi-installer/src python3 -m firmware.wifi /usr/share/firmware/wifi firmware.tar # in linux cd /lib/firmware sudo tar xf /path/to/firmware.tar Link: https://github.com/asahilinux/linux/tree/wifi/take5 Link: https://lore.kernel.org/all/20211226153624.162281-1-marcan@marcan.st/ The 8003 p2p patch has been renamed to 8035. It still applies fine. --- .SRCINFO | 78 +++- ...-brcmf_mp_device-into-its-own-header.patch | 120 ------ ...lity-to-manually-specify-FW-rambase-.patch | 228 ----------- ...clare-missing-firmware-files-in-pcie.patch | 49 +++ ...re-Support-having-multiple-alt-paths.patch | 166 ++++++++ ...ware-Handle-per-board-clm_blob-files.patch | 56 +++ ...io-usb-Get-CLM-blob-via-standard-fir.patch | 374 ++++++++++++++++++ ...e-Support-passing-in-multiple-board_.patch | 135 +++++++ ...fmac-pcie-Read-Apple-OTP-information.patch | 301 ++++++++++++++ 8007-brcmfmac-of-Fetch-Apple-properties.patch | 76 ++++ ...rform-firmware-selection-for-Apple-p.patch | 160 ++++++++ ...e-Allow-platform-to-override-macaddr.patch | 125 ++++++ ...sgbuf-Increase-RX-ring-sizes-to-1024.patch | 34 ++ ...c-pcie-Fix-crashes-due-to-early-IRQs.patch | 62 +++ ...-pcie-Support-PCIe-core-revisions-64.patch | 266 +++++++++++++ ...-pcie-Add-IDs-properties-for-BCM4378.patch | 96 +++++ ...-Support-strings-in-Apple-_DSM-props.patch | 53 +++ ...d-support-for-fetching-Apple-ACPI-pr.patch | 127 ++++++ ...ovide-a-buffer-of-random-bytes-to-th.patch | 83 ++++ ...-pcie-Add-IDs-properties-for-BCM4355.patch | 59 +-- ...-pcie-Add-IDs-properties-for-BCM4377.patch | 74 ++-- ...rform-correct-BCM4364-firmware-selec.patch | 78 ++++ ...ly-disable-D11-cores-handle-an-arbit.patch | 53 +++ ...andle-1024-unit-sizes-for-TCM-blocks.patch | 73 ++++ ...80211-Add-support-for-scan-params-v2.patch | 335 ++++++++++++++++ ...-Add-support-for-setting-feats-based.patch | 137 +++++++ ...1-Add-support-for-PMKID_V3-operation.patch | 223 +++++++++++ ...1-Pass-the-PMK-in-binary-instead-of-.patch | 49 +++ ...-pcie-Add-IDs-properties-for-BCM4387.patch | 95 +++++ ...place-brcmf_pcie_copy_mem_todev-with.patch | 119 ++++++ ...ead-the-console-on-init-and-shutdown.patch | 45 +++ ...lease-firmwares-in-the-brcmf_pcie_se.patch | 31 ++ ...c-fwil-Constify-iovar-name-arguments.patch | 215 ++++++++++ ...Add-support-for-downloading-TxCap-bl.patch | 189 +++++++++ ...ac-pcie-Load-and-provide-TxCap-blobs.patch | 91 +++++ ...Add-support-for-external-calibration.patch | 100 +++++ ...ure-virtual-interface-is-initialized.patch | 0 PKGBUILD | 80 +++- 38 files changed, 4210 insertions(+), 425 deletions(-) delete mode 100644 5001-brcmfmac-move-brcmf_mp_device-into-its-own-header.patch delete mode 100644 5002-brcmfmac-Add-ability-to-manually-specify-FW-rambase-.patch create mode 100644 8001-brcmfmac-pcie-Declare-missing-firmware-files-in-pcie.patch create mode 100644 8002-brcmfmac-firmware-Support-having-multiple-alt-paths.patch create mode 100644 8003-brcmfmac-firmware-Handle-per-board-clm_blob-files.patch create mode 100644 8004-brcmfmac-pcie-sdio-usb-Get-CLM-blob-via-standard-fir.patch create mode 100644 8005-brcmfmac-firmware-Support-passing-in-multiple-board_.patch create mode 100644 8006-brcmfmac-pcie-Read-Apple-OTP-information.patch create mode 100644 8007-brcmfmac-of-Fetch-Apple-properties.patch create mode 100644 8008-brcmfmac-pcie-Perform-firmware-selection-for-Apple-p.patch create mode 100644 8009-brcmfmac-firmware-Allow-platform-to-override-macaddr.patch create mode 100644 8010-brcmfmac-msgbuf-Increase-RX-ring-sizes-to-1024.patch create mode 100644 8011-brcmfmac-pcie-Fix-crashes-due-to-early-IRQs.patch create mode 100644 8012-brcmfmac-pcie-Support-PCIe-core-revisions-64.patch create mode 100644 8013-brcmfmac-pcie-Add-IDs-properties-for-BCM4378.patch create mode 100644 8014-ACPI-property-Support-strings-in-Apple-_DSM-props.patch create mode 100644 8015-brcmfmac-acpi-Add-support-for-fetching-Apple-ACPI-pr.patch create mode 100644 8016-brcmfmac-pcie-Provide-a-buffer-of-random-bytes-to-th.patch rename 8001-brcmfmac-Add-initial-support-for-the-BRCM4355.patch => 8017-brcmfmac-pcie-Add-IDs-properties-for-BCM4355.patch (64%) rename 8002-brcmfmac-Add-initial-support-for-the-BRCM4377.patch => 8018-brcmfmac-pcie-Add-IDs-properties-for-BCM4377.patch (55%) create mode 100644 8019-brcmfmac-pcie-Perform-correct-BCM4364-firmware-selec.patch create mode 100644 8020-brcmfmac-chip-Only-disable-D11-cores-handle-an-arbit.patch create mode 100644 8021-brcmfmac-chip-Handle-1024-unit-sizes-for-TCM-blocks.patch create mode 100644 8022-brcmfmac-cfg80211-Add-support-for-scan-params-v2.patch create mode 100644 8023-brcmfmac-feature-Add-support-for-setting-feats-based.patch create mode 100644 8024-brcmfmac-cfg80211-Add-support-for-PMKID_V3-operation.patch create mode 100644 8025-brcmfmac-cfg80211-Pass-the-PMK-in-binary-instead-of-.patch create mode 100644 8026-brcmfmac-pcie-Add-IDs-properties-for-BCM4387.patch create mode 100644 8027-brcmfmac-pcie-Replace-brcmf_pcie_copy_mem_todev-with.patch create mode 100644 8028-brcmfmac-pcie-Read-the-console-on-init-and-shutdown.patch create mode 100644 8029-brcmfmac-pcie-Release-firmwares-in-the-brcmf_pcie_se.patch create mode 100644 8031-brcmfmac-fwil-Constify-iovar-name-arguments.patch create mode 100644 8032-brcmfmac-common-Add-support-for-downloading-TxCap-bl.patch create mode 100644 8033-brcmfmac-pcie-Load-and-provide-TxCap-blobs.patch create mode 100644 8034-brcmfmac-common-Add-support-for-external-calibration.patch rename 8003-brcmfmac-p2p-Ensure-virtual-interface-is-initialized.patch => 8035-brcmfmac-p2p-Ensure-virtual-interface-is-initialized.patch (100%) diff --git a/.SRCINFO b/.SRCINFO index b7df84f..870bace 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,7 +1,7 @@ pkgbase = linux-mbp pkgdesc = Linux for MBP pkgver = 5.15.12 - pkgrel = 3 + pkgrel = 4 url = https://git.archlinux.org/linux.git/log/?h=vv5.15-12 arch = x86_64 license = GPL2 @@ -41,13 +41,42 @@ pkgbase = linux-mbp source = 4007-HID-apple-Add-support-for-MacBookPro16-3-keyboard-tr.patch source = 4008-HID-apple-Add-support-for-MacBookAir9-1-keyboard-tra.patch source = 4009-HID-apple-Add-support-for-MacBookPro16-1-keyboard-tr.patch - source = 5001-brcmfmac-move-brcmf_mp_device-into-its-own-header.patch - source = 5002-brcmfmac-Add-ability-to-manually-specify-FW-rambase-.patch source = 6001-media-uvcvideo-Add-support-for-Apple-T2-attached-iSi.patch source = 7001-drm-i915-fbdev-Discard-BIOS-framebuffers-exceeding-h.patch - source = 8001-brcmfmac-Add-initial-support-for-the-BRCM4355.patch - source = 8002-brcmfmac-Add-initial-support-for-the-BRCM4377.patch - source = 8003-brcmfmac-p2p-Ensure-virtual-interface-is-initialized.patch + source = 8001-brcmfmac-pcie-Declare-missing-firmware-files-in-pcie.patch + source = 8002-brcmfmac-firmware-Support-having-multiple-alt-paths.patch + source = 8003-brcmfmac-firmware-Handle-per-board-clm_blob-files.patch + source = 8004-brcmfmac-pcie-sdio-usb-Get-CLM-blob-via-standard-fir.patch + source = 8005-brcmfmac-firmware-Support-passing-in-multiple-board_.patch + source = 8006-brcmfmac-pcie-Read-Apple-OTP-information.patch + source = 8007-brcmfmac-of-Fetch-Apple-properties.patch + source = 8008-brcmfmac-pcie-Perform-firmware-selection-for-Apple-p.patch + source = 8009-brcmfmac-firmware-Allow-platform-to-override-macaddr.patch + source = 8010-brcmfmac-msgbuf-Increase-RX-ring-sizes-to-1024.patch + source = 8011-brcmfmac-pcie-Fix-crashes-due-to-early-IRQs.patch + source = 8012-brcmfmac-pcie-Support-PCIe-core-revisions-64.patch + source = 8013-brcmfmac-pcie-Add-IDs-properties-for-BCM4378.patch + source = 8014-ACPI-property-Support-strings-in-Apple-_DSM-props.patch + source = 8015-brcmfmac-acpi-Add-support-for-fetching-Apple-ACPI-pr.patch + source = 8016-brcmfmac-pcie-Provide-a-buffer-of-random-bytes-to-th.patch + source = 8017-brcmfmac-pcie-Add-IDs-properties-for-BCM4355.patch + source = 8018-brcmfmac-pcie-Add-IDs-properties-for-BCM4377.patch + source = 8019-brcmfmac-pcie-Perform-correct-BCM4364-firmware-selec.patch + source = 8020-brcmfmac-chip-Only-disable-D11-cores-handle-an-arbit.patch + source = 8021-brcmfmac-chip-Handle-1024-unit-sizes-for-TCM-blocks.patch + source = 8022-brcmfmac-cfg80211-Add-support-for-scan-params-v2.patch + source = 8023-brcmfmac-feature-Add-support-for-setting-feats-based.patch + source = 8024-brcmfmac-cfg80211-Add-support-for-PMKID_V3-operation.patch + source = 8025-brcmfmac-cfg80211-Pass-the-PMK-in-binary-instead-of-.patch + source = 8026-brcmfmac-pcie-Add-IDs-properties-for-BCM4387.patch + source = 8027-brcmfmac-pcie-Replace-brcmf_pcie_copy_mem_todev-with.patch + source = 8028-brcmfmac-pcie-Read-the-console-on-init-and-shutdown.patch + source = 8029-brcmfmac-pcie-Release-firmwares-in-the-brcmf_pcie_se.patch + source = 8031-brcmfmac-fwil-Constify-iovar-name-arguments.patch + source = 8032-brcmfmac-common-Add-support-for-downloading-TxCap-bl.patch + source = 8033-brcmfmac-pcie-Load-and-provide-TxCap-blobs.patch + source = 8034-brcmfmac-common-Add-support-for-external-calibration.patch + source = 8035-brcmfmac-p2p-Ensure-virtual-interface-is-initialized.patch source = 9001-bluetooth-add-disable-read-tx-power-quirk.patch source = 9002-mfd-intel-lpss-Add-support-for-MacBookPro16-2-ICL-N-.patch source = 9003-mfd-intel-lpss-Fix-too-early-PM-enablement-in-the-AC.patch @@ -74,12 +103,41 @@ pkgbase = linux-mbp sha256sums = 40eff5e88bb30c51c6b97e85c2e7b8dec5f97916f768e6c07618d9c5afe68574 sha256sums = cac035fe07663a319185c644c5b39b34bef89ada348881fa4a02d15290260445 sha256sums = 9dfa9f02d17c5cd9620fa2c1d43ca967b81b6a56d33c2bafae14e0c64e498baa - sha256sums = 4d22727c1456e268de1c39ac73f2dc0c1630ac25aa66364d99f94e29eba5c6b9 - sha256sums = cc8a177699862101cbed9172def8c3985d65f7b5c7755f600559aa45dd80e348 sha256sums = 9640178d6251686c980c30fc528b3d70beac6ce8246bf433506a3f843808326c sha256sums = 90a6012cdd8a64ede8e0bbaf7331960bd68f628e0973b65459188eb1ccb5b829 - sha256sums = fb73c8ba175ec2bdf765207f434d1e8977efa0be3097a6d1e2843536a531c351 - sha256sums = 294300fe5e290e18ee4062fe6847f7838c0f1a977af91157a1630828f55f7aa2 + sha256sums = 862f631ef9f25453ce38d9ed0197e62d85f9f5a0625ed77237e643297fb42f75 + sha256sums = 2f7899b70d5c55aea3f6385385fea01ce21b48f9441982a94f36c842cceec083 + sha256sums = 2b126cda3863f49b8d3a6de8fa8cca979d87bd9e66812531be5c02c9e5840d82 + sha256sums = 70a277c9ad4fba624b3916e397624e557135b269c34eb704ace29aa1a6b8e430 + sha256sums = 42ae52b93ea0cbd0d1859512b88e0c290e3500b8e52f8de3be7398cb6039d0b4 + sha256sums = 300d926bac23b81d267e73433d668581ec1e3b12fa76462ba3d0b1cf2728b82d + sha256sums = 01f3185e551dd49007b533d4bae37774131820a51715e1f1a391220e055afc66 + sha256sums = db55305b8e3c2a8fa0a85aeaad661717ae745d5dabc7735221adb184e89a2d1b + sha256sums = 82f679f3736e09ee9ea8a8b53c052e84bb40df8a05f21a2082224184ad3cf162 + sha256sums = 9907f67d099a2b6243747350a2c057d82c39e822107ca57cbfdc32baf378d2cb + sha256sums = d25cd32de8c74ba8bcb430c21f9d84deae1174594d00ea94e1fd1e2ab70ea5cb + sha256sums = 823d35349844605dadf381ae7c6097379a23c72da59e3cf393fcf3e5d466dafd + sha256sums = ed6e84bc03cd6adfc3f8def843f150b71470df6d6a88fc348d5e1b36f133f424 + sha256sums = 23d9018c90d02389f2ddeb0821e581d354184b3b38d4488fbc0f3363463a0c9e + sha256sums = d2e2b0f0c80fb5b4da36d3a7a87b10c2419255c0e38e0faa1d7478eaab1b9a35 + sha256sums = ecef58f944bf61950b3211e88acd104b0006a177e76f59a47b8253aaf5e6acc6 + sha256sums = 1eb6e14b5504efbad7911aabc801a265e9ba13cb2fd6ce8e029af55bf97cec86 + sha256sums = f2b553e11240bb88e5d0ffd7883d808c069ede544e5c578c22975466a5c9d26a + sha256sums = ac4b200dadbb88179bf37dcea280efe25bf42b420a90ab1399c3bd9c7905f592 + sha256sums = e12726162b868435081a215f04d921cd8b9307de71738c41090ec93a267725de + sha256sums = bfa3bb8d16b6c26831f9b5e833d46ea2c60854f016540a051f96c418be1a728f + sha256sums = e9df13adedefd0043ea6678c19a9de608aa69fe83929a13213c528052096ed3c + sha256sums = b51a916bb0048d7cb57ed2afc25394ec72664efe2a8c5705b0dcfe62384e34ed + sha256sums = 2ec5dddd41327b5018d41b920955182bc3f220f692a32b061d8797c8fee99dbc + sha256sums = a8596e6180a895515cbc1f361edc8fca460f630dd15bbd161037d84717717ba8 + sha256sums = 55b6981468b489f5bb7c59d5f9a6b479c0d96bb1018efa209ed8506d54de8399 + sha256sums = 2339acd32f020db66f2a3190910d925a030798e3fd57006a09dda56e5acbf279 + sha256sums = f41ab41dd9445dee28699c1af7909723514f9d41d30a5c148d4f99617ed2d46e + sha256sums = 0e6cd10376f13873a9226d233161a0dab6b1d3c6a7d66bc3c4e8d3cc0f0397d0 + sha256sums = 8f9a6d47eaec7d9df9a822a146ab15ca7bee906866545493cac8621570237060 + sha256sums = ecede30aa68ea4646d3efb0a7190466ff1784f4e93756a04bb58756536f28035 + sha256sums = 0bed877897873ae86e512d711b86fa11adc5b8e7fe35139e290e8d0a0133f6a5 + sha256sums = 23f4a7002632f95abb1ed75a4df0570b7a81e5cf4067a16da7101b16eb582a01 sha256sums = fa0ad2e2f171eafd727d780588f7ef5d47ddf2d75fab02c67356bbc7b26e25e0 sha256sums = 31e414978a947bdb71f27ed364c4da73b81fcf1921250cb69ee1bcf2bbd25636 sha256sums = 8aeed7ebb2544aabf2361c7eaeea4ab76f1ce2c5f6257224545b82ef42cf4b44 diff --git a/5001-brcmfmac-move-brcmf_mp_device-into-its-own-header.patch b/5001-brcmfmac-move-brcmf_mp_device-into-its-own-header.patch deleted file mode 100644 index b47da92..0000000 --- a/5001-brcmfmac-move-brcmf_mp_device-into-its-own-header.patch +++ /dev/null @@ -1,120 +0,0 @@ -From ca775a3e16ac138ff47fcc3eccacd154ee35e9c2 Mon Sep 17 00:00:00 2001 -From: Aun-Ali Zaidi -Date: Fri, 10 Jan 2020 12:47:25 -0600 -Subject: [PATCH 1/2] brcmfmac: move brcmf_mp_device into its own header - -This commit relocates the brcmf_mp_device struct into its own header. This -aids in utilizing the struct without the redefinition of the existing -included headers found in common.h, such as fwil_types.h. - -Tested-by: Aun-Ali Zaidi -Signed-off-by: Aun-Ali Zaidi ---- - .../broadcom/brcm80211/brcmfmac/common.h | 36 +++--------------- - .../broadcom/brcm80211/brcmfmac/settings.h | 37 +++++++++++++++++++ - 2 files changed, 42 insertions(+), 31 deletions(-) - create mode 100644 drivers/net/wireless/broadcom/brcm80211/brcmfmac/settings.h - -diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h -index 8b5f49997c8b..6cde5ee13e7a 100644 ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h -@@ -8,15 +8,14 @@ - #include - #include - #include "fwil_types.h" -+#include "settings.h" - - #define BRCMF_FW_ALTPATH_LEN 256 - --/* Definitions for the module global and device specific settings are defined -- * here. Two structs are used for them. brcmf_mp_global_t and brcmf_mp_device. -- * The mp_global is instantiated once in a global struct and gets initialized -- * by the common_attach function which should be called before any other -- * (module) initiliazation takes place. The device specific settings is part -- * of the drvr struct and should be initialized on every brcmf_attach. -+/* Definition for the module global settings are defined here. One struct is -+ * used called brcmf_mp_global_t. The mp_global is instantiated once in a -+ * global struct and gets initialized by the common_attach function which -+ * should be called before any other (module) initiliazation takes place. - */ - - /** -@@ -30,31 +29,6 @@ struct brcmf_mp_global_t { - - extern struct brcmf_mp_global_t brcmf_mp_global; - --/** -- * struct brcmf_mp_device - Device module paramaters. -- * -- * @p2p_enable: Legacy P2P0 enable (old wpa_supplicant). -- * @feature_disable: Feature_disable bitmask. -- * @fcmode: FWS flow control. -- * @roamoff: Firmware roaming off? -- * @ignore_probe_fail: Ignore probe failure. -- * @country_codes: If available, pointer to struct for translating country codes -- * @bus: Bus specific platform data. Only SDIO at the mmoment. -- */ --struct brcmf_mp_device { -- bool p2p_enable; -- unsigned int feature_disable; -- int fcmode; -- bool roamoff; -- bool iapp; -- bool ignore_probe_fail; -- struct brcmfmac_pd_cc *country_codes; -- const char *board_type; -- union { -- struct brcmfmac_sdio_pd sdio; -- } bus; --}; -- - void brcmf_c_set_joinpref_default(struct brcmf_if *ifp); - - struct brcmf_mp_device *brcmf_get_module_param(struct device *dev, -diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/settings.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/settings.h -new file mode 100644 -index 000000000000..7bab0d362cdd ---- /dev/null -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/settings.h -@@ -0,0 +1,37 @@ -+/* SPDX-License-Identifier: ISC */ -+/* Copyright (c) 2014 Broadcom Corporation */ -+ -+#ifndef BRCMFMAC_SETTINGS_H -+#define BRCMFMAC_SETTINGS_H -+ -+/* Definition for the device specific settings are defined here. One struct -+ * is used called brcmf_mp_device. The device specific settings is part of -+ * the drvr struct and should be initialized on every brcmf_attach. -+ */ -+ -+/** -+ * struct brcmf_mp_device - Device module parameters. -+ * -+ * @p2p_enable: Legacy P2P0 enable (old wpa_supplicant). -+ * @feature_disable: Feature_disable bitmask. -+ * @fcmode: FWS flow control. -+ * @roamoff: Firmware roaming off? -+ * @ignore_probe_fail: Ignore probe failure. -+ * @country_codes: If available, pointer to struct for translating country codes -+ * @bus: Bus specific platform data. Only SDIO at the mmoment. -+ */ -+struct brcmf_mp_device { -+ bool p2p_enable; -+ unsigned int feature_disable; -+ int fcmode; -+ bool roamoff; -+ bool iapp; -+ bool ignore_probe_fail; -+ struct brcmfmac_pd_cc *country_codes; -+ const char *board_type; -+ union { -+ struct brcmfmac_sdio_pd sdio; -+ } bus; -+}; -+ -+#endif /* BRCMFMAC_SETTINGS_H */ --- -2.30.0 - diff --git a/5002-brcmfmac-Add-ability-to-manually-specify-FW-rambase-.patch b/5002-brcmfmac-Add-ability-to-manually-specify-FW-rambase-.patch deleted file mode 100644 index ad83cb1..0000000 --- a/5002-brcmfmac-Add-ability-to-manually-specify-FW-rambase-.patch +++ /dev/null @@ -1,228 +0,0 @@ -From 26c44d268ac1d328ef4cbd35a2a1a3d703346903 Mon Sep 17 00:00:00 2001 -From: Aun-Ali Zaidi -Date: Fri, 10 Jan 2020 19:41:21 -0600 -Subject: [PATCH 2/2] brcmfmac: Add ability to manually specify FW rambase - address - -This commit introduces the ability to manually pass the rambase address -for the brcmfmac chip as a kernel module option. The existing -brcmf_chip_tcm_rambase() function is bypassed when this option is -supplied. This is very useful when debugging support for newer chipsets -that are not provided by the aforementioned function. - -Tested-by: Aun-Ali Zaidi -Signed-off-by: Aun-Ali Zaidi ---- - .../broadcom/brcm80211/brcmfmac/chip.c | 19 ++++++++++++------- - .../broadcom/brcm80211/brcmfmac/chip.h | 7 +++++-- - .../broadcom/brcm80211/brcmfmac/common.c | 5 +++++ - .../broadcom/brcm80211/brcmfmac/common.h | 1 - - .../broadcom/brcm80211/brcmfmac/pcie.c | 4 ++-- - .../broadcom/brcm80211/brcmfmac/sdio.c | 2 +- - .../broadcom/brcm80211/brcmfmac/settings.h | 4 ++++ - 7 files changed, 29 insertions(+), 13 deletions(-) - -diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c -index a3a257089696..039dcf7853a6 100644 ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c -@@ -733,7 +733,7 @@ static u32 brcmf_chip_tcm_rambase(struct brcmf_chip_priv *ci) - return 0; - } - --int brcmf_chip_get_raminfo(struct brcmf_chip *pub) -+int brcmf_chip_get_raminfo(struct brcmf_chip *pub, struct brcmf_mp_device *settings) - { - struct brcmf_chip_priv *ci = container_of(pub, struct brcmf_chip_priv, - pub); -@@ -744,7 +744,9 @@ int brcmf_chip_get_raminfo(struct brcmf_chip *pub) - if (mem) { - mem_core = container_of(mem, struct brcmf_core_priv, pub); - ci->pub.ramsize = brcmf_chip_tcm_ramsize(mem_core); -- ci->pub.rambase = brcmf_chip_tcm_rambase(ci); -+ ci->pub.rambase = (settings && -+ settings->rambase_addr > 0) ? settings->rambase_addr -+ : brcmf_chip_tcm_rambase(ci); - if (ci->pub.rambase == INVALID_RAMBASE) { - brcmf_err("RAM base not provided with ARM CR4 core\n"); - return -EINVAL; -@@ -755,7 +757,9 @@ int brcmf_chip_get_raminfo(struct brcmf_chip *pub) - mem_core = container_of(mem, struct brcmf_core_priv, - pub); - ci->pub.ramsize = brcmf_chip_sysmem_ramsize(mem_core); -- ci->pub.rambase = brcmf_chip_tcm_rambase(ci); -+ ci->pub.rambase = (settings && -+ settings->rambase_addr > 0) ? settings->rambase_addr -+ : brcmf_chip_tcm_rambase(ci); - if (ci->pub.rambase == INVALID_RAMBASE) { - brcmf_err("RAM base not provided with ARM CA7 core\n"); - return -EINVAL; -@@ -941,7 +945,7 @@ int brcmf_chip_dmp_erom_scan(struct brcmf_chip_priv *ci) - return 0; - } - --static int brcmf_chip_recognition(struct brcmf_chip_priv *ci) -+static int brcmf_chip_recognition(struct brcmf_chip_priv *ci, struct brcmf_mp_device *settings) - { - struct brcmf_core *core; - u32 regdata; -@@ -1014,7 +1018,7 @@ static int brcmf_chip_recognition(struct brcmf_chip_priv *ci) - brcmf_chip_set_passive(&ci->pub); - } - -- return brcmf_chip_get_raminfo(&ci->pub); -+ return brcmf_chip_get_raminfo(&ci->pub, settings); - } - - static void brcmf_chip_disable_arm(struct brcmf_chip_priv *chip, u16 id) -@@ -1088,7 +1092,8 @@ static int brcmf_chip_setup(struct brcmf_chip_priv *chip) - } - - struct brcmf_chip *brcmf_chip_attach(void *ctx, u16 devid, -- const struct brcmf_buscore_ops *ops) -+ const struct brcmf_buscore_ops *ops, -+ struct brcmf_mp_device *settings) - { - struct brcmf_chip_priv *chip; - int err = 0; -@@ -1117,7 +1122,7 @@ struct brcmf_chip *brcmf_chip_attach(void *ctx, - if (err < 0) - goto fail; - -- err = brcmf_chip_recognition(chip); -+ err = brcmf_chip_recognition(chip, settings); - if (err < 0) - goto fail; - -diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.h -index 8fa38658e727..7da0ef3129a0 100644 ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.h -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.h -@@ -7,6 +7,8 @@ - - #include - -+#include "settings.h" -+ - #define CORE_CC_REG(base, field) \ - (base + offsetof(struct chipcregs, field)) - -@@ -69,9 +71,10 @@ struct brcmf_buscore_ops { - void (*activate)(void *ctx, struct brcmf_chip *chip, u32 rstvec); - }; - --int brcmf_chip_get_raminfo(struct brcmf_chip *pub); -+int brcmf_chip_get_raminfo(struct brcmf_chip *pub, struct brcmf_mp_device *settings); - struct brcmf_chip *brcmf_chip_attach(void *ctx, u16 devid, -- const struct brcmf_buscore_ops *ops); -+ const struct brcmf_buscore_ops *ops, -+ struct brcmf_mp_device *settings); - void brcmf_chip_detach(struct brcmf_chip *chip); - struct brcmf_core *brcmf_chip_get_core(struct brcmf_chip *chip, u16 coreid); - struct brcmf_core *brcmf_chip_get_d11core(struct brcmf_chip *pub, u8 unit); -diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c -index e3758bd86acf..46a525278848 100644 ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c -@@ -67,6 +67,10 @@ static int brcmf_iapp_enable; - module_param_named(iapp, brcmf_iapp_enable, int, 0); - MODULE_PARM_DESC(iapp, "Enable partial support for the obsoleted Inter-Access Point Protocol"); - -+static uint brcmf_rambase_addr; -+module_param_named(rambase_addr, brcmf_rambase_addr, uint, 0); -+MODULE_PARM_DESC(rambase_addr, "Manually specify FW shared rambase address"); -+ - #ifdef DEBUG - /* always succeed brcmf_bus_started() */ - static int brcmf_ignore_probe_fail; -@@ -416,6 +420,7 @@ struct brcmf_mp_device *brcmf_get_module_param(struct device *dev, - #ifdef DEBUG - settings->ignore_probe_fail = !!brcmf_ignore_probe_fail; - #endif -+ settings->rambase_addr = brcmf_rambase_addr; - - if (bus_type == BRCMF_BUSTYPE_SDIO) - settings->bus.sdio.txglomsz = brcmf_sdiod_txglomsz; -diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h -index 6cde5ee13e7a..0da7eeeb7768 100644 ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h -@@ -6,7 +6,6 @@ - #define BRCMFMAC_COMMON_H - - #include --#include - #include "fwil_types.h" - #include "settings.h" - -diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c -index 39381cbde89e..a9575ae8add1 100644 ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c -@@ -1772,7 +1772,7 @@ static void brcmf_pcie_setup(struct device *dev, int ret, - nvram_len = fwreq->items[BRCMF_PCIE_FW_NVRAM].nv_data.len; - kfree(fwreq); - -- ret = brcmf_chip_get_raminfo(devinfo->ci); -+ ret = brcmf_chip_get_raminfo(devinfo->ci, devinfo->settings); - if (ret) { - brcmf_err(bus, "Failed to get RAM info\n"); - goto fail; -@@ -1884,8 +1884,8 @@ brcmf_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id) - - devinfo->pdev = pdev; - pcie_bus_dev = NULL; -- devinfo->ci = brcmf_chip_attach(devinfo, pdev->device, -- &brcmf_pcie_buscore_ops); -+ devinfo->ci = brcmf_chip_attach(devinfo, pdev->device, -+ &brcmf_pcie_buscore_ops, devinfo->settings); - if (IS_ERR(devinfo->ci)) { - ret = PTR_ERR(devinfo->ci); - devinfo->ci = NULL; -diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c -index ac3ee93a2378..d4bf1c7e3c81 100644 ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c -@@ -3962,7 +3962,7 @@ brcmf_sdio_probe_attach(struct brcmf_sdio *bus) - goto fail; - } - -- bus->ci = brcmf_chip_attach(sdiodev, sdiodev->func1->device, -- &brcmf_sdio_buscore_ops); -+ bus->ci = brcmf_chip_attach(sdiodev, sdiodev->func1->device, -+ &brcmf_sdio_buscore_ops, sdiodev->settings); - if (IS_ERR(bus->ci)) { - brcmf_err("brcmf_chip_attach failed!\n"); - bus->ci = NULL; -diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/settings.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/settings.h -index 7bab0d362cdd..160e32f32bd8 100644 ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/settings.h -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/settings.h -@@ -4,6 +4,8 @@ - #ifndef BRCMFMAC_SETTINGS_H - #define BRCMFMAC_SETTINGS_H - -+#include -+ - /* Definition for the device specific settings are defined here. One struct - * is used called brcmf_mp_device. The device specific settings is part of - * the drvr struct and should be initialized on every brcmf_attach. -@@ -19,6 +21,7 @@ - * @ignore_probe_fail: Ignore probe failure. - * @country_codes: If available, pointer to struct for translating country codes - * @bus: Bus specific platform data. Only SDIO at the mmoment. -+ * @rambase_addr: Manually specified FW shared rambase address. - */ - struct brcmf_mp_device { - bool p2p_enable; -@@ -32,6 +35,7 @@ struct brcmf_mp_device { - union { - struct brcmfmac_sdio_pd sdio; - } bus; -+ u32 rambase_addr; - }; - - #endif /* BRCMFMAC_SETTINGS_H */ --- -2.30.0 - diff --git a/8001-brcmfmac-pcie-Declare-missing-firmware-files-in-pcie.patch b/8001-brcmfmac-pcie-Declare-missing-firmware-files-in-pcie.patch new file mode 100644 index 0000000..3aa14c8 --- /dev/null +++ b/8001-brcmfmac-pcie-Declare-missing-firmware-files-in-pcie.patch @@ -0,0 +1,49 @@ +From 3f43bc112ea442739258e2c6b143408c7c45e2e9 Mon Sep 17 00:00:00 2001 +From: Hector Martin +Date: Tue, 21 Dec 2021 19:32:16 +0900 +Subject: [PATCH 01/34] brcmfmac: pcie: Declare missing firmware files in + pcie.c + +Move one of the declarations from sdio.c to pcie.c, since it makes no +sense in the former (SDIO support is optional), and add missing ones. + +Signed-off-by: Hector Martin +Fixes: 75729e110e68 ("brcmfmac: expose firmware config files through modinfo") +--- + drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 7 +++++++ + drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 1 - + 2 files changed, 7 insertions(+), 1 deletion(-) + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +index 8b149996f..aed49416c 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +@@ -59,6 +59,13 @@ BRCMF_FW_DEF(4366B, "brcmfmac4366b-pcie"); + BRCMF_FW_DEF(4366C, "brcmfmac4366c-pcie"); + BRCMF_FW_DEF(4371, "brcmfmac4371-pcie"); + ++/* firmware config files */ ++MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH "brcmfmac*-pcie.txt"); ++MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH "brcmfmac*-pcie.*.txt"); ++ ++/* per-board firmware binaries */ ++MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH "brcmfmac*-pcie.*.bin"); ++ + static const struct brcmf_firmware_mapping brcmf_pcie_fwnames[] = { + BRCMF_FW_ENTRY(BRCM_CC_43602_CHIP_ID, 0xFFFFFFFF, 43602), + BRCMF_FW_ENTRY(BRCM_CC_43465_CHIP_ID, 0xFFFFFFF0, 4366C), +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +index 8effeb7a7..5d156e591 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +@@ -629,7 +629,6 @@ BRCMF_FW_CLM_DEF(43752, "brcmfmac43752-sdio"); + + /* firmware config files */ + MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH "brcmfmac*-sdio.*.txt"); +-MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH "brcmfmac*-pcie.*.txt"); + + /* per-board firmware binaries */ + MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH "brcmfmac*-sdio.*.bin"); +-- +2.34.1 + diff --git a/8002-brcmfmac-firmware-Support-having-multiple-alt-paths.patch b/8002-brcmfmac-firmware-Support-having-multiple-alt-paths.patch new file mode 100644 index 0000000..fda0a3b --- /dev/null +++ b/8002-brcmfmac-firmware-Support-having-multiple-alt-paths.patch @@ -0,0 +1,166 @@ +From 59c61aa5ad2e12fdbccb5712d35c203cf9079230 Mon Sep 17 00:00:00 2001 +From: Hector Martin +Date: Sat, 18 Dec 2021 20:38:34 +0900 +Subject: [PATCH 02/34] brcmfmac: firmware: Support having multiple alt paths + +Apple platforms have firmware and config files identified with multiple +dimensions. We want to be able to find the most specific firmware +available for any given platform, progressively trying more general +firmwares. + +First, add support for having multiple alternate firmware paths. + +Signed-off-by: Hector Martin +--- + .../broadcom/brcm80211/brcmfmac/firmware.c | 74 ++++++++++++++----- + 1 file changed, 55 insertions(+), 19 deletions(-) + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c +index 0eb13e5df..dff974955 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c +@@ -427,6 +427,8 @@ void brcmf_fw_nvram_free(void *nvram) + struct brcmf_fw { + struct device *dev; + struct brcmf_fw_request *req; ++ const char **alt_paths; ++ int alt_index; + u32 curpos; + void (*done)(struct device *dev, int err, struct brcmf_fw_request *req); + }; +@@ -592,9 +594,10 @@ static int brcmf_fw_complete_request(const struct firmware *fw, + return (cur->flags & BRCMF_FW_REQF_OPTIONAL) ? 0 : ret; + } + +-static char *brcm_alt_fw_path(const char *path, const char *board_type) ++static const char **brcm_alt_fw_paths(const char *path, const char *board_type) + { + char alt_path[BRCMF_FW_NAME_LEN]; ++ char **alt_paths; + char suffix[5]; + + strscpy(alt_path, path, BRCMF_FW_NAME_LEN); +@@ -609,27 +612,45 @@ static char *brcm_alt_fw_path(const char *path, const char *board_type) + strlcat(alt_path, board_type, BRCMF_FW_NAME_LEN); + strlcat(alt_path, suffix, BRCMF_FW_NAME_LEN); + +- return kstrdup(alt_path, GFP_KERNEL); ++ alt_paths = kzalloc(sizeof(char *) * 2, GFP_KERNEL); ++ alt_paths[0] = kstrdup(alt_path, GFP_KERNEL); ++ ++ return (const char **)alt_paths; ++} ++ ++static void brcm_free_alt_fw_paths(const char **alt_paths) ++{ ++ int i; ++ ++ if (!alt_paths) ++ return; ++ ++ for (i = 0; alt_paths[i]; i++) ++ kfree(alt_paths[i]); ++ ++ kfree(alt_paths); + } + + static int brcmf_fw_request_firmware(const struct firmware **fw, + struct brcmf_fw *fwctx) + { + struct brcmf_fw_item *cur = &fwctx->req->items[fwctx->curpos]; +- int ret; ++ int ret, i; + + /* Files can be board-specific, first try a board-specific path */ + if (cur->type == BRCMF_FW_TYPE_NVRAM && fwctx->req->board_type) { +- char *alt_path; +- +- alt_path = brcm_alt_fw_path(cur->path, fwctx->req->board_type); +- if (!alt_path) ++ const char **alt_paths = brcm_alt_fw_paths(cur->path, fwctx); ++ if (!alt_paths) + goto fallback; + +- ret = request_firmware(fw, alt_path, fwctx->dev); +- kfree(alt_path); +- if (ret == 0) +- return ret; ++ for (i = 0; alt_paths[i]; i++) { ++ ret = firmware_request_nowarn(fw, alt_paths[i], fwctx->dev); ++ if (ret == 0) { ++ brcm_free_alt_fw_paths(alt_paths); ++ return ret; ++ } ++ } ++ brcm_free_alt_fw_paths(alt_paths); + } + + fallback: +@@ -641,6 +662,9 @@ static void brcmf_fw_request_done(const struct firmware *fw, void *ctx) + struct brcmf_fw *fwctx = ctx; + int ret; + ++ brcm_free_alt_fw_paths(fwctx->alt_paths); ++ fwctx->alt_paths = NULL; ++ + ret = brcmf_fw_complete_request(fw, fwctx); + + while (ret == 0 && ++fwctx->curpos < fwctx->req->n_items) { +@@ -662,13 +686,26 @@ static void brcmf_fw_request_done_alt_path(const struct firmware *fw, void *ctx) + struct brcmf_fw_item *first = &fwctx->req->items[0]; + int ret = 0; + +- /* Fall back to canonical path if board firmware not found */ +- if (!fw) ++ if (fw) { ++ brcmf_fw_request_done(fw, ctx); ++ return; ++ } ++ ++ fwctx->alt_index++; ++ if (fwctx->alt_paths[fwctx->alt_index]) { ++ /* Try the next alt firmware */ ++ ret = request_firmware_nowait(THIS_MODULE, true, ++ fwctx->alt_paths[fwctx->alt_index], ++ fwctx->dev, GFP_KERNEL, fwctx, ++ brcmf_fw_request_done_alt_path); ++ } else { ++ /* Fall back to canonical path if board firmware not found */ + ret = request_firmware_nowait(THIS_MODULE, true, first->path, + fwctx->dev, GFP_KERNEL, fwctx, + brcmf_fw_request_done); ++ } + +- if (fw || ret < 0) ++ if (ret < 0) + brcmf_fw_request_done(fw, ctx); + } + +@@ -693,7 +730,6 @@ int brcmf_fw_get_firmwares(struct device *dev, struct brcmf_fw_request *req, + { + struct brcmf_fw_item *first = &req->items[0]; + struct brcmf_fw *fwctx; +- char *alt_path; + int ret; + + brcmf_dbg(TRACE, "enter: dev=%s\n", dev_name(dev)); +@@ -712,12 +748,12 @@ int brcmf_fw_get_firmwares(struct device *dev, struct brcmf_fw_request *req, + fwctx->done = fw_cb; + + /* First try alternative board-specific path if any */ +- alt_path = brcm_alt_fw_path(first->path, fwctx->req->board_type); +- if (alt_path) { +- ret = request_firmware_nowait(THIS_MODULE, true, alt_path, ++ fwctx->alt_paths = brcm_alt_fw_paths(first->path, fwctx); ++ if (fwctx->alt_paths) { ++ fwctx->alt_index = 0; ++ ret = request_firmware_nowait(THIS_MODULE, true, fwctx->alt_paths[0], + fwctx->dev, GFP_KERNEL, fwctx, + brcmf_fw_request_done_alt_path); +- kfree(alt_path); + } else { + ret = request_firmware_nowait(THIS_MODULE, true, first->path, + fwctx->dev, GFP_KERNEL, fwctx, +-- +2.34.1 + diff --git a/8003-brcmfmac-firmware-Handle-per-board-clm_blob-files.patch b/8003-brcmfmac-firmware-Handle-per-board-clm_blob-files.patch new file mode 100644 index 0000000..1698bfc --- /dev/null +++ b/8003-brcmfmac-firmware-Handle-per-board-clm_blob-files.patch @@ -0,0 +1,56 @@ +From 637e3946944e25c98c8955ec2a84133b79afca4d Mon Sep 17 00:00:00 2001 +From: Hector Martin +Date: Sat, 18 Dec 2021 20:52:04 +0900 +Subject: [PATCH 03/34] brcmfmac: firmware: Handle per-board clm_blob files + +Teach brcm_alt_fw_paths to correctly split off variable length +extensions, and enable alt firmware lookups for the CLM blob firmware +requests. + +Apple platforms have per-board CLM blob files. + +Signed-off-by: Hector Martin +--- + .../broadcom/brcm80211/brcmfmac/firmware.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c +index dff974955..16f342bc5 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c +@@ -598,16 +598,16 @@ static const char **brcm_alt_fw_paths(const char *path, const char *board_type) + { + char alt_path[BRCMF_FW_NAME_LEN]; + char **alt_paths; +- char suffix[5]; ++ const char *suffix; + +- strscpy(alt_path, path, BRCMF_FW_NAME_LEN); +- /* At least one character + suffix */ +- if (strlen(alt_path) < 5) ++ suffix = strrchr(path, '.'); ++ if (!suffix || suffix == path) + return NULL; + +- /* strip .txt or .bin at the end */ +- strscpy(suffix, alt_path + strlen(alt_path) - 4, 5); +- alt_path[strlen(alt_path) - 4] = 0; ++ /* strip extension at the end */ ++ strscpy(alt_path, path, BRCMF_FW_NAME_LEN); ++ alt_path[suffix - path] = 0; ++ + strlcat(alt_path, ".", BRCMF_FW_NAME_LEN); + strlcat(alt_path, board_type, BRCMF_FW_NAME_LEN); + strlcat(alt_path, suffix, BRCMF_FW_NAME_LEN); +@@ -638,7 +638,7 @@ static int brcmf_fw_request_firmware(const struct firmware **fw, + int ret, i; + + /* Files can be board-specific, first try a board-specific path */ +- if (cur->type == BRCMF_FW_TYPE_NVRAM && fwctx->req->board_type) { ++ if (fwctx->req->board_type) { + const char **alt_paths = brcm_alt_fw_paths(cur->path, fwctx); + if (!alt_paths) + goto fallback; +-- +2.34.1 + diff --git a/8004-brcmfmac-pcie-sdio-usb-Get-CLM-blob-via-standard-fir.patch b/8004-brcmfmac-pcie-sdio-usb-Get-CLM-blob-via-standard-fir.patch new file mode 100644 index 0000000..a7b4088 --- /dev/null +++ b/8004-brcmfmac-pcie-sdio-usb-Get-CLM-blob-via-standard-fir.patch @@ -0,0 +1,374 @@ +From 10ae20866cddd7ba8421dfa331d617c36e1510f6 Mon Sep 17 00:00:00 2001 +From: Hector Martin +Date: Tue, 21 Dec 2021 17:13:49 +0900 +Subject: [PATCH 04/34] brcmfmac: pcie/sdio/usb: Get CLM blob via standard + firmware mechanism + +Now that the firmware fetcher can handle per-board CLM files, load the +CLM blob alongside the other firmware files and change the bus API to +just return the existing blob, instead of fetching the filename. + +This enables per-board CLM blobs, which are required on Apple platforms. + +Signed-off-by: Hector Martin +--- + .../broadcom/brcm80211/brcmfmac/bus.h | 19 ++++++--- + .../broadcom/brcm80211/brcmfmac/common.c | 12 +----- + .../broadcom/brcm80211/brcmfmac/pcie.c | 39 ++++++++++++------- + .../broadcom/brcm80211/brcmfmac/sdio.c | 36 ++++++++++------- + .../broadcom/brcm80211/brcmfmac/sdio.h | 2 + + .../broadcom/brcm80211/brcmfmac/usb.c | 23 +++-------- + 6 files changed, 69 insertions(+), 62 deletions(-) + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h +index 3f5da3bb6..b13af8f63 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h +@@ -7,6 +7,8 @@ + #define BRCMFMAC_BUS_H + + #include "debug.h" ++#include ++#include + + /* IDs of the 6 default common rings of msgbuf protocol */ + #define BRCMF_H2D_MSGRING_CONTROL_SUBMIT 0 +@@ -34,6 +36,11 @@ enum brcmf_bus_protocol_type { + BRCMF_PROTO_MSGBUF + }; + ++/* Firmware blobs that may be available */ ++enum brcmf_blob_type { ++ BRCMF_BLOB_CLM, ++}; ++ + struct brcmf_mp_device; + + struct brcmf_bus_dcmd { +@@ -60,7 +67,7 @@ struct brcmf_bus_dcmd { + * @wowl_config: specify if dongle is configured for wowl when going to suspend + * @get_ramsize: obtain size of device memory. + * @get_memdump: obtain device memory dump in provided buffer. +- * @get_fwname: obtain firmware name. ++ * @get_blob: obtain a firmware blob. + * + * This structure provides an abstract interface towards the + * bus specific driver. For control messages to common driver +@@ -77,8 +84,8 @@ struct brcmf_bus_ops { + void (*wowl_config)(struct device *dev, bool enabled); + size_t (*get_ramsize)(struct device *dev); + int (*get_memdump)(struct device *dev, void *data, size_t len); +- int (*get_fwname)(struct device *dev, const char *ext, +- unsigned char *fw_name); ++ int (*get_blob)(struct device *dev, const struct firmware **fw, ++ enum brcmf_blob_type type); + void (*debugfs_create)(struct device *dev); + int (*reset)(struct device *dev); + }; +@@ -220,10 +227,10 @@ int brcmf_bus_get_memdump(struct brcmf_bus *bus, void *data, size_t len) + } + + static inline +-int brcmf_bus_get_fwname(struct brcmf_bus *bus, const char *ext, +- unsigned char *fw_name) ++int brcmf_bus_get_blob(struct brcmf_bus *bus, const struct firmware **fw, ++ enum brcmf_blob_type type) + { +- return bus->ops->get_fwname(bus->dev, ext, fw_name); ++ return bus->ops->get_blob(bus->dev, fw, type); + } + + static inline +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c +index e3758bd86..b8ed85112 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c +@@ -123,7 +123,6 @@ static int brcmf_c_process_clm_blob(struct brcmf_if *ifp) + struct brcmf_bus *bus = drvr->bus_if; + struct brcmf_dload_data_le *chunk_buf; + const struct firmware *clm = NULL; +- u8 clm_name[BRCMF_FW_NAME_LEN]; + u32 chunk_len; + u32 datalen; + u32 cumulative_len; +@@ -133,15 +132,8 @@ static int brcmf_c_process_clm_blob(struct brcmf_if *ifp) + + brcmf_dbg(TRACE, "Enter\n"); + +- memset(clm_name, 0, sizeof(clm_name)); +- err = brcmf_bus_get_fwname(bus, ".clm_blob", clm_name); +- if (err) { +- bphy_err(drvr, "get CLM blob file name failed (%d)\n", err); +- return err; +- } +- +- err = firmware_request_nowarn(&clm, clm_name, bus->dev); +- if (err) { ++ err = brcmf_bus_get_blob(bus, &clm, BRCMF_BLOB_CLM); ++ if (err || !clm) { + brcmf_info("no clm_blob available (err=%d), device may have limited channels available\n", + err); + return 0; +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +index aed49416c..ab0503c6f 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +@@ -65,6 +65,7 @@ MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH "brcmfmac*-pcie.*.txt"); + + /* per-board firmware binaries */ + MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH "brcmfmac*-pcie.*.bin"); ++MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH "brcmfmac*-pcie.*.clm_blob"); + + static const struct brcmf_firmware_mapping brcmf_pcie_fwnames[] = { + BRCMF_FW_ENTRY(BRCM_CC_43602_CHIP_ID, 0xFFFFFFFF, 43602), +@@ -260,6 +261,8 @@ struct brcmf_pciedev_info { + struct pci_dev *pdev; + char fw_name[BRCMF_FW_NAME_LEN]; + char nvram_name[BRCMF_FW_NAME_LEN]; ++ char clm_name[BRCMF_FW_NAME_LEN]; ++ const struct firmware *clm_fw; + void __iomem *regs; + void __iomem *tcm; + u32 ram_base; +@@ -1408,23 +1411,25 @@ static int brcmf_pcie_get_memdump(struct device *dev, void *data, size_t len) + return 0; + } + +-static +-int brcmf_pcie_get_fwname(struct device *dev, const char *ext, u8 *fw_name) ++static int brcmf_pcie_get_blob(struct device *dev, const struct firmware **fw, ++ enum brcmf_blob_type type) + { + struct brcmf_bus *bus_if = dev_get_drvdata(dev); +- struct brcmf_fw_request *fwreq; +- struct brcmf_fw_name fwnames[] = { +- { ext, fw_name }, +- }; ++ struct brcmf_pciedev *buspub = bus_if->bus_priv.pcie; ++ struct brcmf_pciedev_info *devinfo = buspub->devinfo; + +- fwreq = brcmf_fw_alloc_request(bus_if->chip, bus_if->chiprev, +- brcmf_pcie_fwnames, +- ARRAY_SIZE(brcmf_pcie_fwnames), +- fwnames, ARRAY_SIZE(fwnames)); +- if (!fwreq) +- return -ENOMEM; ++ switch (type) { ++ case BRCMF_BLOB_CLM: ++ *fw = devinfo->clm_fw; ++ devinfo->clm_fw = NULL; ++ break; ++ default: ++ return -ENOENT; ++ } ++ ++ if (!*fw) ++ return -ENOENT; + +- kfree(fwreq); + return 0; + } + +@@ -1470,7 +1475,7 @@ static const struct brcmf_bus_ops brcmf_pcie_bus_ops = { + .wowl_config = brcmf_pcie_wowl_config, + .get_ramsize = brcmf_pcie_get_ramsize, + .get_memdump = brcmf_pcie_get_memdump, +- .get_fwname = brcmf_pcie_get_fwname, ++ .get_blob = brcmf_pcie_get_blob, + .reset = brcmf_pcie_reset, + }; + +@@ -1755,6 +1760,7 @@ static const struct brcmf_buscore_ops brcmf_pcie_buscore_ops = { + + #define BRCMF_PCIE_FW_CODE 0 + #define BRCMF_PCIE_FW_NVRAM 1 ++#define BRCMF_PCIE_FW_CLM 2 + + static void brcmf_pcie_setup(struct device *dev, int ret, + struct brcmf_fw_request *fwreq) +@@ -1779,6 +1785,7 @@ static void brcmf_pcie_setup(struct device *dev, int ret, + fw = fwreq->items[BRCMF_PCIE_FW_CODE].binary; + nvram = fwreq->items[BRCMF_PCIE_FW_NVRAM].nv_data.data; + nvram_len = fwreq->items[BRCMF_PCIE_FW_NVRAM].nv_data.len; ++ devinfo->clm_fw = fwreq->items[BRCMF_PCIE_FW_CLM].binary; + kfree(fwreq); + + ret = brcmf_chip_get_raminfo(devinfo->ci); +@@ -1855,6 +1862,7 @@ brcmf_pcie_prepare_fw_request(struct brcmf_pciedev_info *devinfo) + struct brcmf_fw_name fwnames[] = { + { ".bin", devinfo->fw_name }, + { ".txt", devinfo->nvram_name }, ++ { ".clm_blob", devinfo->clm_name }, + }; + + fwreq = brcmf_fw_alloc_request(devinfo->ci->chip, devinfo->ci->chiprev, +@@ -1867,6 +1875,8 @@ brcmf_pcie_prepare_fw_request(struct brcmf_pciedev_info *devinfo) + fwreq->items[BRCMF_PCIE_FW_CODE].type = BRCMF_FW_TYPE_BINARY; + fwreq->items[BRCMF_PCIE_FW_NVRAM].type = BRCMF_FW_TYPE_NVRAM; + fwreq->items[BRCMF_PCIE_FW_NVRAM].flags = BRCMF_FW_REQF_OPTIONAL; ++ fwreq->items[BRCMF_PCIE_FW_CLM].type = BRCMF_FW_TYPE_BINARY; ++ fwreq->items[BRCMF_PCIE_FW_CLM].flags = BRCMF_FW_REQF_OPTIONAL; + fwreq->board_type = devinfo->settings->board_type; + /* NVRAM reserves PCI domain 0 for Broadcom's SDK faked bus */ + fwreq->domain_nr = pci_domain_nr(devinfo->pdev->bus) + 1; +@@ -2005,6 +2015,7 @@ brcmf_pcie_remove(struct pci_dev *pdev) + brcmf_pcie_release_ringbuffers(devinfo); + brcmf_pcie_reset_device(devinfo); + brcmf_pcie_release_resource(devinfo); ++ release_firmware(devinfo->clm_fw); + + if (devinfo->ci) + brcmf_chip_detach(devinfo->ci); +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +index 5d156e591..7466e6fd6 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +@@ -4129,23 +4129,24 @@ brcmf_sdio_watchdog(struct timer_list *t) + } + } + +-static +-int brcmf_sdio_get_fwname(struct device *dev, const char *ext, u8 *fw_name) ++static int brcmf_sdio_get_blob(struct device *dev, const struct firmware **fw, ++ enum brcmf_blob_type type) + { + struct brcmf_bus *bus_if = dev_get_drvdata(dev); +- struct brcmf_fw_request *fwreq; +- struct brcmf_fw_name fwnames[] = { +- { ext, fw_name }, +- }; ++ struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv.sdio; + +- fwreq = brcmf_fw_alloc_request(bus_if->chip, bus_if->chiprev, +- brcmf_sdio_fwnames, +- ARRAY_SIZE(brcmf_sdio_fwnames), +- fwnames, ARRAY_SIZE(fwnames)); +- if (!fwreq) +- return -ENOMEM; ++ switch (type) { ++ case BRCMF_BLOB_CLM: ++ *fw = sdiodev->clm_fw; ++ sdiodev->clm_fw = NULL; ++ break; ++ default: ++ return -ENOENT; ++ } ++ ++ if (!*fw) ++ return -ENOENT; + +- kfree(fwreq); + return 0; + } + +@@ -4188,13 +4189,14 @@ static const struct brcmf_bus_ops brcmf_sdio_bus_ops = { + .wowl_config = brcmf_sdio_wowl_config, + .get_ramsize = brcmf_sdio_bus_get_ramsize, + .get_memdump = brcmf_sdio_bus_get_memdump, +- .get_fwname = brcmf_sdio_get_fwname, ++ .get_blob = brcmf_sdio_get_blob, + .debugfs_create = brcmf_sdio_debugfs_create, + .reset = brcmf_sdio_bus_reset + }; + + #define BRCMF_SDIO_FW_CODE 0 + #define BRCMF_SDIO_FW_NVRAM 1 ++#define BRCMF_SDIO_FW_CLM 2 + + static void brcmf_sdio_firmware_callback(struct device *dev, int err, + struct brcmf_fw_request *fwreq) +@@ -4217,6 +4219,7 @@ static void brcmf_sdio_firmware_callback(struct device *dev, int err, + code = fwreq->items[BRCMF_SDIO_FW_CODE].binary; + nvram = fwreq->items[BRCMF_SDIO_FW_NVRAM].nv_data.data; + nvram_len = fwreq->items[BRCMF_SDIO_FW_NVRAM].nv_data.len; ++ sdiod->clm_fw = fwreq->items[BRCMF_SDIO_FW_CLM].binary; + kfree(fwreq); + + /* try to download image and nvram to the dongle */ +@@ -4415,6 +4418,7 @@ brcmf_sdio_prepare_fw_request(struct brcmf_sdio *bus) + struct brcmf_fw_name fwnames[] = { + { ".bin", bus->sdiodev->fw_name }, + { ".txt", bus->sdiodev->nvram_name }, ++ { ".clm_blob", bus->sdiodev->clm_name }, + }; + + fwreq = brcmf_fw_alloc_request(bus->ci->chip, bus->ci->chiprev, +@@ -4426,6 +4430,8 @@ brcmf_sdio_prepare_fw_request(struct brcmf_sdio *bus) + + fwreq->items[BRCMF_SDIO_FW_CODE].type = BRCMF_FW_TYPE_BINARY; + fwreq->items[BRCMF_SDIO_FW_NVRAM].type = BRCMF_FW_TYPE_NVRAM; ++ fwreq->items[BRCMF_SDIO_FW_CLM].type = BRCMF_FW_TYPE_BINARY; ++ fwreq->items[BRCMF_SDIO_FW_CLM].flags = BRCMF_FW_REQF_OPTIONAL; + fwreq->board_type = bus->sdiodev->settings->board_type; + + return fwreq; +@@ -4582,6 +4588,8 @@ void brcmf_sdio_remove(struct brcmf_sdio *bus) + if (bus->sdiodev->settings) + brcmf_release_module_param(bus->sdiodev->settings); + ++ release_firmware(bus->sdiodev->clm_fw); ++ bus->sdiodev->clm_fw = NULL; + kfree(bus->rxbuf); + kfree(bus->hdrbuf); + kfree(bus); +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h +index 15d2c02fa..7b74c295e 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h +@@ -186,9 +186,11 @@ struct brcmf_sdio_dev { + struct sg_table sgtable; + char fw_name[BRCMF_FW_NAME_LEN]; + char nvram_name[BRCMF_FW_NAME_LEN]; ++ char clm_name[BRCMF_FW_NAME_LEN]; + bool wowl_enabled; + enum brcmf_sdiod_state state; + struct brcmf_sdiod_freezer *freezer; ++ const struct firmware *clm_fw; + }; + + /* sdio core registers */ +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c +index 9fb68c2dc..85e18fb9c 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c +@@ -1154,24 +1154,11 @@ struct brcmf_usbdev *brcmf_usb_attach(struct brcmf_usbdev_info *devinfo, + return NULL; + } + +-static +-int brcmf_usb_get_fwname(struct device *dev, const char *ext, u8 *fw_name) ++static int brcmf_usb_get_blob(struct device *dev, const struct firmware **fw, ++ enum brcmf_blob_type type) + { +- struct brcmf_bus *bus = dev_get_drvdata(dev); +- struct brcmf_fw_request *fwreq; +- struct brcmf_fw_name fwnames[] = { +- { ext, fw_name }, +- }; +- +- fwreq = brcmf_fw_alloc_request(bus->chip, bus->chiprev, +- brcmf_usb_fwnames, +- ARRAY_SIZE(brcmf_usb_fwnames), +- fwnames, ARRAY_SIZE(fwnames)); +- if (!fwreq) +- return -ENOMEM; +- +- kfree(fwreq); +- return 0; ++ /* No blobs for USB devices... */ ++ return -ENOENT; + } + + static const struct brcmf_bus_ops brcmf_usb_bus_ops = { +@@ -1180,7 +1167,7 @@ static const struct brcmf_bus_ops brcmf_usb_bus_ops = { + .txdata = brcmf_usb_tx, + .txctl = brcmf_usb_tx_ctlpkt, + .rxctl = brcmf_usb_rx_ctlpkt, +- .get_fwname = brcmf_usb_get_fwname, ++ .get_blob = brcmf_usb_get_blob, + }; + + #define BRCMF_USB_FW_CODE 0 +-- +2.34.1 + diff --git a/8005-brcmfmac-firmware-Support-passing-in-multiple-board_.patch b/8005-brcmfmac-firmware-Support-passing-in-multiple-board_.patch new file mode 100644 index 0000000..d4108a5 --- /dev/null +++ b/8005-brcmfmac-firmware-Support-passing-in-multiple-board_.patch @@ -0,0 +1,135 @@ +From 880d3f98041005210a332974c3b19e0116e14053 Mon Sep 17 00:00:00 2001 +From: Hector Martin +Date: Tue, 21 Dec 2021 17:38:37 +0900 +Subject: [PATCH 05/34] brcmfmac: firmware: Support passing in multiple + board_types + +In order to make use of the multiple alt_path functionality, change +board_type to an array. Bus drivers can pass in a NULL-terminated list +of board type strings to try for the firmware fetch. + +Signed-off-by: Hector Martin +--- + .../broadcom/brcm80211/brcmfmac/firmware.c | 35 +++++++++++++------ + .../broadcom/brcm80211/brcmfmac/firmware.h | 2 +- + .../broadcom/brcm80211/brcmfmac/pcie.c | 7 +++- + .../broadcom/brcm80211/brcmfmac/sdio.c | 4 ++- + 4 files changed, 35 insertions(+), 13 deletions(-) + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c +index 16f342bc5..02e36fa3d 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c +@@ -594,26 +594,41 @@ static int brcmf_fw_complete_request(const struct firmware *fw, + return (cur->flags & BRCMF_FW_REQF_OPTIONAL) ? 0 : ret; + } + +-static const char **brcm_alt_fw_paths(const char *path, const char *board_type) ++static const char **brcm_alt_fw_paths(const char *path, struct brcmf_fw *fwctx) + { ++ const char **board_types = fwctx->req->board_types; ++ int board_type_count = 0; ++ int i; + char alt_path[BRCMF_FW_NAME_LEN]; + char **alt_paths; + const char *suffix; + ++ if (!board_types || !board_types[0]) ++ return NULL; ++ ++ while (*board_types++) ++ board_type_count++; ++ + suffix = strrchr(path, '.'); + if (!suffix || suffix == path) + return NULL; + +- /* strip extension at the end */ +- strscpy(alt_path, path, BRCMF_FW_NAME_LEN); +- alt_path[suffix - path] = 0; ++ alt_paths = kzalloc(sizeof(char *) * (board_type_count + 1), ++ GFP_KERNEL); ++ ++ board_types = fwctx->req->board_types; ++ for (i = 0; i < board_type_count; i++) { ++ /* strip extension at the end */ ++ strscpy(alt_path, path, BRCMF_FW_NAME_LEN); ++ alt_path[suffix - path] = 0; + +- strlcat(alt_path, ".", BRCMF_FW_NAME_LEN); +- strlcat(alt_path, board_type, BRCMF_FW_NAME_LEN); +- strlcat(alt_path, suffix, BRCMF_FW_NAME_LEN); ++ strlcat(alt_path, ".", BRCMF_FW_NAME_LEN); ++ strlcat(alt_path, board_types[i], BRCMF_FW_NAME_LEN); ++ strlcat(alt_path, suffix, BRCMF_FW_NAME_LEN); + +- alt_paths = kzalloc(sizeof(char *) * 2, GFP_KERNEL); +- alt_paths[0] = kstrdup(alt_path, GFP_KERNEL); ++ alt_paths[i] = kstrdup(alt_path, GFP_KERNEL); ++ brcmf_dbg(TRACE, "FW alt path: %s\n", alt_paths[i]); ++ } + + return (const char **)alt_paths; + } +@@ -638,7 +653,7 @@ static int brcmf_fw_request_firmware(const struct firmware **fw, + int ret, i; + + /* Files can be board-specific, first try a board-specific path */ +- if (fwctx->req->board_type) { ++ if (fwctx->req->board_types) { + const char **alt_paths = brcm_alt_fw_paths(cur->path, fwctx); + if (!alt_paths) + goto fallback; +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.h +index e290dec9c..d94a1d5be 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.h ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.h +@@ -66,7 +66,7 @@ struct brcmf_fw_request { + u16 domain_nr; + u16 bus_nr; + u32 n_items; +- const char *board_type; ++ const char **board_types; + struct brcmf_fw_item items[]; + }; + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +index ab0503c6f..0e4ba33fb 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +@@ -1877,11 +1877,16 @@ brcmf_pcie_prepare_fw_request(struct brcmf_pciedev_info *devinfo) + fwreq->items[BRCMF_PCIE_FW_NVRAM].flags = BRCMF_FW_REQF_OPTIONAL; + fwreq->items[BRCMF_PCIE_FW_CLM].type = BRCMF_FW_TYPE_BINARY; + fwreq->items[BRCMF_PCIE_FW_CLM].flags = BRCMF_FW_REQF_OPTIONAL; +- fwreq->board_type = devinfo->settings->board_type; + /* NVRAM reserves PCI domain 0 for Broadcom's SDK faked bus */ + fwreq->domain_nr = pci_domain_nr(devinfo->pdev->bus) + 1; + fwreq->bus_nr = devinfo->pdev->bus->number; + ++ brcmf_dbg(PCIE, "Board: %s\n", devinfo->settings->board_type); ++ fwreq->board_types = devm_kzalloc(&devinfo->pdev->dev, ++ sizeof(const char *) * 2, ++ GFP_KERNEL); ++ fwreq->board_types[0] = devinfo->settings->board_type; ++ + return fwreq; + } + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +index 7466e6fd6..32f457bf0 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +@@ -4432,7 +4432,9 @@ brcmf_sdio_prepare_fw_request(struct brcmf_sdio *bus) + fwreq->items[BRCMF_SDIO_FW_NVRAM].type = BRCMF_FW_TYPE_NVRAM; + fwreq->items[BRCMF_SDIO_FW_CLM].type = BRCMF_FW_TYPE_BINARY; + fwreq->items[BRCMF_SDIO_FW_CLM].flags = BRCMF_FW_REQF_OPTIONAL; +- fwreq->board_type = bus->sdiodev->settings->board_type; ++ fwreq->board_types = devm_kzalloc(bus->sdiodev->dev, ++ sizeof(const char *) * 2, GFP_KERNEL); ++ fwreq->board_types[0] = bus->sdiodev->settings->board_type; + + return fwreq; + } +-- +2.34.1 + diff --git a/8006-brcmfmac-pcie-Read-Apple-OTP-information.patch b/8006-brcmfmac-pcie-Read-Apple-OTP-information.patch new file mode 100644 index 0000000..71ec737 --- /dev/null +++ b/8006-brcmfmac-pcie-Read-Apple-OTP-information.patch @@ -0,0 +1,301 @@ +From 18b840ed5dc7084d4ba83345a63a7f5f33cec013 Mon Sep 17 00:00:00 2001 +From: Hector Martin +Date: Tue, 21 Dec 2021 17:26:34 +0900 +Subject: [PATCH 06/34] brcmfmac: pcie: Read Apple OTP information + +On Apple platforms, the One Time Programmable ROM in the Broadcom chips +contains information about the specific board design (module, vendor, +version) that is required to select the correct NVRAM file. Parse this +OTP ROM and extract the required strings. + +Note that the user OTP offset/size is per-chip. This patch does not add +any chips yet. + +Signed-off-by: Hector Martin +--- + .../broadcom/brcm80211/brcmfmac/pcie.c | 221 ++++++++++++++++++ + include/linux/bcma/bcma_driver_chipcommon.h | 1 + + 2 files changed, 222 insertions(+) + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +index 0e4ba33fb..0f19fc9b1 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +@@ -255,6 +255,15 @@ struct brcmf_pcie_core_info { + u32 wrapbase; + }; + ++#define BRCMF_OTP_MAX_PARAM_LEN 16 ++ ++struct brcmf_otp_params { ++ char module[BRCMF_OTP_MAX_PARAM_LEN]; ++ char vendor[BRCMF_OTP_MAX_PARAM_LEN]; ++ char version[BRCMF_OTP_MAX_PARAM_LEN]; ++ bool valid; ++}; ++ + struct brcmf_pciedev_info { + enum brcmf_pcie_state state; + bool in_irq; +@@ -282,6 +291,7 @@ struct brcmf_pciedev_info { + void (*write_ptr)(struct brcmf_pciedev_info *devinfo, u32 mem_offset, + u16 value); + struct brcmf_mp_device *settings; ++ struct brcmf_otp_params otp; + }; + + struct brcmf_pcie_ringbuf { +@@ -353,6 +363,15 @@ static void brcmf_pcie_setup(struct device *dev, int ret, + static struct brcmf_fw_request * + brcmf_pcie_prepare_fw_request(struct brcmf_pciedev_info *devinfo); + ++static u16 ++brcmf_pcie_read_reg16(struct brcmf_pciedev_info *devinfo, u32 reg_offset) ++{ ++ void __iomem *address = devinfo->regs + reg_offset; ++ ++ return (ioread16(address)); ++} ++ ++ + static u32 + brcmf_pcie_read_reg32(struct brcmf_pciedev_info *devinfo, u32 reg_offset) + { +@@ -539,6 +558,8 @@ brcmf_pcie_copy_dev_tomem(struct brcmf_pciedev_info *devinfo, u32 mem_offset, + } + + ++#define READCC32(devinfo, reg) brcmf_pcie_read_reg32(devinfo, \ ++ CHIPCREGOFFS(reg)) + #define WRITECC32(devinfo, reg, value) brcmf_pcie_write_reg32(devinfo, \ + CHIPCREGOFFS(reg), value) + +@@ -1758,6 +1779,200 @@ static const struct brcmf_buscore_ops brcmf_pcie_buscore_ops = { + .write32 = brcmf_pcie_buscore_write32, + }; + ++#define BRCMF_OTP_SYS_VENDOR 0x15 ++#define BRCMF_OTP_BRCM_CIS 0x80 ++ ++#define BRCMF_OTP_VENDOR_HDR 0x00000008 ++ ++static int ++brcmf_pcie_parse_otp_sys_vendor(struct brcmf_pciedev_info *devinfo, ++ u8 *data, size_t size) ++{ ++ int idx = 4; ++ const char *chip_params; ++ const char *module_params; ++ const char *p; ++ ++ /* 4-byte header and two empty strings */ ++ if (size < 6) ++ return -EINVAL; ++ ++ if (get_unaligned_le32(data) != BRCMF_OTP_VENDOR_HDR) ++ return -EINVAL; ++ ++ chip_params = &data[idx]; ++ ++ /* Skip first string, including terminator */ ++ idx += strnlen(chip_params, size - idx) + 1; ++ if (idx >= size) ++ return -EINVAL; ++ ++ module_params = &data[idx]; ++ ++ /* Skip to terminator of second string */ ++ idx += strnlen(module_params, size - idx); ++ if (idx >= size) ++ return -EINVAL; ++ ++ /* At this point both strings are guaranteed NUL-terminated */ ++ brcmf_dbg(PCIE, "OTP: chip_params='%s' module_params='%s'\n", ++ chip_params, module_params); ++ ++ p = module_params; ++ while (*p) { ++ char tag = *p++; ++ const char *end; ++ size_t len; ++ ++ if (tag == ' ') /* Skip extra spaces */ ++ continue; ++ ++ if (*p++ != '=') /* implicit NUL check */ ++ return -EINVAL; ++ ++ /* *p might be NUL here, if so end == p and len == 0 */ ++ end = strchrnul(p, ' '); ++ len = end - p; ++ ++ /* leave 1 byte for NUL in destination string */ ++ if (len > (BRCMF_OTP_MAX_PARAM_LEN - 1)) ++ return -EINVAL; ++ ++ /* Copy len characters plus a NUL terminator */ ++ switch (tag) { ++ case 'M': ++ strlcpy(devinfo->otp.module, p, len + 1); ++ break; ++ case 'V': ++ strlcpy(devinfo->otp.vendor, p, len + 1); ++ break; ++ case 'm': ++ strlcpy(devinfo->otp.version, p, len + 1); ++ break; ++ } ++ ++ /* Skip to space separator or NUL */ ++ p = end; ++ } ++ ++ brcmf_dbg(PCIE, "OTP: module=%s vendor=%s version=%s\n", ++ devinfo->otp.module, devinfo->otp.vendor, ++ devinfo->otp.version); ++ ++ if (!devinfo->otp.module || ++ !devinfo->otp.vendor || ++ !devinfo->otp.version) ++ return -EINVAL; ++ ++ devinfo->otp.valid = true; ++ return 0; ++} ++ ++static int ++brcmf_pcie_parse_otp(struct brcmf_pciedev_info *devinfo, u8 *otp, size_t size) ++{ ++ int p = 0; ++ int ret = -1; ++ ++ brcmf_dbg(PCIE, "parse_otp size=%ld\n", size); ++ ++ while (p < (size - 1)) { ++ u8 type = otp[p]; ++ u8 length = otp[p + 1]; ++ ++ if (type == 0) ++ break; ++ ++ if ((p + 2 + length) > size) ++ break; ++ ++ switch (type) { ++ case BRCMF_OTP_SYS_VENDOR: ++ brcmf_dbg(PCIE, "OTP @ 0x%x (0x%x): SYS_VENDOR\n", ++ p, length); ++ ret = brcmf_pcie_parse_otp_sys_vendor(devinfo, ++ &otp[p + 2], ++ length); ++ break; ++ case BRCMF_OTP_BRCM_CIS: ++ brcmf_dbg(PCIE, "OTP @ 0x%x (0x%x): BRCM_CIS\n", ++ p, length); ++ break; ++ default: ++ brcmf_dbg(PCIE, "OTP @ 0x%x (0x%x): Unknown type 0x%x\n", ++ p, length, type); ++ break; ++ } ++ ++ p += 2 + length; ++ } ++ ++ return ret; ++} ++ ++static int brcmf_pcie_read_otp(struct brcmf_pciedev_info *devinfo) ++{ ++ const struct pci_dev *pdev = devinfo->pdev; ++ struct brcmf_bus *bus = dev_get_drvdata(&pdev->dev); ++ u32 coreid, base, words, idx, sromctl; ++ u16 *otp; ++ struct brcmf_core *core; ++ int ret; ++ ++ switch (devinfo->ci->chip) { ++ default: ++ /* OTP not supported on this chip */ ++ return 0; ++ } ++ ++ core = brcmf_chip_get_core(devinfo->ci, coreid); ++ if (!core) { ++ brcmf_err(bus, "No OTP core\n"); ++ return -ENODEV; ++ } ++ ++ if (coreid == BCMA_CORE_CHIPCOMMON) { ++ /* ++ * Chips with OTP accessed via ChipCommon need additional ++ * handling to access the OTP ++ */ ++ brcmf_pcie_select_core(devinfo, coreid); ++ sromctl = READCC32(devinfo, sromcontrol); ++ ++ if (!(sromctl & BCMA_CC_SROM_CONTROL_OTP_PRESENT)) { ++ /* Chip lacks OTP, try without it... */ ++ brcmf_err(bus, ++ "OTP unavailable, using default firmware\n"); ++ return 0; ++ } ++ ++ /* Map OTP to shadow area */ ++ WRITECC32(devinfo, sromcontrol, ++ sromctl | BCMA_CC_SROM_CONTROL_OTPSEL); ++ } ++ ++ otp = kzalloc(sizeof(u16) * words, GFP_KERNEL); ++ ++ /* Map bus window to SROM/OTP shadow area in core */ ++ base = brcmf_pcie_buscore_prep_addr(devinfo->pdev, base + core->base); ++ ++ brcmf_dbg(PCIE, "OTP data:\n"); ++ for (idx = 0; idx < words; idx++) { ++ otp[idx] = brcmf_pcie_read_reg16(devinfo, base + 2 * idx); ++ brcmf_dbg(PCIE, "[%8x] 0x%04x\n", base + 2 * idx, otp[idx]); ++ } ++ ++ if (coreid == BCMA_CORE_CHIPCOMMON) { ++ brcmf_pcie_select_core(devinfo, coreid); ++ WRITECC32(devinfo, sromcontrol, sromctl); ++ } ++ ++ ret = brcmf_pcie_parse_otp(devinfo, (u8 *)otp, 2 * words); ++ kfree(otp); ++ ++ return ret; ++} ++ + #define BRCMF_PCIE_FW_CODE 0 + #define BRCMF_PCIE_FW_NVRAM 1 + #define BRCMF_PCIE_FW_CLM 2 +@@ -1958,6 +2173,12 @@ brcmf_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id) + if (ret) + goto fail_bus; + ++ ret = brcmf_pcie_read_otp(devinfo); ++ if (ret) { ++ brcmf_err(bus, "failed to parse OTP\n"); ++ goto fail_brcmf; ++ } ++ + fwreq = brcmf_pcie_prepare_fw_request(devinfo); + if (!fwreq) { + ret = -ENOMEM; +diff --git a/include/linux/bcma/bcma_driver_chipcommon.h b/include/linux/bcma/bcma_driver_chipcommon.h +index d35b92060..c91db7460 100644 +--- a/include/linux/bcma/bcma_driver_chipcommon.h ++++ b/include/linux/bcma/bcma_driver_chipcommon.h +@@ -270,6 +270,7 @@ + #define BCMA_CC_SROM_CONTROL_OP_WRDIS 0x40000000 + #define BCMA_CC_SROM_CONTROL_OP_WREN 0x60000000 + #define BCMA_CC_SROM_CONTROL_OTPSEL 0x00000010 ++#define BCMA_CC_SROM_CONTROL_OTP_PRESENT 0x00000020 + #define BCMA_CC_SROM_CONTROL_LOCK 0x00000008 + #define BCMA_CC_SROM_CONTROL_SIZE_MASK 0x00000006 + #define BCMA_CC_SROM_CONTROL_SIZE_1K 0x00000000 +-- +2.34.1 + diff --git a/8007-brcmfmac-of-Fetch-Apple-properties.patch b/8007-brcmfmac-of-Fetch-Apple-properties.patch new file mode 100644 index 0000000..76dde1e --- /dev/null +++ b/8007-brcmfmac-of-Fetch-Apple-properties.patch @@ -0,0 +1,76 @@ +From c42886eecdf0752c2525bb9f24a4a1db862fdd18 Mon Sep 17 00:00:00 2001 +From: Hector Martin +Date: Tue, 21 Dec 2021 17:27:19 +0900 +Subject: [PATCH 07/34] brcmfmac: of: Fetch Apple properties + +On Apple ARM64 platforms, firmware selection requires two properties +that come from system firmware: the module-instance (aka "island", a +codename representing a given hardware platform) and the antenna-sku. + +The module-instance is hard-coded in per-board DTS files, while the +antenna-sku is forwarded by our bootloader from the Apple Device Tree +into the FDT. Grab them from the DT so firmware selection can use +them. + +The module-instance is used to construct a board_type by prepending it +with "apple,". + +Signed-off-by: Hector Martin +--- + .../broadcom/brcm80211/brcmfmac/common.h | 1 + + .../wireless/broadcom/brcm80211/brcmfmac/of.c | 20 ++++++++++++++++++- + 2 files changed, 20 insertions(+), 1 deletion(-) + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h +index 8b5f49997..d4aa25d64 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h +@@ -50,6 +50,7 @@ struct brcmf_mp_device { + bool ignore_probe_fail; + struct brcmfmac_pd_cc *country_codes; + const char *board_type; ++ const char *antenna_sku; + union { + struct brcmfmac_sdio_pd sdio; + } bus; +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c +index 513c7e642..31407d3a1 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c +@@ -63,14 +63,32 @@ void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type, + { + struct brcmfmac_sdio_pd *sdio = &settings->bus.sdio; + struct device_node *root, *np = dev->of_node; ++ const char *prop; + int irq; + int err; + u32 irqf; + u32 val; + ++ /* ++ * Apple ARM64 platforms have their own idea of board type, passed in ++ * via the device tree. They also have an antenna SKU parameter ++ */ ++ if (!of_property_read_string(np, "apple,module-instance", &prop)) { ++ const char *prefix = "apple,"; ++ int len = strlen(prefix) + strlen(prop) + 1; ++ char *board_type = devm_kzalloc(dev, len, GFP_KERNEL); ++ ++ strlcpy(board_type, prefix, len); ++ strlcat(board_type, prop, len); ++ settings->board_type = board_type; ++ } ++ ++ if (!of_property_read_string(np, "apple,antenna-sku", &prop)) ++ settings->antenna_sku = devm_kstrdup(dev, prop, GFP_KERNEL); ++ + /* Set board-type to the first string of the machine compatible prop */ + root = of_find_node_by_path("/"); +- if (root) { ++ if (root && !settings->board_type) { + int i, len; + char *board_type; + const char *tmp; +-- +2.34.1 + diff --git a/8008-brcmfmac-pcie-Perform-firmware-selection-for-Apple-p.patch b/8008-brcmfmac-pcie-Perform-firmware-selection-for-Apple-p.patch new file mode 100644 index 0000000..fddac07 --- /dev/null +++ b/8008-brcmfmac-pcie-Perform-firmware-selection-for-Apple-p.patch @@ -0,0 +1,160 @@ +From 2ea0163cdf39c28e923961180b8dd158467a3751 Mon Sep 17 00:00:00 2001 +From: Hector Martin +Date: Tue, 21 Dec 2021 17:45:21 +0900 +Subject: [PATCH 08/34] brcmfmac: pcie: Perform firmware selection for Apple + platforms + +On Apple platforms, firmware selection uses the following elements: + + Property Example Source + ============== ======= ======================== +* Chip name 4378 Device ID +* Chip revision B1 OTP +* Platform shikoku DT (ARM64) or ACPI (x86) +* Module type RASP OTP +* Module vendor m OTP +* Module version 6.11 OTP +* Antenna SKU X3 DT (ARM64) or ??? (x86) + +In macOS, these firmwares are stored using filenames in this format +under /usr/share/firmware/wifi: + + C-4378__s-B1/P-shikoku-X3_M-RASP_V-m__m-6.11.txt + +To prepare firmwares for Linux, we rename these to a scheme following +the existing brcmfmac convention: + + brcmfmac-pcie.apple,--\ + --.txt + +The NVRAM uses all the components, while the firmware and CLM blob only +use the chip/revision/platform/antenna_sku: + + brcmfmac-pcie.apple,-.bin + +e.g. + + brcm/brcmfmac4378b1-pcie.apple,shikoku-RASP-m-6.11-X3.txt + brcm/brcmfmac4378b1-pcie.apple,shikoku-X3.bin + +In addition, since there are over 1000 files in total, many of which are +symlinks or outright duplicates, we deduplicate and prune the firmware +tree to reduce firmware filenames to fewer dimensions. For example, the +shikoku platform (MacBook Air M1 2020) simplifies to just 4 files: + + brcm/brcmfmac4378b1-pcie.apple,shikoku.clm_blob + brcm/brcmfmac4378b1-pcie.apple,shikoku.bin + brcm/brcmfmac4378b1-pcie.apple,shikoku-RASP-m.txt + brcm/brcmfmac4378b1-pcie.apple,shikoku-RASP-u.txt + +This reduces the total file count to around 170, of which 75 are +symlinks and 95 are regular files: 7 firmware blobs, 27 CLM blobs, and +61 NVRAM config files. We also slightly process NVRAM files to correct +some formatting issues and add a missing default macaddr= property. + +To handle this, the driver must try the following path formats when +looking for firmware files: + + brcm/brcmfmac4378b1-pcie.apple,shikoku-RASP-m-6.11-X3.txt + brcm/brcmfmac4378b1-pcie.apple,shikoku-RASP-m-6.11.txt + brcm/brcmfmac4378b1-pcie.apple,shikoku-RASP-m.txt + brcm/brcmfmac4378b1-pcie.apple,shikoku-RASP.txt + brcm/brcmfmac4378b1-pcie.apple,shikoku-X3.txt * + brcm/brcmfmac4378b1-pcie.apple,shikoku.txt + +* Not relevant for NVRAM, only for for firmware/CLM. + +The chip revision nominally comes from OTP on Apple platforms, but it +can be mapped to the PCI revision number, so we ignore the OTP revision +and continue to use the existing PCI revision mechanism to identify chip +revisions, as the driver already does for other chips. Unfortunately, +the mapping is not consistent between different chip types, so this has +to be determined experimentally. + +Signed-off-by: Hector Martin +--- + .../broadcom/brcm80211/brcmfmac/pcie.c | 68 +++++++++++++++++-- + 1 file changed, 63 insertions(+), 5 deletions(-) + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +index 0f19fc9b1..4f14b261a 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +@@ -2096,11 +2096,69 @@ brcmf_pcie_prepare_fw_request(struct brcmf_pciedev_info *devinfo) + fwreq->domain_nr = pci_domain_nr(devinfo->pdev->bus) + 1; + fwreq->bus_nr = devinfo->pdev->bus->number; + +- brcmf_dbg(PCIE, "Board: %s\n", devinfo->settings->board_type); +- fwreq->board_types = devm_kzalloc(&devinfo->pdev->dev, +- sizeof(const char *) * 2, +- GFP_KERNEL); +- fwreq->board_types[0] = devinfo->settings->board_type; ++ /* Apple platforms with fancy firmware/NVRAM selection */ ++ if (devinfo->settings->board_type && ++ devinfo->settings->antenna_sku && ++ devinfo->otp.valid) { ++ char *buf; ++ int len; ++ ++ brcmf_dbg(PCIE, "Apple board: %s\n", ++ devinfo->settings->board_type); ++ ++ /* Example: apple,shikoku-RASP-m-6.11-X3 */ ++ len = (strlen(devinfo->settings->board_type) + 1 + ++ strlen(devinfo->otp.module) + 1 + ++ strlen(devinfo->otp.vendor) + 1 + ++ strlen(devinfo->otp.version) + 1 + ++ strlen(devinfo->settings->antenna_sku) + 1); ++ ++ fwreq->board_types = devm_kzalloc(&devinfo->pdev->dev, ++ sizeof(const char *) * 7, ++ GFP_KERNEL); ++ ++ /* apple,shikoku */ ++ fwreq->board_types[5] = devinfo->settings->board_type; ++ ++ buf = devm_kzalloc(&devinfo->pdev->dev, len, GFP_KERNEL); ++ ++ strlcpy(buf, devinfo->settings->board_type, len); ++ strlcat(buf, "-", len); ++ strlcat(buf, devinfo->settings->antenna_sku, len); ++ /* apple,shikoku-X3 */ ++ fwreq->board_types[4] = devm_kstrdup(&devinfo->pdev->dev, buf, ++ GFP_KERNEL); ++ ++ strlcpy(buf, devinfo->settings->board_type, len); ++ strlcat(buf, "-", len); ++ strlcat(buf, devinfo->otp.module, len); ++ /* apple,shikoku-RASP */ ++ fwreq->board_types[3] = devm_kstrdup(&devinfo->pdev->dev, buf, ++ GFP_KERNEL); ++ ++ strlcat(buf, "-", len); ++ strlcat(buf, devinfo->otp.vendor, len); ++ /* apple,shikoku-RASP-m */ ++ fwreq->board_types[2] = devm_kstrdup(&devinfo->pdev->dev, buf, ++ GFP_KERNEL); ++ ++ strlcat(buf, "-", len); ++ strlcat(buf, devinfo->otp.version, len); ++ /* apple,shikoku-RASP-m-6.11 */ ++ fwreq->board_types[1] = devm_kstrdup(&devinfo->pdev->dev, buf, ++ GFP_KERNEL); ++ ++ strlcat(buf, "-", len); ++ strlcat(buf, devinfo->settings->antenna_sku, len); ++ /* apple,shikoku-RASP-m-6.11-X3 */ ++ fwreq->board_types[0] = buf; ++ } else { ++ brcmf_dbg(PCIE, "Board: %s\n", devinfo->settings->board_type); ++ fwreq->board_types = devm_kzalloc(&devinfo->pdev->dev, ++ sizeof(const char *) * 2, ++ GFP_KERNEL); ++ fwreq->board_types[0] = devinfo->settings->board_type; ++ } + + return fwreq; + } +-- +2.34.1 + diff --git a/8009-brcmfmac-firmware-Allow-platform-to-override-macaddr.patch b/8009-brcmfmac-firmware-Allow-platform-to-override-macaddr.patch new file mode 100644 index 0000000..92cecd8 --- /dev/null +++ b/8009-brcmfmac-firmware-Allow-platform-to-override-macaddr.patch @@ -0,0 +1,125 @@ +From dd4b327a30697ddad3819ca145d4ce319b7cf528 Mon Sep 17 00:00:00 2001 +From: Hector Martin +Date: Thu, 23 Dec 2021 22:32:08 +0900 +Subject: [PATCH 09/34] brcmfmac: firmware: Allow platform to override macaddr + +On Device Tree platforms, it is customary to be able to set the MAC +address via the Device Tree, as it is often stored in system firmware. +This is particularly relevant for Apple ARM64 platforms, where this +information comes from system configuration and passed through by the +bootloader into the DT. + +Implement support for this by fetching the platform MAC address and +adding or replacing the macaddr= property in nvram. This becomes the +dongle's default MAC address. + +On platforms with an SROM MAC address, this overrides it. On platforms +without one, such as Apple ARM64 devices, this is required for the +firmware to boot (it will fail if it does not have a valid MAC at all). + +Signed-off-by: Hector Martin +--- + .../broadcom/brcm80211/brcmfmac/firmware.c | 30 +++++++++++++++++-- + 1 file changed, 28 insertions(+), 2 deletions(-) + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c +index 02e36fa3d..dc4151bcc 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c +@@ -21,6 +21,8 @@ + #define BRCMF_FW_NVRAM_DEVPATH_LEN 19 /* devpath0=pcie/1/4/ */ + #define BRCMF_FW_NVRAM_PCIEDEV_LEN 10 /* pcie/1/4/ + \0 */ + #define BRCMF_FW_DEFAULT_BOARDREV "boardrev=0xff" ++#define BRCMF_FW_MACADDR_FMT "macaddr=%pM" ++#define BRCMF_FW_MACADDR_LEN (7 + ETH_ALEN * 3) + + enum nvram_parser_state { + IDLE, +@@ -57,6 +59,7 @@ struct nvram_parser { + bool multi_dev_v1; + bool multi_dev_v2; + bool boardrev_found; ++ bool strip_mac; + }; + + /* +@@ -121,6 +124,10 @@ static enum nvram_parser_state brcmf_nvram_handle_key(struct nvram_parser *nvp) + nvp->multi_dev_v2 = true; + if (strncmp(&nvp->data[nvp->entry], "boardrev", 8) == 0) + nvp->boardrev_found = true; ++ /* strip macaddr if platform MAC overrides */ ++ if (nvp->strip_mac && ++ strncmp(&nvp->data[nvp->entry], "macaddr", 7) == 0) ++ st = COMMENT; + } else if (!is_nvram_char(c) || c == ' ') { + brcmf_dbg(INFO, "warning: ln=%d:col=%d: '=' expected, skip invalid key entry\n", + nvp->line, nvp->column); +@@ -207,6 +214,9 @@ static int brcmf_init_nvram_parser(struct nvram_parser *nvp, + size = BRCMF_FW_MAX_NVRAM_SIZE; + else + size = data_len; ++ /* Add space for properties we may add */ ++ size += strlen(BRCMF_FW_DEFAULT_BOARDREV) + 1; ++ size += BRCMF_FW_MACADDR_LEN + 1; + /* Alloc for extra 0 byte + roundup by 4 + length field */ + size += 1 + 3 + sizeof(u32); + nvp->nvram = kzalloc(size, GFP_KERNEL); +@@ -366,22 +376,34 @@ static void brcmf_fw_add_defaults(struct nvram_parser *nvp) + nvp->nvram_len++; + } + ++static void brcmf_fw_add_macaddr(struct nvram_parser *nvp, u8 *mac) ++{ ++ snprintf(&nvp->nvram[nvp->nvram_len], BRCMF_FW_MACADDR_LEN + 1, ++ BRCMF_FW_MACADDR_FMT, mac); ++ nvp->nvram_len += BRCMF_FW_MACADDR_LEN + 1; ++} ++ + /* brcmf_nvram_strip :Takes a buffer of "=\n" lines read from a fil + * and ending in a NUL. Removes carriage returns, empty lines, comment lines, + * and converts newlines to NULs. Shortens buffer as needed and pads with NULs. + * End of buffer is completed with token identifying length of buffer. + */ + static void *brcmf_fw_nvram_strip(const u8 *data, size_t data_len, +- u32 *new_length, u16 domain_nr, u16 bus_nr) ++ u32 *new_length, u16 domain_nr, u16 bus_nr, ++ struct device *dev) + { + struct nvram_parser nvp; + u32 pad; + u32 token; + __le32 token_le; ++ u8 mac[ETH_ALEN]; + + if (brcmf_init_nvram_parser(&nvp, data, data_len) < 0) + return NULL; + ++ if (eth_platform_get_mac_address(dev, mac) == 0) ++ nvp.strip_mac = true; ++ + while (nvp.pos < data_len) { + nvp.state = nv_parser_states[nvp.state](&nvp); + if (nvp.state == END) +@@ -402,6 +424,9 @@ static void *brcmf_fw_nvram_strip(const u8 *data, size_t data_len, + + brcmf_fw_add_defaults(&nvp); + ++ if (nvp.strip_mac) ++ brcmf_fw_add_macaddr(&nvp, mac); ++ + pad = nvp.nvram_len; + *new_length = roundup(nvp.nvram_len + 1, 4); + while (pad != *new_length) { +@@ -546,7 +571,8 @@ static int brcmf_fw_request_nvram_done(const struct firmware *fw, void *ctx) + if (data) + nvram = brcmf_fw_nvram_strip(data, data_len, &nvram_length, + fwctx->req->domain_nr, +- fwctx->req->bus_nr); ++ fwctx->req->bus_nr, ++ fwctx->dev); + + if (free_bcm47xx_nvram) + bcm47xx_nvram_release_contents(data); +-- +2.34.1 + diff --git a/8010-brcmfmac-msgbuf-Increase-RX-ring-sizes-to-1024.patch b/8010-brcmfmac-msgbuf-Increase-RX-ring-sizes-to-1024.patch new file mode 100644 index 0000000..c653193 --- /dev/null +++ b/8010-brcmfmac-msgbuf-Increase-RX-ring-sizes-to-1024.patch @@ -0,0 +1,34 @@ +From 531b129464e6f498270c8283f547d65fad32b1fb Mon Sep 17 00:00:00 2001 +From: Hector Martin +Date: Tue, 21 Dec 2021 17:39:04 +0900 +Subject: [PATCH 10/34] brcmfmac: msgbuf: Increase RX ring sizes to 1024 + +Newer chips used on Apple platforms have more than max_rxbufpost greater +than 512, which causes warnings when brcmf_msgbuf_rxbuf_data_fill tries +to put more in the ring than fit. Increase the ring sizes to 1024. + +Signed-off-by: Hector Martin +--- + drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.h +index 2e322edbb..6a849f4a9 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.h ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.h +@@ -8,10 +8,10 @@ + #ifdef CONFIG_BRCMFMAC_PROTO_MSGBUF + + #define BRCMF_H2D_MSGRING_CONTROL_SUBMIT_MAX_ITEM 64 +-#define BRCMF_H2D_MSGRING_RXPOST_SUBMIT_MAX_ITEM 512 ++#define BRCMF_H2D_MSGRING_RXPOST_SUBMIT_MAX_ITEM 1024 + #define BRCMF_D2H_MSGRING_CONTROL_COMPLETE_MAX_ITEM 64 + #define BRCMF_D2H_MSGRING_TX_COMPLETE_MAX_ITEM 1024 +-#define BRCMF_D2H_MSGRING_RX_COMPLETE_MAX_ITEM 512 ++#define BRCMF_D2H_MSGRING_RX_COMPLETE_MAX_ITEM 1024 + #define BRCMF_H2D_TXFLOWRING_MAX_ITEM 512 + + #define BRCMF_H2D_MSGRING_CONTROL_SUBMIT_ITEMSIZE 40 +-- +2.34.1 + diff --git a/8011-brcmfmac-pcie-Fix-crashes-due-to-early-IRQs.patch b/8011-brcmfmac-pcie-Fix-crashes-due-to-early-IRQs.patch new file mode 100644 index 0000000..3650e06 --- /dev/null +++ b/8011-brcmfmac-pcie-Fix-crashes-due-to-early-IRQs.patch @@ -0,0 +1,62 @@ +From 60efee55336f83bb968713686bfd2c90d9b23733 Mon Sep 17 00:00:00 2001 +From: Hector Martin +Date: Tue, 21 Dec 2021 17:44:00 +0900 +Subject: [PATCH 11/34] brcmfmac: pcie: Fix crashes due to early IRQs + +The driver was enabling IRQs before the message processing was +initialized. This could cause IRQs to come in too early and crash the +driver. Instead, move the IRQ enable and hostready to a bus preinit +function, at which point everything is properly initialized. + +Fixes: 9e37f045d5e7 ("brcmfmac: Adding PCIe bus layer support.") +Signed-off-by: Hector Martin +--- + .../broadcom/brcm80211/brcmfmac/pcie.c | 18 +++++++++++++++--- + 1 file changed, 15 insertions(+), 3 deletions(-) + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +index 4f14b261a..7190b7b80 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +@@ -1380,6 +1380,20 @@ static void brcmf_pcie_down(struct device *dev) + } + + ++static int brcmf_pcie_preinit(struct device *dev) ++{ ++ struct brcmf_bus *bus_if = dev_get_drvdata(dev); ++ struct brcmf_pciedev *buspub = bus_if->bus_priv.pcie; ++ ++ brcmf_dbg(PCIE, "Enter\n"); ++ ++ brcmf_pcie_intr_enable(buspub->devinfo); ++ brcmf_pcie_hostready(buspub->devinfo); ++ ++ return 0; ++} ++ ++ + static int brcmf_pcie_tx(struct device *dev, struct sk_buff *skb) + { + return 0; +@@ -1489,6 +1503,7 @@ static int brcmf_pcie_reset(struct device *dev) + } + + static const struct brcmf_bus_ops brcmf_pcie_bus_ops = { ++ .preinit = brcmf_pcie_preinit, + .txdata = brcmf_pcie_tx, + .stop = brcmf_pcie_down, + .txctl = brcmf_pcie_tx_ctlpkt, +@@ -2055,9 +2070,6 @@ static void brcmf_pcie_setup(struct device *dev, int ret, + + init_waitqueue_head(&devinfo->mbdata_resp_wait); + +- brcmf_pcie_intr_enable(devinfo); +- brcmf_pcie_hostready(devinfo); +- + ret = brcmf_attach(&devinfo->pdev->dev); + if (ret) + goto fail; +-- +2.34.1 + diff --git a/8012-brcmfmac-pcie-Support-PCIe-core-revisions-64.patch b/8012-brcmfmac-pcie-Support-PCIe-core-revisions-64.patch new file mode 100644 index 0000000..4aa472f --- /dev/null +++ b/8012-brcmfmac-pcie-Support-PCIe-core-revisions-64.patch @@ -0,0 +1,266 @@ +From 6de1197eadd384f977934fb85061db7108f0c86d Mon Sep 17 00:00:00 2001 +From: Hector Martin +Date: Tue, 21 Dec 2021 17:25:35 +0900 +Subject: [PATCH 12/34] brcmfmac: pcie: Support PCIe core revisions >= 64 + +These newer PCIe core revisions include new sets of registers that must +be used instead of the legacy ones. Introduce a brcmf_pcie_reginfo to +hold the specific register offsets and values to use for a given +platform, and change all the register accesses to indirect through it. + +Signed-off-by: Hector Martin +--- + .../broadcom/brcm80211/brcmfmac/pcie.c | 127 +++++++++++++++--- + 1 file changed, 107 insertions(+), 20 deletions(-) + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +index 7190b7b80..01c7b2703 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +@@ -117,6 +117,14 @@ static const struct brcmf_firmware_mapping brcmf_pcie_fwnames[] = { + #define BRCMF_PCIE_PCIE2REG_CONFIGDATA 0x124 + #define BRCMF_PCIE_PCIE2REG_H2D_MAILBOX_0 0x140 + #define BRCMF_PCIE_PCIE2REG_H2D_MAILBOX_1 0x144 ++#define BRCMF_PCIE_PCIE2REG_D2H_MAILBOX_0 0x148 ++#define BRCMF_PCIE_PCIE2REG_D2H_MAILBOX_1 0x14c ++ ++#define BRCMF_PCIE_64_PCIE2REG_INTMASK 0xC14 ++#define BRCMF_PCIE_64_PCIE2REG_MAILBOXINT 0xC30 ++#define BRCMF_PCIE_64_PCIE2REG_MAILBOXMASK 0xC34 ++#define BRCMF_PCIE_64_PCIE2REG_H2D_MAILBOX_0 0xA20 ++#define BRCMF_PCIE_64_PCIE2REG_H2D_MAILBOX_1 0xA24 + + #define BRCMF_PCIE2_INTA 0x01 + #define BRCMF_PCIE2_INTB 0x02 +@@ -137,6 +145,8 @@ static const struct brcmf_firmware_mapping brcmf_pcie_fwnames[] = { + #define BRCMF_PCIE_MB_INT_D2H3_DB0 0x400000 + #define BRCMF_PCIE_MB_INT_D2H3_DB1 0x800000 + ++#define BRCMF_PCIE_MB_INT_FN0 (BRCMF_PCIE_MB_INT_FN0_0 | \ ++ BRCMF_PCIE_MB_INT_FN0_1) + #define BRCMF_PCIE_MB_INT_D2H_DB (BRCMF_PCIE_MB_INT_D2H0_DB0 | \ + BRCMF_PCIE_MB_INT_D2H0_DB1 | \ + BRCMF_PCIE_MB_INT_D2H1_DB0 | \ +@@ -146,6 +156,40 @@ static const struct brcmf_firmware_mapping brcmf_pcie_fwnames[] = { + BRCMF_PCIE_MB_INT_D2H3_DB0 | \ + BRCMF_PCIE_MB_INT_D2H3_DB1) + ++#define BRCMF_PCIE_64_MB_INT_D2H0_DB0 0x1 ++#define BRCMF_PCIE_64_MB_INT_D2H0_DB1 0x2 ++#define BRCMF_PCIE_64_MB_INT_D2H1_DB0 0x4 ++#define BRCMF_PCIE_64_MB_INT_D2H1_DB1 0x8 ++#define BRCMF_PCIE_64_MB_INT_D2H2_DB0 0x10 ++#define BRCMF_PCIE_64_MB_INT_D2H2_DB1 0x20 ++#define BRCMF_PCIE_64_MB_INT_D2H3_DB0 0x40 ++#define BRCMF_PCIE_64_MB_INT_D2H3_DB1 0x80 ++#define BRCMF_PCIE_64_MB_INT_D2H4_DB0 0x100 ++#define BRCMF_PCIE_64_MB_INT_D2H4_DB1 0x200 ++#define BRCMF_PCIE_64_MB_INT_D2H5_DB0 0x400 ++#define BRCMF_PCIE_64_MB_INT_D2H5_DB1 0x800 ++#define BRCMF_PCIE_64_MB_INT_D2H6_DB0 0x1000 ++#define BRCMF_PCIE_64_MB_INT_D2H6_DB1 0x2000 ++#define BRCMF_PCIE_64_MB_INT_D2H7_DB0 0x4000 ++#define BRCMF_PCIE_64_MB_INT_D2H7_DB1 0x8000 ++ ++#define BRCMF_PCIE_64_MB_INT_D2H_DB (BRCMF_PCIE_64_MB_INT_D2H0_DB0 | \ ++ BRCMF_PCIE_64_MB_INT_D2H0_DB1 | \ ++ BRCMF_PCIE_64_MB_INT_D2H1_DB0 | \ ++ BRCMF_PCIE_64_MB_INT_D2H1_DB1 | \ ++ BRCMF_PCIE_64_MB_INT_D2H2_DB0 | \ ++ BRCMF_PCIE_64_MB_INT_D2H2_DB1 | \ ++ BRCMF_PCIE_64_MB_INT_D2H3_DB0 | \ ++ BRCMF_PCIE_64_MB_INT_D2H3_DB1 | \ ++ BRCMF_PCIE_64_MB_INT_D2H4_DB0 | \ ++ BRCMF_PCIE_64_MB_INT_D2H4_DB1 | \ ++ BRCMF_PCIE_64_MB_INT_D2H5_DB0 | \ ++ BRCMF_PCIE_64_MB_INT_D2H5_DB1 | \ ++ BRCMF_PCIE_64_MB_INT_D2H6_DB0 | \ ++ BRCMF_PCIE_64_MB_INT_D2H6_DB1 | \ ++ BRCMF_PCIE_64_MB_INT_D2H7_DB0 | \ ++ BRCMF_PCIE_64_MB_INT_D2H7_DB1) ++ + #define BRCMF_PCIE_SHARED_VERSION_7 7 + #define BRCMF_PCIE_MIN_SHARED_VERSION 5 + #define BRCMF_PCIE_MAX_SHARED_VERSION BRCMF_PCIE_SHARED_VERSION_7 +@@ -272,6 +316,7 @@ struct brcmf_pciedev_info { + char nvram_name[BRCMF_FW_NAME_LEN]; + char clm_name[BRCMF_FW_NAME_LEN]; + const struct firmware *clm_fw; ++ const struct brcmf_pcie_reginfo *reginfo; + void __iomem *regs; + void __iomem *tcm; + u32 ram_base; +@@ -358,6 +403,36 @@ static const u32 brcmf_ring_itemsize[BRCMF_NROF_COMMON_MSGRINGS] = { + BRCMF_D2H_MSGRING_RX_COMPLETE_ITEMSIZE + }; + ++struct brcmf_pcie_reginfo { ++ u32 intmask; ++ u32 mailboxint; ++ u32 mailboxmask; ++ u32 h2d_mailbox_0; ++ u32 h2d_mailbox_1; ++ u32 int_d2h_db; ++ u32 int_fn0; ++}; ++ ++static const struct brcmf_pcie_reginfo brcmf_reginfo_default = { ++ .intmask = BRCMF_PCIE_PCIE2REG_INTMASK, ++ .mailboxint = BRCMF_PCIE_PCIE2REG_MAILBOXINT, ++ .mailboxmask = BRCMF_PCIE_PCIE2REG_MAILBOXMASK, ++ .h2d_mailbox_0 = BRCMF_PCIE_PCIE2REG_H2D_MAILBOX_0, ++ .h2d_mailbox_1 = BRCMF_PCIE_PCIE2REG_H2D_MAILBOX_1, ++ .int_d2h_db = BRCMF_PCIE_MB_INT_D2H_DB, ++ .int_fn0 = BRCMF_PCIE_MB_INT_FN0, ++}; ++ ++static const struct brcmf_pcie_reginfo brcmf_reginfo_64 = { ++ .intmask = BRCMF_PCIE_64_PCIE2REG_INTMASK, ++ .mailboxint = BRCMF_PCIE_64_PCIE2REG_MAILBOXINT, ++ .mailboxmask = BRCMF_PCIE_64_PCIE2REG_MAILBOXMASK, ++ .h2d_mailbox_0 = BRCMF_PCIE_64_PCIE2REG_H2D_MAILBOX_0, ++ .h2d_mailbox_1 = BRCMF_PCIE_64_PCIE2REG_H2D_MAILBOX_1, ++ .int_d2h_db = BRCMF_PCIE_64_MB_INT_D2H_DB, ++ .int_fn0 = 0, ++}; ++ + static void brcmf_pcie_setup(struct device *dev, int ret, + struct brcmf_fw_request *fwreq); + static struct brcmf_fw_request * +@@ -841,30 +916,29 @@ static void brcmf_pcie_bus_console_read(struct brcmf_pciedev_info *devinfo, + + static void brcmf_pcie_intr_disable(struct brcmf_pciedev_info *devinfo) + { +- brcmf_pcie_write_reg32(devinfo, BRCMF_PCIE_PCIE2REG_MAILBOXMASK, 0); ++ brcmf_pcie_write_reg32(devinfo, devinfo->reginfo->mailboxmask, 0); + } + + + static void brcmf_pcie_intr_enable(struct brcmf_pciedev_info *devinfo) + { +- brcmf_pcie_write_reg32(devinfo, BRCMF_PCIE_PCIE2REG_MAILBOXMASK, +- BRCMF_PCIE_MB_INT_D2H_DB | +- BRCMF_PCIE_MB_INT_FN0_0 | +- BRCMF_PCIE_MB_INT_FN0_1); ++ brcmf_pcie_write_reg32(devinfo, devinfo->reginfo->mailboxmask, ++ devinfo->reginfo->int_d2h_db | ++ devinfo->reginfo->int_fn0); + } + + static void brcmf_pcie_hostready(struct brcmf_pciedev_info *devinfo) + { + if (devinfo->shared.flags & BRCMF_PCIE_SHARED_HOSTRDY_DB1) + brcmf_pcie_write_reg32(devinfo, +- BRCMF_PCIE_PCIE2REG_H2D_MAILBOX_1, 1); ++ devinfo->reginfo->h2d_mailbox_1, 1); + } + + static irqreturn_t brcmf_pcie_quick_check_isr(int irq, void *arg) + { + struct brcmf_pciedev_info *devinfo = (struct brcmf_pciedev_info *)arg; + +- if (brcmf_pcie_read_reg32(devinfo, BRCMF_PCIE_PCIE2REG_MAILBOXINT)) { ++ if (brcmf_pcie_read_reg32(devinfo, devinfo->reginfo->mailboxint)) { + brcmf_pcie_intr_disable(devinfo); + brcmf_dbg(PCIE, "Enter\n"); + return IRQ_WAKE_THREAD; +@@ -879,15 +953,14 @@ static irqreturn_t brcmf_pcie_isr_thread(int irq, void *arg) + u32 status; + + devinfo->in_irq = true; +- status = brcmf_pcie_read_reg32(devinfo, BRCMF_PCIE_PCIE2REG_MAILBOXINT); ++ status = brcmf_pcie_read_reg32(devinfo, devinfo->reginfo->mailboxint); + brcmf_dbg(PCIE, "Enter %x\n", status); + if (status) { +- brcmf_pcie_write_reg32(devinfo, BRCMF_PCIE_PCIE2REG_MAILBOXINT, ++ brcmf_pcie_write_reg32(devinfo, devinfo->reginfo->mailboxint, + status); +- if (status & (BRCMF_PCIE_MB_INT_FN0_0 | +- BRCMF_PCIE_MB_INT_FN0_1)) ++ if (status & devinfo->reginfo->int_fn0) + brcmf_pcie_handle_mb_data(devinfo); +- if (status & BRCMF_PCIE_MB_INT_D2H_DB) { ++ if (status & devinfo->reginfo->int_d2h_db) { + if (devinfo->state == BRCMFMAC_PCIE_STATE_UP) + brcmf_proto_msgbuf_rx_trigger( + &devinfo->pdev->dev); +@@ -946,8 +1019,8 @@ static void brcmf_pcie_release_irq(struct brcmf_pciedev_info *devinfo) + if (devinfo->in_irq) + brcmf_err(bus, "Still in IRQ (processing) !!!\n"); + +- status = brcmf_pcie_read_reg32(devinfo, BRCMF_PCIE_PCIE2REG_MAILBOXINT); +- brcmf_pcie_write_reg32(devinfo, BRCMF_PCIE_PCIE2REG_MAILBOXINT, status); ++ status = brcmf_pcie_read_reg32(devinfo, devinfo->reginfo->mailboxint); ++ brcmf_pcie_write_reg32(devinfo, devinfo->reginfo->mailboxint, status); + + devinfo->irq_allocated = false; + } +@@ -999,7 +1072,7 @@ static int brcmf_pcie_ring_mb_ring_bell(void *ctx) + + brcmf_dbg(PCIE, "RING !\n"); + /* Any arbitrary value will do, lets use 1 */ +- brcmf_pcie_write_reg32(devinfo, BRCMF_PCIE_PCIE2REG_H2D_MAILBOX_0, 1); ++ brcmf_pcie_write_reg32(devinfo, devinfo->reginfo->h2d_mailbox_0, 1); + + return 0; + } +@@ -1763,15 +1836,22 @@ static int brcmf_pcie_buscoreprep(void *ctx) + static int brcmf_pcie_buscore_reset(void *ctx, struct brcmf_chip *chip) + { + struct brcmf_pciedev_info *devinfo = (struct brcmf_pciedev_info *)ctx; +- u32 val; ++ struct brcmf_core *core; ++ u32 val, reg; + + devinfo->ci = chip; + brcmf_pcie_reset_device(devinfo); + +- val = brcmf_pcie_read_reg32(devinfo, BRCMF_PCIE_PCIE2REG_MAILBOXINT); ++ /* reginfo is not ready yet */ ++ core = brcmf_chip_get_core(chip, BCMA_CORE_PCIE2); ++ if (core->rev >= 64) ++ reg = BRCMF_PCIE_64_PCIE2REG_MAILBOXINT; ++ else ++ reg = BRCMF_PCIE_PCIE2REG_MAILBOXINT; ++ ++ val = brcmf_pcie_read_reg32(devinfo, reg); + if (val != 0xffffffff) +- brcmf_pcie_write_reg32(devinfo, BRCMF_PCIE_PCIE2REG_MAILBOXINT, +- val); ++ brcmf_pcie_write_reg32(devinfo, reg, val); + + return 0; + } +@@ -2183,6 +2263,7 @@ brcmf_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id) + struct brcmf_pciedev_info *devinfo; + struct brcmf_pciedev *pcie_bus_dev; + struct brcmf_bus *bus; ++ struct brcmf_core *core; + + brcmf_dbg(PCIE, "Enter %x:%x\n", pdev->vendor, pdev->device); + +@@ -2201,6 +2282,12 @@ brcmf_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id) + goto fail; + } + ++ core = brcmf_chip_get_core(devinfo->ci, BCMA_CORE_PCIE2); ++ if (core->rev >= 64) ++ devinfo->reginfo = &brcmf_reginfo_64; ++ else ++ devinfo->reginfo = &brcmf_reginfo_default; ++ + pcie_bus_dev = kzalloc(sizeof(*pcie_bus_dev), GFP_KERNEL); + if (pcie_bus_dev == NULL) { + ret = -ENOMEM; +@@ -2369,7 +2456,7 @@ static int brcmf_pcie_pm_leave_D3(struct device *dev) + brcmf_dbg(PCIE, "Enter, dev=%p, bus=%p\n", dev, bus); + + /* Check if device is still up and running, if so we are ready */ +- if (brcmf_pcie_read_reg32(devinfo, BRCMF_PCIE_PCIE2REG_INTMASK) != 0) { ++ if (brcmf_pcie_read_reg32(devinfo, devinfo->reginfo->intmask) != 0) { + brcmf_dbg(PCIE, "Try to wakeup device....\n"); + if (brcmf_pcie_send_mb_data(devinfo, BRCMF_H2D_HOST_D0_INFORM)) + goto cleanup; +-- +2.34.1 + diff --git a/8013-brcmfmac-pcie-Add-IDs-properties-for-BCM4378.patch b/8013-brcmfmac-pcie-Add-IDs-properties-for-BCM4378.patch new file mode 100644 index 0000000..e7a874b --- /dev/null +++ b/8013-brcmfmac-pcie-Add-IDs-properties-for-BCM4378.patch @@ -0,0 +1,96 @@ +From d37f0e2bd8a981c82aaec33c4916b216a245d87c Mon Sep 17 00:00:00 2001 +From: Hector Martin +Date: Tue, 21 Dec 2021 17:46:40 +0900 +Subject: [PATCH 13/34] brcmfmac: pcie: Add IDs/properties for BCM4378 + +This chip is present on Apple M1 (t8103) platforms: + +* atlantisb (apple,j274): Mac mini (M1, 2020) +* honshu (apple,j293): MacBook Pro (13-inch, M1, 2020) +* shikoku (apple,j313): MacBook Air (M1, 2020) +* capri (apple,j456): iMac (24-inch, 4x USB-C, M1, 2020) +* santorini (apple,j457): iMac (24-inch, 2x USB-C, M1, 2020) + +Signed-off-by: Hector Martin +--- + drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c | 2 ++ + drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 8 ++++++++ + .../net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h | 2 ++ + 3 files changed, 12 insertions(+) + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c +index 1ee49f9e3..56a6f4168 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c +@@ -731,6 +731,8 @@ static u32 brcmf_chip_tcm_rambase(struct brcmf_chip_priv *ci) + return 0x160000; + case CY_CC_43752_CHIP_ID: + return 0x170000; ++ case BRCM_CC_4378_CHIP_ID: ++ return 0x352000; + default: + brcmf_err("unknown chip: %s\n", ci->pub.name); + break; +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +index 01c7b2703..e1bc7e4a9 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +@@ -58,6 +58,7 @@ BRCMF_FW_DEF(4365C, "brcmfmac4365c-pcie"); + BRCMF_FW_DEF(4366B, "brcmfmac4366b-pcie"); + BRCMF_FW_DEF(4366C, "brcmfmac4366c-pcie"); + BRCMF_FW_DEF(4371, "brcmfmac4371-pcie"); ++BRCMF_FW_CLM_DEF(4378B1, "brcmfmac4378b1-pcie"); + + /* firmware config files */ + MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH "brcmfmac*-pcie.txt"); +@@ -87,6 +88,7 @@ static const struct brcmf_firmware_mapping brcmf_pcie_fwnames[] = { + BRCMF_FW_ENTRY(BRCM_CC_43664_CHIP_ID, 0xFFFFFFF0, 4366C), + BRCMF_FW_ENTRY(BRCM_CC_43666_CHIP_ID, 0xFFFFFFF0, 4366C), + BRCMF_FW_ENTRY(BRCM_CC_4371_CHIP_ID, 0xFFFFFFFF, 4371), ++ BRCMF_FW_ENTRY(BRCM_CC_4378_CHIP_ID, 0xFFFFFFFF, 4378B1), /* 3 */ + }; + + #define BRCMF_PCIE_FW_UP_TIMEOUT 5000 /* msec */ +@@ -2015,6 +2017,11 @@ static int brcmf_pcie_read_otp(struct brcmf_pciedev_info *devinfo) + int ret; + + switch (devinfo->ci->chip) { ++ case BRCM_CC_4378_CHIP_ID: ++ coreid = BCMA_CORE_GCI; ++ base = 0x1120; ++ words = 0x170; ++ break; + default: + /* OTP not supported on this chip */ + return 0; +@@ -2522,6 +2529,7 @@ static const struct pci_device_id brcmf_pcie_devid_table[] = { + BRCMF_PCIE_DEVICE(BRCM_PCIE_4366_2G_DEVICE_ID), + BRCMF_PCIE_DEVICE(BRCM_PCIE_4366_5G_DEVICE_ID), + BRCMF_PCIE_DEVICE(BRCM_PCIE_4371_DEVICE_ID), ++ BRCMF_PCIE_DEVICE(BRCM_PCIE_4378_DEVICE_ID), + { /* end: all zeroes */ } + }; + +diff --git a/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h b/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h +index 9d8132016..8f552b53f 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h ++++ b/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h +@@ -50,6 +50,7 @@ + #define BRCM_CC_43664_CHIP_ID 43664 + #define BRCM_CC_43666_CHIP_ID 43666 + #define BRCM_CC_4371_CHIP_ID 0x4371 ++#define BRCM_CC_4378_CHIP_ID 0x4378 + #define CY_CC_4373_CHIP_ID 0x4373 + #define CY_CC_43012_CHIP_ID 43012 + #define CY_CC_43752_CHIP_ID 43752 +@@ -85,6 +86,7 @@ + #define BRCM_PCIE_4366_2G_DEVICE_ID 0x43c4 + #define BRCM_PCIE_4366_5G_DEVICE_ID 0x43c5 + #define BRCM_PCIE_4371_DEVICE_ID 0x440d ++#define BRCM_PCIE_4378_DEVICE_ID 0x4425 + + + /* brcmsmac IDs */ +-- +2.34.1 + diff --git a/8014-ACPI-property-Support-strings-in-Apple-_DSM-props.patch b/8014-ACPI-property-Support-strings-in-Apple-_DSM-props.patch new file mode 100644 index 0000000..5cb777d --- /dev/null +++ b/8014-ACPI-property-Support-strings-in-Apple-_DSM-props.patch @@ -0,0 +1,53 @@ +From 599bfcd71c7c6b995db7a4453e03244d032b4317 Mon Sep 17 00:00:00 2001 +From: Hector Martin +Date: Thu, 23 Dec 2021 19:51:11 +0900 +Subject: [PATCH 14/34] ACPI / property: Support strings in Apple _DSM props + +The Wi-Fi module in Apple machines has a "module-instance" device +property that specifies the platform type and is used for firmware +selection. Its value is a string, so add support for string values in +acpi_extract_apple_properties(). + +Signed-off-by: Hector Martin +--- + drivers/acpi/x86/apple.c | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +diff --git a/drivers/acpi/x86/apple.c b/drivers/acpi/x86/apple.c +index c285c91a5..1f5a0694c 100644 +--- a/drivers/acpi/x86/apple.c ++++ b/drivers/acpi/x86/apple.c +@@ -70,13 +70,16 @@ void acpi_extract_apple_properties(struct acpi_device *adev) + + if ( key->type != ACPI_TYPE_STRING || + (val->type != ACPI_TYPE_INTEGER && +- val->type != ACPI_TYPE_BUFFER)) ++ val->type != ACPI_TYPE_BUFFER && ++ val->type != ACPI_TYPE_STRING)) + continue; /* skip invalid properties */ + + __set_bit(i, valid); + newsize += key->string.length + 1; + if ( val->type == ACPI_TYPE_BUFFER) + newsize += val->buffer.length; ++ else if ( val->type == ACPI_TYPE_STRING) ++ newsize += val->string.length + 1; + } + + numvalid = bitmap_weight(valid, numprops); +@@ -118,6 +121,12 @@ void acpi_extract_apple_properties(struct acpi_device *adev) + newprops[v].type = val->type; + if (val->type == ACPI_TYPE_INTEGER) { + newprops[v].integer.value = val->integer.value; ++ } else if (val->type == ACPI_TYPE_STRING) { ++ newprops[v].string.length = val->string.length; ++ newprops[v].string.pointer = free_space; ++ memcpy(free_space, val->string.pointer, ++ val->string.length); ++ free_space += val->string.length + 1; + } else { + newprops[v].buffer.length = val->buffer.length; + newprops[v].buffer.pointer = free_space; +-- +2.34.1 + diff --git a/8015-brcmfmac-acpi-Add-support-for-fetching-Apple-ACPI-pr.patch b/8015-brcmfmac-acpi-Add-support-for-fetching-Apple-ACPI-pr.patch new file mode 100644 index 0000000..14f0f98 --- /dev/null +++ b/8015-brcmfmac-acpi-Add-support-for-fetching-Apple-ACPI-pr.patch @@ -0,0 +1,127 @@ +From ebdaee11be6e18ea1952a72a4a9ef80ca4228b7d Mon Sep 17 00:00:00 2001 +From: Hector Martin +Date: Thu, 23 Dec 2021 19:51:36 +0900 +Subject: [PATCH 15/34] brcmfmac: acpi: Add support for fetching Apple ACPI + properties + +On DT platforms, the module-instance and antenna-sku-info properties +are passed in the DT. On ACPI platforms, module-instance is passed via +the analogous Apple device property mechanism, while the antenna SKU +info is instead obtained via an ACPI method that grabs it from +non-volatile storage. + +Add support for this, to allow proper firmware selection on Apple +platforms. + +Signed-off-by: Hector Martin +--- + .../broadcom/brcm80211/brcmfmac/Makefile | 2 + + .../broadcom/brcm80211/brcmfmac/acpi.c | 52 +++++++++++++++++++ + .../broadcom/brcm80211/brcmfmac/common.c | 1 + + .../broadcom/brcm80211/brcmfmac/common.h | 9 ++++ + 4 files changed, 64 insertions(+) + create mode 100644 drivers/net/wireless/broadcom/brcm80211/brcmfmac/acpi.c + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/Makefile b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/Makefile +index 13c13504a..19009eb9d 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/Makefile ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/Makefile +@@ -47,3 +47,5 @@ brcmfmac-$(CONFIG_OF) += \ + of.o + brcmfmac-$(CONFIG_DMI) += \ + dmi.o ++brcmfmac-$(CONFIG_ACPI) += \ ++ acpi.o +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/acpi.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/acpi.c +new file mode 100644 +index 000000000..b70cd6970 +--- /dev/null ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/acpi.c +@@ -0,0 +1,52 @@ ++// SPDX-License-Identifier: ISC ++/* ++ * Copyright The Asahi Linux Contributors ++ */ ++ ++#include ++#include "debug.h" ++#include "core.h" ++#include "common.h" ++ ++void brcmf_acpi_probe(struct device *dev, enum brcmf_bus_type bus_type, ++ struct brcmf_mp_device *settings) ++{ ++ acpi_status status; ++ struct acpi_device *adev = ACPI_COMPANION(dev); ++ const union acpi_object *o; ++ struct acpi_buffer buf = {ACPI_ALLOCATE_BUFFER, NULL}; ++ ++ if (!adev) { ++ return; ++ } ++ ++ if (!ACPI_FAILURE(acpi_dev_get_property(adev, "module-instance", ++ ACPI_TYPE_STRING, &o))) { ++ const char *prefix = "apple,"; ++ int len = strlen(prefix) + o->string.length + 1; ++ char *board_type = devm_kzalloc(dev, len, GFP_KERNEL); ++ ++ strlcpy(board_type, prefix, len); ++ strlcat(board_type, o->string.pointer, len); ++ brcmf_dbg(INFO, "ACPI module-instance=%s\n", o->string.pointer); ++ settings->board_type = board_type; ++ } else { ++ brcmf_dbg(INFO, "No ACPI module-instance\n"); ++ } ++ ++ status = acpi_evaluate_object(adev->handle, "RWCV", NULL, &buf); ++ o = buf.pointer; ++ if (!ACPI_FAILURE(status) && o && o->type == ACPI_TYPE_BUFFER && ++ o->buffer.length >= 2) { ++ char *antenna_sku = devm_kzalloc(dev, 3, GFP_KERNEL); ++ ++ memcpy(antenna_sku, o->buffer.pointer, 2); ++ brcmf_dbg(INFO, "ACPI RWCV data=%*phN antenna-sku=%s\n", ++ (int)o->buffer.length, o->buffer.pointer, ++ antenna_sku); ++ ++ settings->antenna_sku = antenna_sku; ++ } else { ++ brcmf_dbg(INFO, "No ACPI antenna-sku\n"); ++ } ++} +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c +index b8ed85112..c84c48e49 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c +@@ -437,6 +437,7 @@ struct brcmf_mp_device *brcmf_get_module_param(struct device *dev, + /* No platform data for this device, try OF and DMI data */ + brcmf_dmi_probe(settings, chip, chiprev); + brcmf_of_probe(dev, bus_type, settings); ++ brcmf_acpi_probe(dev, bus_type, settings); + } + return settings; + } +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h +index d4aa25d64..a88c4a931 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h +@@ -73,6 +73,15 @@ static inline void + brcmf_dmi_probe(struct brcmf_mp_device *settings, u32 chip, u32 chiprev) {} + #endif + ++#ifdef CONFIG_ACPI ++void brcmf_acpi_probe(struct device *dev, enum brcmf_bus_type bus_type, ++ struct brcmf_mp_device *settings); ++#else ++static inline void brcmf_acpi_probe(struct device *dev, ++ enum brcmf_bus_type bus_type, ++ struct brcmf_mp_device *settings) {} ++#endif ++ + u8 brcmf_map_prio_to_prec(void *cfg, u8 prio); + + u8 brcmf_map_prio_to_aci(void *cfg, u8 prio); +-- +2.34.1 + diff --git a/8016-brcmfmac-pcie-Provide-a-buffer-of-random-bytes-to-th.patch b/8016-brcmfmac-pcie-Provide-a-buffer-of-random-bytes-to-th.patch new file mode 100644 index 0000000..ab7fba4 --- /dev/null +++ b/8016-brcmfmac-pcie-Provide-a-buffer-of-random-bytes-to-th.patch @@ -0,0 +1,83 @@ +From 3ecb57b6628211ef42a6267f17a1d5c5fcecd012 Mon Sep 17 00:00:00 2001 +From: Hector Martin +Date: Thu, 23 Dec 2021 19:30:17 +0900 +Subject: [PATCH 16/34] brcmfmac: pcie: Provide a buffer of random bytes to the + device + +Newer Apple firmwares on chipsets without a hardware RNG require the +host to provide a buffer of 256 random bytes to the device on +initialization. This buffer is present immediately before NVRAM, +suffixed by a footer containing a magic number and the buffer length. + +This won't affect chips/firmwares that do not use this feature, so do it +unconditionally. + +Signed-off-by: Hector Martin +--- + .../broadcom/brcm80211/brcmfmac/pcie.c | 31 +++++++++++++++++++ + 1 file changed, 31 insertions(+) + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +index e1bc7e4a9..b71952254 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +@@ -12,6 +12,7 @@ + #include + #include + #include ++#include + #include + + #include +@@ -1667,6 +1668,13 @@ brcmf_pcie_init_share_ram_info(struct brcmf_pciedev_info *devinfo, + return 0; + } + ++struct brcmf_random_seed_footer { ++ __le32 length; ++ __le32 magic; ++}; ++ ++#define BRCMF_RANDOM_SEED_MAGIC 0xfeedc0de ++#define BRCMF_RANDOM_SEED_LENGTH 0x100 + + static int brcmf_pcie_download_fw_nvram(struct brcmf_pciedev_info *devinfo, + const struct firmware *fw, void *nvram, +@@ -1698,11 +1706,34 @@ static int brcmf_pcie_download_fw_nvram(struct brcmf_pciedev_info *devinfo, + brcmf_pcie_write_ram32(devinfo, devinfo->ci->ramsize - 4, 0); + + if (nvram) { ++ size_t rand_len = BRCMF_RANDOM_SEED_LENGTH; ++ struct brcmf_random_seed_footer footer = { ++ .length = cpu_to_le32(rand_len), ++ .magic = cpu_to_le32(BRCMF_RANDOM_SEED_MAGIC), ++ }; ++ void *randbuf; ++ + brcmf_dbg(PCIE, "Download NVRAM %s\n", devinfo->nvram_name); + address = devinfo->ci->rambase + devinfo->ci->ramsize - + nvram_len; + brcmf_pcie_copy_mem_todev(devinfo, address, nvram, nvram_len); + brcmf_fw_nvram_free(nvram); ++ ++ /* ++ * Some Apple chips/firmwares expect a buffer of random data ++ * to be present before NVRAM ++ */ ++ brcmf_dbg(PCIE, "Download random seed\n"); ++ ++ address -= sizeof(footer); ++ brcmf_pcie_copy_mem_todev(devinfo, address, &footer, ++ sizeof(footer)); ++ ++ address -= rand_len; ++ randbuf = kzalloc(rand_len, GFP_KERNEL); ++ get_random_bytes(randbuf, rand_len); ++ brcmf_pcie_copy_mem_todev(devinfo, address, randbuf, rand_len); ++ kfree(randbuf); + } else { + brcmf_dbg(PCIE, "No matching NVRAM file found %s\n", + devinfo->nvram_name); +-- +2.34.1 + diff --git a/8001-brcmfmac-Add-initial-support-for-the-BRCM4355.patch b/8017-brcmfmac-pcie-Add-IDs-properties-for-BCM4355.patch similarity index 64% rename from 8001-brcmfmac-Add-initial-support-for-the-BRCM4355.patch rename to 8017-brcmfmac-pcie-Add-IDs-properties-for-BCM4355.patch index 84ab31e..fd724aa 100644 --- a/8001-brcmfmac-Add-initial-support-for-the-BRCM4355.patch +++ b/8017-brcmfmac-pcie-Add-IDs-properties-for-BCM4355.patch @@ -1,24 +1,25 @@ -From f4d7309ca1ecfa5c48a0d9429e0c56ff100a43a9 Mon Sep 17 00:00:00 2001 -From: Aun-Ali Zaidi -Date: Sun, 1 Nov 2020 01:26:38 -0400 -Subject: [PATCH 1/2] brcmfmac: Add initial support for the BRCM4355 +From e46046ce92838278ec265de9d662ca3ee0be8cef Mon Sep 17 00:00:00 2001 +From: Hector Martin +Date: Tue, 21 Dec 2021 17:50:15 +0900 +Subject: [PATCH 17/34] brcmfmac: pcie: Add IDs/properties for BCM4355 -This commit adds the necessary device IDs and rambase address -for the BRCM4355 Wifi/BT combo chip. +This chip is present on at least these Apple T2 Macs: -Tested-by: Aun-Ali Zaidi -Signed-off-by: Aun-Ali Zaidi +* hawaii: MacBook Air 13" (Late 2018) +* hawaii: MacBook Air 13" (True Tone, 2019) + +Signed-off-by: Hector Martin --- - drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c | 1 + - drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 3 +++ - drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h | 2 ++ - 3 files changed, 6 insertions(+) + drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c | 1 + + drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 8 ++++++++ + .../net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h | 2 ++ + 3 files changed, 11 insertions(+) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c -index a3a257089696..6c39415a69d6 100644 +index 56a6f4168..fdff7f5fc 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c -@@ -723,6 +723,7 @@ static u32 brcmf_chip_tcm_rambase(struct brcmf_chip_priv *ci) +@@ -726,6 +726,7 @@ static u32 brcmf_chip_tcm_rambase(struct brcmf_chip_priv *ci) return 0x200000; case BRCM_CC_4359_CHIP_ID: return (ci->pub.chiprev < 9) ? 0x180000 : 0x160000; @@ -27,26 +28,38 @@ index a3a257089696..6c39415a69d6 100644 case CY_CC_4373_CHIP_ID: return 0x160000; diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c -index 39381cbde89e..60e3b0ce4fd7 100644 +index b71952254..6d95c704f 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c -@@ -48,6 +48,7 @@ enum brcmf_pcie_state { +@@ -49,6 +49,7 @@ enum brcmf_pcie_state { BRCMF_FW_DEF(43602, "brcmfmac43602-pcie"); BRCMF_FW_DEF(4350, "brcmfmac4350-pcie"); BRCMF_FW_DEF(4350C, "brcmfmac4350c2-pcie"); -+BRCMF_FW_DEF(4355, "brcmfmac4355-pcie"); ++BRCMF_FW_CLM_DEF(4355C1, "brcmfmac4355c1-pcie"); BRCMF_FW_CLM_DEF(4356, "brcmfmac4356-pcie"); BRCMF_FW_CLM_DEF(43570, "brcmfmac43570-pcie"); BRCMF_FW_DEF(4358, "brcmfmac4358-pcie"); -@@ -65,6 +66,7 @@ static const struct brcmf_firmware_mapping brcmf_pcie_fwnames[] = { +@@ -75,6 +76,7 @@ static const struct brcmf_firmware_mapping brcmf_pcie_fwnames[] = { BRCMF_FW_ENTRY(BRCM_CC_4350_CHIP_ID, 0x000000FF, 4350C), BRCMF_FW_ENTRY(BRCM_CC_4350_CHIP_ID, 0xFFFFFF00, 4350), BRCMF_FW_ENTRY(BRCM_CC_43525_CHIP_ID, 0xFFFFFFF0, 4365C), -+ BRCMF_FW_ENTRY(BRCM_CC_4355_CHIP_ID, 0xFFFFFFFF, 4355), ++ BRCMF_FW_ENTRY(BRCM_CC_4355_CHIP_ID, 0xFFFFFFFF, 4355C1), /* 12 */ BRCMF_FW_ENTRY(BRCM_CC_4356_CHIP_ID, 0xFFFFFFFF, 4356), BRCMF_FW_ENTRY(BRCM_CC_43567_CHIP_ID, 0xFFFFFFFF, 43570), BRCMF_FW_ENTRY(BRCM_CC_43569_CHIP_ID, 0xFFFFFFFF, 43570), -@@ -2098,6 +2100,7 @@ static const struct pci_device_id brcmf_pcie_devid_table[] = { +@@ -2048,6 +2050,11 @@ static int brcmf_pcie_read_otp(struct brcmf_pciedev_info *devinfo) + int ret; + + switch (devinfo->ci->chip) { ++ case BRCM_CC_4355_CHIP_ID: ++ coreid = BCMA_CORE_CHIPCOMMON; ++ base = 0x8c0; ++ words = 0xb2; ++ break; + case BRCM_CC_4378_CHIP_ID: + coreid = BCMA_CORE_GCI; + base = 0x1120; +@@ -2542,6 +2549,7 @@ static const struct pci_device_id brcmf_pcie_devid_table[] = { BRCMF_PCIE_DEVICE(BRCM_PCIE_4350_DEVICE_ID), BRCMF_PCIE_DEVICE_SUB(0x4355, BRCM_PCIE_VENDOR_ID_BROADCOM, 0x4355), BRCMF_PCIE_DEVICE(BRCM_PCIE_4354_RAW_DEVICE_ID), @@ -55,7 +68,7 @@ index 39381cbde89e..60e3b0ce4fd7 100644 BRCMF_PCIE_DEVICE(BRCM_PCIE_43567_DEVICE_ID), BRCMF_PCIE_DEVICE(BRCM_PCIE_43570_DEVICE_ID), diff --git a/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h b/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h -index c6c4be05159d..777ffdbce230 100644 +index 8f552b53f..9636ab4dd 100644 --- a/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h +++ b/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h @@ -36,6 +36,7 @@ @@ -66,7 +79,7 @@ index c6c4be05159d..777ffdbce230 100644 #define BRCM_CC_4356_CHIP_ID 0x4356 #define BRCM_CC_43566_CHIP_ID 43566 #define BRCM_CC_43567_CHIP_ID 43567 -@@ -66,6 +67,7 @@ +@@ -69,6 +70,7 @@ #define BRCM_PCIE_4350_DEVICE_ID 0x43a3 #define BRCM_PCIE_4354_DEVICE_ID 0x43df #define BRCM_PCIE_4354_RAW_DEVICE_ID 0x4354 @@ -75,5 +88,5 @@ index c6c4be05159d..777ffdbce230 100644 #define BRCM_PCIE_43567_DEVICE_ID 0x43d3 #define BRCM_PCIE_43570_DEVICE_ID 0x43d9 -- -2.29.1 +2.34.1 diff --git a/8002-brcmfmac-Add-initial-support-for-the-BRCM4377.patch b/8018-brcmfmac-pcie-Add-IDs-properties-for-BCM4377.patch similarity index 55% rename from 8002-brcmfmac-Add-initial-support-for-the-BRCM4377.patch rename to 8018-brcmfmac-pcie-Add-IDs-properties-for-BCM4377.patch index 22c0b53..b66d097 100644 --- a/8002-brcmfmac-Add-initial-support-for-the-BRCM4377.patch +++ b/8018-brcmfmac-pcie-Add-IDs-properties-for-BCM4377.patch @@ -1,79 +1,89 @@ -From ef2dddd7ecd61ffa5b055e1dabeba806f2de0a69 Mon Sep 17 00:00:00 2001 -From: Aun-Ali Zaidi -Date: Sun, 1 Nov 2020 01:39:09 -0400 -Subject: [PATCH 2/2] brcmfmac: Add initial support for the BRCM4377 +From a014d5ec01f8b9084b55a368f5847105c5a87758 Mon Sep 17 00:00:00 2001 +From: Hector Martin +Date: Tue, 21 Dec 2021 17:51:31 +0900 +Subject: [PATCH 18/34] brcmfmac: pcie: Add IDs/properties for BCM4377 -This commit adds the required device IDs and rambase address -for the BRCM4377 Wifi/BT combo chip. Additional changes are -required to fully support this chip. +This chip is present on at least these Apple T2 Macs: -Signed-off-by: Aun-Ali Zaidi +* tahiti: MacBook Pro 13" (2020, 2 TB3) +* formosa: MacBook Pro 13" (Touch/2019) +* fiji: MacBook Air 13" (Scissor, 2020) + +Signed-off-by: Hector Martin --- - drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c | 2 ++ - drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 3 +++ + drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c | 1 + + drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 4 ++++ drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h | 2 ++ 3 files changed, 7 insertions(+) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c -index 6c39415a69d6..d2392a8fdbbb 100644 +index fdff7f5fc..73ab96968 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c -@@ -727,6 +727,7 @@ static u32 brcmf_chip_tcm_rambase(struct brcmf_chip_priv *ci) +@@ -731,6 +731,7 @@ static u32 brcmf_chip_tcm_rambase(struct brcmf_chip_priv *ci) case CY_CC_4373_CHIP_ID: return 0x160000; case CY_CC_43752_CHIP_ID: + case BRCM_CC_4377_CHIP_ID: return 0x170000; - default: - brcmf_err("unknown chip: %s\n", ci->pub.name); + case BRCM_CC_4378_CHIP_ID: + return 0x352000; diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c -index 60e3b0ce4fd7..a262e2eb36af 100644 +index 6d95c704f..5b4a4cb33 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c -@@ -59,6 +59,7 @@ BRCMF_FW_DEF(4365C, "brcmfmac4365c-pcie"); +@@ -60,6 +60,7 @@ BRCMF_FW_DEF(4365C, "brcmfmac4365c-pcie"); BRCMF_FW_DEF(4366B, "brcmfmac4366b-pcie"); BRCMF_FW_DEF(4366C, "brcmfmac4366c-pcie"); BRCMF_FW_DEF(4371, "brcmfmac4371-pcie"); -+BRCMF_FW_DEF(4377, "brcmfmac4377-pcie"); ++BRCMF_FW_CLM_DEF(4377B3, "brcmfmac4377b3-pcie"); + BRCMF_FW_CLM_DEF(4378B1, "brcmfmac4378b1-pcie"); - static const struct brcmf_firmware_mapping brcmf_pcie_fwnames[] = { - BRCMF_FW_ENTRY(BRCM_CC_43602_CHIP_ID, 0xFFFFFFFF, 43602), -@@ -80,6 +81,7 @@ static const struct brcmf_firmware_mapping brcmf_pcie_fwnames[] = { - BRCMF_FW_ENTRY(BRCM_CC_4366_CHIP_ID, 0xFFFFFFF0, 4366C), + /* firmware config files */ +@@ -91,6 +92,7 @@ static const struct brcmf_firmware_mapping brcmf_pcie_fwnames[] = { BRCMF_FW_ENTRY(BRCM_CC_43664_CHIP_ID, 0xFFFFFFF0, 4366C), + BRCMF_FW_ENTRY(BRCM_CC_43666_CHIP_ID, 0xFFFFFFF0, 4366C), BRCMF_FW_ENTRY(BRCM_CC_4371_CHIP_ID, 0xFFFFFFFF, 4371), -+ BRCMF_FW_ENTRY(BRCM_CC_4377_CHIP_ID, 0xFFFFFFFF, 4377), ++ BRCMF_FW_ENTRY(BRCM_CC_4377_CHIP_ID, 0xFFFFFFFF, 4377B3), /* 4 */ + BRCMF_FW_ENTRY(BRCM_CC_4378_CHIP_ID, 0xFFFFFFFF, 4378B1), /* 3 */ }; - #define BRCMF_PCIE_FW_UP_TIMEOUT 5000 /* msec */ -@@ -2119,6 +2121,7 @@ static const struct pci_device_id brcmf_pcie_devid_table[] = { +@@ -2055,6 +2057,7 @@ static int brcmf_pcie_read_otp(struct brcmf_pciedev_info *devinfo) + base = 0x8c0; + words = 0xb2; + break; ++ case BRCM_CC_4377_CHIP_ID: + case BRCM_CC_4378_CHIP_ID: + coreid = BCMA_CORE_GCI; + base = 0x1120; +@@ -2568,6 +2571,7 @@ static const struct pci_device_id brcmf_pcie_devid_table[] = { BRCMF_PCIE_DEVICE(BRCM_PCIE_4366_2G_DEVICE_ID), BRCMF_PCIE_DEVICE(BRCM_PCIE_4366_5G_DEVICE_ID), BRCMF_PCIE_DEVICE(BRCM_PCIE_4371_DEVICE_ID), + BRCMF_PCIE_DEVICE(BRCM_PCIE_4377_DEVICE_ID), + BRCMF_PCIE_DEVICE(BRCM_PCIE_4378_DEVICE_ID), { /* end: all zeroes */ } }; - diff --git a/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h b/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h -index 777ffdbce230..7b50e2edf6e2 100644 +index 9636ab4dd..54d7ec515 100644 --- a/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h +++ b/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h -@@ -50,6 +50,7 @@ - #define BRCM_CC_4366_CHIP_ID 0x4366 +@@ -51,6 +51,7 @@ #define BRCM_CC_43664_CHIP_ID 43664 + #define BRCM_CC_43666_CHIP_ID 43666 #define BRCM_CC_4371_CHIP_ID 0x4371 +#define BRCM_CC_4377_CHIP_ID 0x4377 + #define BRCM_CC_4378_CHIP_ID 0x4378 #define CY_CC_4373_CHIP_ID 0x4373 #define CY_CC_43012_CHIP_ID 43012 - -@@ -85,6 +86,7 @@ +@@ -88,6 +89,7 @@ #define BRCM_PCIE_4366_2G_DEVICE_ID 0x43c4 #define BRCM_PCIE_4366_5G_DEVICE_ID 0x43c5 #define BRCM_PCIE_4371_DEVICE_ID 0x440d +#define BRCM_PCIE_4377_DEVICE_ID 0x4488 + #define BRCM_PCIE_4378_DEVICE_ID 0x4425 - /* brcmsmac IDs */ -- -2.29.1 +2.34.1 diff --git a/8019-brcmfmac-pcie-Perform-correct-BCM4364-firmware-selec.patch b/8019-brcmfmac-pcie-Perform-correct-BCM4364-firmware-selec.patch new file mode 100644 index 0000000..f493ec5 --- /dev/null +++ b/8019-brcmfmac-pcie-Perform-correct-BCM4364-firmware-selec.patch @@ -0,0 +1,78 @@ +From 680ef41dd2e00b3e891e62f5ed8a746e96b8567d Mon Sep 17 00:00:00 2001 +From: Hector Martin +Date: Tue, 21 Dec 2021 17:51:52 +0900 +Subject: [PATCH 19/34] brcmfmac: pcie: Perform correct BCM4364 firmware + selection + +This chip exists in two revisions (B2=r3 and B3=r4) on different +platforms, and was added without regard to doing proper firmware +selection or differentiating between them. Fix this to have proper +per-revision firmwares and support Apple NVRAM selection. + +Revision B2 is present on at least these Apple T2 Macs: + +kauai: MacBook Pro 15" (Touch/2018-2019) +maui: MacBook Pro 13" (Touch/2018-2019) +lanai: Mac mini (Late 2018) +ekans: iMac Pro 27" (5K, Late 2017) + +And these non-T2 Macs: + +nihau: iMac 27" (5K, 2019) + +Revision B3 is present on at least these Apple T2 Macs: + +bali: MacBook Pro 16" (2019) +trinidad: MacBook Pro 13" (2020, 4 TB3) +borneo: MacBook Pro 16" (2019, 5600M) +kahana: Mac Pro (2019) +kahana: Mac Pro (2019, Rack) +hanauma: iMac 27" (5K, 2020) +kure: iMac 27" (5K, 2020, 5700/XT) + +Cc: brian m. carlson +Fixes: 24f0bd136264 ("brcmfmac: add the BRCM 4364 found in MacBook Pro 15,2") +Signed-off-by: Hector Martin +--- + .../net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +index 5b4a4cb33..b6b789b49 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +@@ -54,7 +54,8 @@ BRCMF_FW_CLM_DEF(4356, "brcmfmac4356-pcie"); + BRCMF_FW_CLM_DEF(43570, "brcmfmac43570-pcie"); + BRCMF_FW_DEF(4358, "brcmfmac4358-pcie"); + BRCMF_FW_DEF(4359, "brcmfmac4359-pcie"); +-BRCMF_FW_DEF(4364, "brcmfmac4364-pcie"); ++BRCMF_FW_CLM_DEF(4364B2, "brcmfmac4364b2-pcie"); ++BRCMF_FW_CLM_DEF(4364B3, "brcmfmac4364b3-pcie"); + BRCMF_FW_DEF(4365B, "brcmfmac4365b-pcie"); + BRCMF_FW_DEF(4365C, "brcmfmac4365c-pcie"); + BRCMF_FW_DEF(4366B, "brcmfmac4366b-pcie"); +@@ -84,7 +85,8 @@ static const struct brcmf_firmware_mapping brcmf_pcie_fwnames[] = { + BRCMF_FW_ENTRY(BRCM_CC_43570_CHIP_ID, 0xFFFFFFFF, 43570), + BRCMF_FW_ENTRY(BRCM_CC_4358_CHIP_ID, 0xFFFFFFFF, 4358), + BRCMF_FW_ENTRY(BRCM_CC_4359_CHIP_ID, 0xFFFFFFFF, 4359), +- BRCMF_FW_ENTRY(BRCM_CC_4364_CHIP_ID, 0xFFFFFFFF, 4364), ++ BRCMF_FW_ENTRY(BRCM_CC_4364_CHIP_ID, 0x0000000F, 4364B2), /* 3 */ ++ BRCMF_FW_ENTRY(BRCM_CC_4364_CHIP_ID, 0xFFFFFFF0, 4364B3), /* 4 */ + BRCMF_FW_ENTRY(BRCM_CC_4365_CHIP_ID, 0x0000000F, 4365B), + BRCMF_FW_ENTRY(BRCM_CC_4365_CHIP_ID, 0xFFFFFFF0, 4365C), + BRCMF_FW_ENTRY(BRCM_CC_4366_CHIP_ID, 0x0000000F, 4366B), +@@ -2057,6 +2059,11 @@ static int brcmf_pcie_read_otp(struct brcmf_pciedev_info *devinfo) + base = 0x8c0; + words = 0xb2; + break; ++ case BRCM_CC_4364_CHIP_ID: ++ coreid = BCMA_CORE_CHIPCOMMON; ++ base = 0x8c0; ++ words = 0x1a0; ++ break; + case BRCM_CC_4377_CHIP_ID: + case BRCM_CC_4378_CHIP_ID: + coreid = BCMA_CORE_GCI; +-- +2.34.1 + diff --git a/8020-brcmfmac-chip-Only-disable-D11-cores-handle-an-arbit.patch b/8020-brcmfmac-chip-Only-disable-D11-cores-handle-an-arbit.patch new file mode 100644 index 0000000..45afc59 --- /dev/null +++ b/8020-brcmfmac-chip-Only-disable-D11-cores-handle-an-arbit.patch @@ -0,0 +1,53 @@ +From 9600a63e7c36866faac8c458dc48ba9eb19032bc Mon Sep 17 00:00:00 2001 +From: Hector Martin +Date: Mon, 20 Dec 2021 20:00:57 +0900 +Subject: [PATCH 20/34] brcmfmac: chip: Only disable D11 cores; handle an + arbitrary number + +At least on BCM4387, the D11 cores are held in reset on cold startup and +firmware expects to release reset itself. Just assert reset here and let +firmware deassert it. Premature deassertion results in the firmware +failing to initialize properly some of the time, with strange AXI bus +errors. + +Also, BCM4387 has 3 cores, up from 2. The logic for handling that is in +brcmf_chip_ai_resetcore(), but since we aren't using that any more, just +handle it here. + +Signed-off-by: Hector Martin +--- + .../wireless/broadcom/brcm80211/brcmfmac/chip.c | 14 +++++++++----- + 1 file changed, 9 insertions(+), 5 deletions(-) + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c +index 73ab96968..15a1211f0 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c +@@ -1289,15 +1289,19 @@ static bool brcmf_chip_cm3_set_active(struct brcmf_chip_priv *chip) + static inline void + brcmf_chip_cr4_set_passive(struct brcmf_chip_priv *chip) + { ++ int i; + struct brcmf_core *core; + + brcmf_chip_disable_arm(chip, BCMA_CORE_ARM_CR4); + +- core = brcmf_chip_get_core(&chip->pub, BCMA_CORE_80211); +- brcmf_chip_resetcore(core, D11_BCMA_IOCTL_PHYRESET | +- D11_BCMA_IOCTL_PHYCLOCKEN, +- D11_BCMA_IOCTL_PHYCLOCKEN, +- D11_BCMA_IOCTL_PHYCLOCKEN); ++ /* ++ * Disable the cores only and let the firmware enable them. ++ * Releasing reset ourselves breaks BCM4387 in weird ways. ++ */ ++ for (i = 0; (core = brcmf_chip_get_d11core(&chip->pub, i)); i++) ++ brcmf_chip_coredisable(core, D11_BCMA_IOCTL_PHYRESET | ++ D11_BCMA_IOCTL_PHYCLOCKEN, ++ D11_BCMA_IOCTL_PHYCLOCKEN); + } + + static bool brcmf_chip_cr4_set_active(struct brcmf_chip_priv *chip, u32 rstvec) +-- +2.34.1 + diff --git a/8021-brcmfmac-chip-Handle-1024-unit-sizes-for-TCM-blocks.patch b/8021-brcmfmac-chip-Handle-1024-unit-sizes-for-TCM-blocks.patch new file mode 100644 index 0000000..00552b7 --- /dev/null +++ b/8021-brcmfmac-chip-Handle-1024-unit-sizes-for-TCM-blocks.patch @@ -0,0 +1,73 @@ +From 505a2532e3795409d3f179ade118845992c30a14 Mon Sep 17 00:00:00 2001 +From: Hector Martin +Date: Tue, 21 Dec 2021 17:14:59 +0900 +Subject: [PATCH 21/34] brcmfmac: chip: Handle 1024-unit sizes for TCM blocks + +BCM4387 has trailing odd-sized blocks as part of TCM which have +their size described as a multiple of 1024 instead of 8192. Handle this +so we can compute the TCM size properly. + +Signed-off-by: Hector Martin +--- + .../wireless/broadcom/brcm80211/brcmfmac/chip.c | 17 ++++++++++++----- + 1 file changed, 12 insertions(+), 5 deletions(-) + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c +index 15a1211f0..c4c80664b 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c +@@ -212,8 +212,8 @@ struct sbsocramregs { + #define ARMCR4_TCBANB_MASK 0xf + #define ARMCR4_TCBANB_SHIFT 0 + +-#define ARMCR4_BSZ_MASK 0x3f +-#define ARMCR4_BSZ_MULT 8192 ++#define ARMCR4_BSZ_MASK 0x7f ++#define ARMCR4_BLK_1K_MASK 0x200 + + struct brcmf_core_priv { + struct brcmf_core pub; +@@ -675,7 +675,8 @@ static u32 brcmf_chip_sysmem_ramsize(struct brcmf_core_priv *sysmem) + } + + /** Return the TCM-RAM size of the ARMCR4 core. */ +-static u32 brcmf_chip_tcm_ramsize(struct brcmf_core_priv *cr4) ++static u32 brcmf_chip_tcm_ramsize(struct brcmf_chip_priv *ci, ++ struct brcmf_core_priv *cr4) + { + u32 corecap; + u32 memsize = 0; +@@ -683,6 +684,7 @@ static u32 brcmf_chip_tcm_ramsize(struct brcmf_core_priv *cr4) + u32 nbb; + u32 totb; + u32 bxinfo; ++ u32 blksize; + u32 idx; + + corecap = brcmf_chip_core_read32(cr4, ARMCR4_CAP); +@@ -694,7 +696,12 @@ static u32 brcmf_chip_tcm_ramsize(struct brcmf_core_priv *cr4) + for (idx = 0; idx < totb; idx++) { + brcmf_chip_core_write32(cr4, ARMCR4_BANKIDX, idx); + bxinfo = brcmf_chip_core_read32(cr4, ARMCR4_BANKINFO); +- memsize += ((bxinfo & ARMCR4_BSZ_MASK) + 1) * ARMCR4_BSZ_MULT; ++ if (bxinfo & ARMCR4_BLK_1K_MASK) ++ blksize = 1024; ++ else ++ blksize = 8192; ++ ++ memsize += ((bxinfo & ARMCR4_BSZ_MASK) + 1) * blksize; + } + + return memsize; +@@ -752,7 +759,7 @@ int brcmf_chip_get_raminfo(struct brcmf_chip *pub) + mem = brcmf_chip_get_core(&ci->pub, BCMA_CORE_ARM_CR4); + if (mem) { + mem_core = container_of(mem, struct brcmf_core_priv, pub); +- ci->pub.ramsize = brcmf_chip_tcm_ramsize(mem_core); ++ ci->pub.ramsize = brcmf_chip_tcm_ramsize(ci, mem_core); + ci->pub.rambase = brcmf_chip_tcm_rambase(ci); + if (ci->pub.rambase == INVALID_RAMBASE) { + brcmf_err("RAM base not provided with ARM CR4 core\n"); +-- +2.34.1 + diff --git a/8022-brcmfmac-cfg80211-Add-support-for-scan-params-v2.patch b/8022-brcmfmac-cfg80211-Add-support-for-scan-params-v2.patch new file mode 100644 index 0000000..e65acf3 --- /dev/null +++ b/8022-brcmfmac-cfg80211-Add-support-for-scan-params-v2.patch @@ -0,0 +1,335 @@ +From db9e401c2913bb2f8055ace80e99d1a5578a08b1 Mon Sep 17 00:00:00 2001 +From: Hector Martin +Date: Mon, 20 Dec 2021 03:39:44 +0900 +Subject: [PATCH 22/34] brcmfmac: cfg80211: Add support for scan params v2 + +This new API version is required for at least the BCM4387 firmware. Add +support for it, with a fallback to the v1 API. + +Signed-off-by: Hector Martin +--- + .../broadcom/brcm80211/brcmfmac/cfg80211.c | 113 ++++++++++++++---- + .../broadcom/brcm80211/brcmfmac/feature.c | 1 + + .../broadcom/brcm80211/brcmfmac/feature.h | 4 +- + .../broadcom/brcm80211/brcmfmac/fwil_types.h | 49 +++++++- + 4 files changed, 145 insertions(+), 22 deletions(-) + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +index ba5231861..f9de22f77 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +@@ -769,12 +769,50 @@ void brcmf_set_mpc(struct brcmf_if *ifp, int mpc) + } + } + ++static void brcmf_escan_prep(struct brcmf_cfg80211_info *cfg, ++ struct brcmf_scan_params_v2_le *params_le, ++ struct cfg80211_scan_request *request); ++ ++static void brcmf_scan_params_v2_to_v1(struct brcmf_scan_params_v2_le *params_v2_le, ++ struct brcmf_scan_params_le *params_le) ++{ ++ size_t params_size; ++ uint32_t ch; ++ int n_channels, n_ssids; ++ ++ memcpy(¶ms_le->ssid_le, ¶ms_v2_le->ssid_le, ++ sizeof(params_le->ssid_le)); ++ memcpy(¶ms_le->bssid, ¶ms_v2_le->bssid, ++ sizeof(params_le->bssid)); ++ ++ params_le->bss_type = params_v2_le->bss_type; ++ params_le->scan_type = params_v2_le->scan_type; ++ params_le->nprobes = params_v2_le->nprobes; ++ params_le->active_time = params_v2_le->active_time; ++ params_le->passive_time = params_v2_le->passive_time; ++ params_le->home_time = params_v2_le->home_time; ++ params_le->channel_num = params_v2_le->channel_num; ++ ++ ch = le32_to_cpu(params_v2_le->channel_num); ++ n_channels = ch & BRCMF_SCAN_PARAMS_COUNT_MASK; ++ n_ssids = ch >> BRCMF_SCAN_PARAMS_NSSID_SHIFT; ++ ++ params_size = sizeof(u16) * n_channels; ++ if (n_ssids > 0) { ++ params_size = roundup(params_size, sizeof(u32)); ++ params_size += sizeof(struct brcmf_ssid_le) * n_ssids; ++ } ++ ++ memcpy(¶ms_le->channel_list[0], ++ ¶ms_v2_le->channel_list[0], params_size); ++} ++ + s32 brcmf_notify_escan_complete(struct brcmf_cfg80211_info *cfg, + struct brcmf_if *ifp, bool aborted, + bool fw_abort) + { + struct brcmf_pub *drvr = cfg->pub; +- struct brcmf_scan_params_le params_le; ++ struct brcmf_scan_params_v2_le params_v2_le; + struct cfg80211_scan_request *scan_request; + u64 reqid; + u32 bucket; +@@ -793,20 +831,23 @@ s32 brcmf_notify_escan_complete(struct brcmf_cfg80211_info *cfg, + if (fw_abort) { + /* Do a scan abort to stop the driver's scan engine */ + brcmf_dbg(SCAN, "ABORT scan in firmware\n"); +- memset(¶ms_le, 0, sizeof(params_le)); +- eth_broadcast_addr(params_le.bssid); +- params_le.bss_type = DOT11_BSSTYPE_ANY; +- params_le.scan_type = 0; +- params_le.channel_num = cpu_to_le32(1); +- params_le.nprobes = cpu_to_le32(1); +- params_le.active_time = cpu_to_le32(-1); +- params_le.passive_time = cpu_to_le32(-1); +- params_le.home_time = cpu_to_le32(-1); +- /* Scan is aborted by setting channel_list[0] to -1 */ +- params_le.channel_list[0] = cpu_to_le16(-1); ++ ++ brcmf_escan_prep(cfg, ¶ms_v2_le, NULL); ++ + /* E-Scan (or anyother type) can be aborted by SCAN */ +- err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SCAN, +- ¶ms_le, sizeof(params_le)); ++ if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_SCAN_V2)) { ++ err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SCAN, ++ ¶ms_v2_le, ++ sizeof(params_v2_le)); ++ } else { ++ struct brcmf_scan_params_le params_le; ++ ++ brcmf_scan_params_v2_to_v1(¶ms_v2_le, ¶ms_le); ++ err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SCAN, ++ ¶ms_le, ++ sizeof(params_le)); ++ } ++ + if (err) + bphy_err(drvr, "Scan abort failed\n"); + } +@@ -1026,7 +1067,7 @@ brcmf_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev, + } + + static void brcmf_escan_prep(struct brcmf_cfg80211_info *cfg, +- struct brcmf_scan_params_le *params_le, ++ struct brcmf_scan_params_v2_le *params_le, + struct cfg80211_scan_request *request) + { + u32 n_ssids; +@@ -1035,9 +1076,14 @@ static void brcmf_escan_prep(struct brcmf_cfg80211_info *cfg, + s32 offset; + u16 chanspec; + char *ptr; ++ int length; + struct brcmf_ssid_le ssid_le; + + eth_broadcast_addr(params_le->bssid); ++ ++ length = BRCMF_SCAN_PARAMS_V2_FIXED_SIZE; ++ ++ params_le->version = BRCMF_SCAN_PARAMS_VERSION_V2; + params_le->bss_type = DOT11_BSSTYPE_ANY; + params_le->scan_type = BRCMF_SCANTYPE_ACTIVE; + params_le->channel_num = 0; +@@ -1047,6 +1093,15 @@ static void brcmf_escan_prep(struct brcmf_cfg80211_info *cfg, + params_le->home_time = cpu_to_le32(-1); + memset(¶ms_le->ssid_le, 0, sizeof(params_le->ssid_le)); + ++ /* Scan abort */ ++ if (!request) { ++ length += sizeof(u16); ++ params_le->channel_num = cpu_to_le32(1); ++ params_le->channel_list[0] = cpu_to_le16(-1); ++ params_le->length = cpu_to_le16(length); ++ return; ++ } ++ + n_ssids = request->n_ssids; + n_channels = request->n_channels; + +@@ -1054,6 +1109,7 @@ static void brcmf_escan_prep(struct brcmf_cfg80211_info *cfg, + brcmf_dbg(SCAN, "### List of channelspecs to scan ### %d\n", + n_channels); + if (n_channels > 0) { ++ length += roundup(sizeof(u16) * n_channels, sizeof(u32)); + for (i = 0; i < n_channels; i++) { + chanspec = channel_to_chanspec(&cfg->d11inf, + request->channels[i]); +@@ -1064,12 +1120,14 @@ static void brcmf_escan_prep(struct brcmf_cfg80211_info *cfg, + } else { + brcmf_dbg(SCAN, "Scanning all channels\n"); + } ++ + /* Copy ssid array if applicable */ + brcmf_dbg(SCAN, "### List of SSIDs to scan ### %d\n", n_ssids); + if (n_ssids > 0) { +- offset = offsetof(struct brcmf_scan_params_le, channel_list) + ++ offset = offsetof(struct brcmf_scan_params_v2_le, channel_list) + + n_channels * sizeof(u16); + offset = roundup(offset, sizeof(u32)); ++ length += sizeof(ssid_le) * n_ssids, + ptr = (char *)params_le + offset; + for (i = 0; i < n_ssids; i++) { + memset(&ssid_le, 0, sizeof(ssid_le)); +@@ -1089,6 +1147,7 @@ static void brcmf_escan_prep(struct brcmf_cfg80211_info *cfg, + brcmf_dbg(SCAN, "Performing passive scan\n"); + params_le->scan_type = BRCMF_SCANTYPE_PASSIVE; + } ++ params_le->length = cpu_to_le16(length); + /* Adding mask to channel numbers */ + params_le->channel_num = + cpu_to_le32((n_ssids << BRCMF_SCAN_PARAMS_NSSID_SHIFT) | +@@ -1100,8 +1159,8 @@ brcmf_run_escan(struct brcmf_cfg80211_info *cfg, struct brcmf_if *ifp, + struct cfg80211_scan_request *request) + { + struct brcmf_pub *drvr = cfg->pub; +- s32 params_size = BRCMF_SCAN_PARAMS_FIXED_SIZE + +- offsetof(struct brcmf_escan_params_le, params_le); ++ s32 params_size = BRCMF_SCAN_PARAMS_V2_FIXED_SIZE + ++ offsetof(struct brcmf_escan_params_le, params_v2_le); + struct brcmf_escan_params_le *params; + s32 err = 0; + +@@ -1121,8 +1180,22 @@ brcmf_run_escan(struct brcmf_cfg80211_info *cfg, struct brcmf_if *ifp, + goto exit; + } + BUG_ON(params_size + sizeof("escan") >= BRCMF_DCMD_MEDLEN); +- brcmf_escan_prep(cfg, ¶ms->params_le, request); +- params->version = cpu_to_le32(BRCMF_ESCAN_REQ_VERSION); ++ brcmf_escan_prep(cfg, ¶ms->params_v2_le, request); ++ ++ params->version = cpu_to_le32(BRCMF_ESCAN_REQ_VERSION_V2); ++ ++ if (!brcmf_feat_is_enabled(ifp, BRCMF_FEAT_SCAN_V2)) { ++ struct brcmf_escan_params_le *params_v1; ++ ++ params_size -= BRCMF_SCAN_PARAMS_V2_FIXED_SIZE; ++ params_size += BRCMF_SCAN_PARAMS_FIXED_SIZE; ++ params_v1 = kzalloc(params_size, GFP_KERNEL); ++ params_v1->version = cpu_to_le32(BRCMF_ESCAN_REQ_VERSION); ++ brcmf_scan_params_v2_to_v1(¶ms->params_v2_le, ¶ms_v1->params_le); ++ kfree(params); ++ params = params_v1; ++ } ++ + params->action = cpu_to_le16(WL_ESCAN_ACTION_START); + params->sync_id = cpu_to_le16(0x1234); + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c +index 7c68d9849..d0fada88f 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c +@@ -287,6 +287,7 @@ void brcmf_feat_attach(struct brcmf_pub *drvr) + ifp->drvr->feat_flags |= BIT(BRCMF_FEAT_SCAN_RANDOM_MAC); + + brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_FWSUP, "sup_wpa"); ++ brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_SCAN_V2, "scan_ver"); + + if (drvr->settings->feature_disable) { + brcmf_dbg(INFO, "Features: 0x%02x, disable: 0x%02x\n", +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.h +index d1f4257af..9d098a068 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.h ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.h +@@ -29,6 +29,7 @@ + * DOT11H: firmware supports 802.11h + * SAE: simultaneous authentication of equals + * FWAUTH: Firmware authenticator ++ * SCAN_V2: Version 2 scan params + */ + #define BRCMF_FEAT_LIST \ + BRCMF_FEAT_DEF(MBSS) \ +@@ -51,7 +52,8 @@ + BRCMF_FEAT_DEF(MONITOR_FMT_HW_RX_HDR) \ + BRCMF_FEAT_DEF(DOT11H) \ + BRCMF_FEAT_DEF(SAE) \ +- BRCMF_FEAT_DEF(FWAUTH) ++ BRCMF_FEAT_DEF(FWAUTH) \ ++ BRCMF_FEAT_DEF(SCAN_V2) + + /* + * Quirks: +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h +index e69d1e569..9b794d20f 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h +@@ -48,6 +48,10 @@ + + /* size of brcmf_scan_params not including variable length array */ + #define BRCMF_SCAN_PARAMS_FIXED_SIZE 64 ++#define BRCMF_SCAN_PARAMS_V2_FIXED_SIZE 72 ++ ++/* version of of brcmf_scan_params structure */ ++#define BRCMF_SCAN_PARAMS_VERSION_V2 2 + + /* masks for channel and ssid count */ + #define BRCMF_SCAN_PARAMS_COUNT_MASK 0x0000ffff +@@ -67,6 +71,7 @@ + #define BRCMF_PRIMARY_KEY (1 << 1) + #define DOT11_BSSTYPE_ANY 2 + #define BRCMF_ESCAN_REQ_VERSION 1 ++#define BRCMF_ESCAN_REQ_VERSION_V2 2 + + #define BRCMF_MAXRATES_IN_SET 16 /* max # of rates in rateset */ + +@@ -386,6 +391,45 @@ struct brcmf_scan_params_le { + __le16 channel_list[1]; /* list of chanspecs */ + }; + ++struct brcmf_scan_params_v2_le { ++ __le16 version; /* structure version */ ++ __le16 length; /* structure length */ ++ struct brcmf_ssid_le ssid_le; /* default: {0, ""} */ ++ u8 bssid[ETH_ALEN]; /* default: bcast */ ++ s8 bss_type; /* default: any, ++ * DOT11_BSSTYPE_ANY/INFRASTRUCTURE/INDEPENDENT ++ */ ++ u8 pad; ++ __le32 scan_type; /* flags, 0 use default */ ++ __le32 nprobes; /* -1 use default, number of probes per channel */ ++ __le32 active_time; /* -1 use default, dwell time per channel for ++ * active scanning ++ */ ++ __le32 passive_time; /* -1 use default, dwell time per channel ++ * for passive scanning ++ */ ++ __le32 home_time; /* -1 use default, dwell time for the ++ * home channel between channel scans ++ */ ++ __le32 channel_num; /* count of channels and ssids that follow ++ * ++ * low half is count of channels in ++ * channel_list, 0 means default (use all ++ * available channels) ++ * ++ * high half is entries in struct brcmf_ssid ++ * array that follows channel_list, aligned for ++ * s32 (4 bytes) meaning an odd channel count ++ * implies a 2-byte pad between end of ++ * channel_list and first ssid ++ * ++ * if ssid count is zero, single ssid in the ++ * fixed parameter portion is assumed, otherwise ++ * ssid in the fixed portion is ignored ++ */ ++ __le16 channel_list[1]; /* list of chanspecs */ ++}; ++ + struct brcmf_scan_results { + u32 buflen; + u32 version; +@@ -397,7 +441,10 @@ struct brcmf_escan_params_le { + __le32 version; + __le16 action; + __le16 sync_id; +- struct brcmf_scan_params_le params_le; ++ union { ++ struct brcmf_scan_params_le params_le; ++ struct brcmf_scan_params_v2_le params_v2_le; ++ }; + }; + + struct brcmf_escan_result_le { +-- +2.34.1 + diff --git a/8023-brcmfmac-feature-Add-support-for-setting-feats-based.patch b/8023-brcmfmac-feature-Add-support-for-setting-feats-based.patch new file mode 100644 index 0000000..5b6ee01 --- /dev/null +++ b/8023-brcmfmac-feature-Add-support-for-setting-feats-based.patch @@ -0,0 +1,137 @@ +From 150f44fdb2184e9bd9ceed6a05dcdfb9334d8924 Mon Sep 17 00:00:00 2001 +From: Hector Martin +Date: Mon, 20 Dec 2021 18:15:10 +0900 +Subject: [PATCH 23/34] brcmfmac: feature: Add support for setting feats based + on WLC version + +The "wlc_ver" iovar returns information on the WLC and EPI versions. +This can be used to determine whether the PMKID_V2 and _V3 features are +supported. + +Signed-off-by: Hector Martin +--- + .../broadcom/brcm80211/brcmfmac/feature.c | 48 +++++++++++++++++++ + .../broadcom/brcm80211/brcmfmac/feature.h | 4 +- + .../broadcom/brcm80211/brcmfmac/fwil_types.h | 25 ++++++++++ + 3 files changed, 76 insertions(+), 1 deletion(-) + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c +index d0fada88f..2ade1d86c 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c +@@ -126,6 +126,53 @@ static void brcmf_feat_firmware_overrides(struct brcmf_pub *drv) + drv->feat_flags |= feat_flags; + } + ++struct brcmf_feat_wlcfeat { ++ u16 min_ver_major; ++ u16 min_ver_minor; ++ u32 feat_flags; ++}; ++ ++static const struct brcmf_feat_wlcfeat brcmf_feat_wlcfeat_map[] = { ++ { 12, 0, BIT(BRCMF_FEAT_PMKID_V2) }, ++ { 13, 0, BIT(BRCMF_FEAT_PMKID_V3) }, ++}; ++ ++static void brcmf_feat_wlc_version_overrides(struct brcmf_pub *drv) ++{ ++ struct brcmf_if *ifp = brcmf_get_ifp(drv, 0); ++ const struct brcmf_feat_wlcfeat *e; ++ struct brcmf_wlc_version_le ver; ++ u32 feat_flags = 0; ++ int i, err, major, minor; ++ ++ err = brcmf_fil_iovar_data_get(ifp, "wlc_ver", &ver, sizeof(ver)); ++ if (err) ++ return; ++ ++ major = le16_to_cpu(ver.wlc_ver_major); ++ minor = le16_to_cpu(ver.wlc_ver_minor); ++ ++ brcmf_dbg(INFO, "WLC version: %d.%d\n", major, minor); ++ ++ for (i = 0; i < ARRAY_SIZE(brcmf_feat_wlcfeat_map); i++) { ++ e = &brcmf_feat_wlcfeat_map[i]; ++ if ((major > e->min_ver_major) || ++ ((major == e->min_ver_major) && ++ (minor >= e->min_ver_minor))) { ++ feat_flags |= e->feat_flags; ++ } ++ } ++ ++ if (!feat_flags) ++ return; ++ ++ for (i = 0; i < BRCMF_FEAT_LAST; i++) ++ if (feat_flags & BIT(i)) ++ brcmf_dbg(INFO, "enabling firmware feature: %s\n", ++ brcmf_feat_names[i]); ++ drv->feat_flags |= feat_flags; ++} ++ + /** + * brcmf_feat_iovar_int_get() - determine feature through iovar query. + * +@@ -296,6 +343,7 @@ void brcmf_feat_attach(struct brcmf_pub *drvr) + ifp->drvr->feat_flags &= ~drvr->settings->feature_disable; + } + ++ brcmf_feat_wlc_version_overrides(drvr); + brcmf_feat_firmware_overrides(drvr); + + /* set chip related quirks */ +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.h +index 9d098a068..becbcc50d 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.h ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.h +@@ -53,7 +53,9 @@ + BRCMF_FEAT_DEF(DOT11H) \ + BRCMF_FEAT_DEF(SAE) \ + BRCMF_FEAT_DEF(FWAUTH) \ +- BRCMF_FEAT_DEF(SCAN_V2) ++ BRCMF_FEAT_DEF(SCAN_V2) \ ++ BRCMF_FEAT_DEF(PMKID_V2) \ ++ BRCMF_FEAT_DEF(PMKID_V3) + + /* + * Quirks: +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h +index 9b794d20f..7be1f4ca5 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h +@@ -788,6 +788,31 @@ struct brcmf_rev_info_le { + __le32 nvramrev; + }; + ++/** ++ * struct brcmf_wlc_version_le - firwmare revision info. ++ * ++ * @version: structure version. ++ * @length: structure length. ++ * @epi_ver_major: EPI major version ++ * @epi_ver_minor: EPI minor version ++ * @epi_ver_rc: EPI rc version ++ * @epi_ver_incr: EPI increment version ++ * @wlc_ver_major: WLC major version ++ * @wlc_ver_minor: WLC minor version ++ */ ++struct brcmf_wlc_version_le { ++ __le16 version; ++ __le16 length; ++ ++ __le16 epi_ver_major; ++ __le16 epi_ver_minor; ++ __le16 epi_ver_rc; ++ __le16 epi_ver_incr; ++ ++ __le16 wlc_ver_major; ++ __le16 wlc_ver_minor; ++}; ++ + /** + * struct brcmf_assoclist_le - request assoc list. + * +-- +2.34.1 + diff --git a/8024-brcmfmac-cfg80211-Add-support-for-PMKID_V3-operation.patch b/8024-brcmfmac-cfg80211-Add-support-for-PMKID_V3-operation.patch new file mode 100644 index 0000000..91e551c --- /dev/null +++ b/8024-brcmfmac-cfg80211-Add-support-for-PMKID_V3-operation.patch @@ -0,0 +1,223 @@ +From b9bed13f0ee89343529d7d0cce615cffdbea972b Mon Sep 17 00:00:00 2001 +From: Hector Martin +Date: Mon, 20 Dec 2021 18:16:33 +0900 +Subject: [PATCH 24/34] brcmfmac: cfg80211: Add support for PMKID_V3 operations + +Add support for the new PMKID_V3 API, which allows performing PMKID +mutations individually, instead of requiring the driver to keep track of +the full list. This new API is required by at least BCM4387. + +Note that PMKID_V2 is not implemented yet. + +Signed-off-by: Hector Martin +--- + .../broadcom/brcm80211/brcmfmac/cfg80211.c | 49 ++++++++++- + .../broadcom/brcm80211/brcmfmac/fwil_types.h | 83 +++++++++++++++++++ + 2 files changed, 129 insertions(+), 3 deletions(-) + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +index f9de22f77..ccda7ce39 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +@@ -4050,6 +4050,34 @@ static s32 brcmf_cfg80211_suspend(struct wiphy *wiphy, + return 0; + } + ++static s32 ++brcmf_pmksa_v3_op(struct brcmf_if *ifp, struct cfg80211_pmksa *pmksa, ++ bool alive) ++{ ++ struct brcmf_pmk_op_v3_le pmk_op; ++ int length = offsetof(struct brcmf_pmk_op_v3_le, pmk); ++ ++ memset(&pmk_op, 0, sizeof(pmk_op)); ++ pmk_op.version = cpu_to_le16(BRCMF_PMKSA_VER_3); ++ ++ if (!pmksa) { ++ /* Flush operation, operate on entire list */ ++ pmk_op.count = cpu_to_le16(0); ++ } else { ++ /* Single PMK operation */ ++ pmk_op.count = cpu_to_le16(1); ++ length += sizeof(struct brcmf_pmksa_v3); ++ memcpy(pmk_op.pmk[0].bssid, pmksa->bssid, ETH_ALEN); ++ memcpy(pmk_op.pmk[0].pmkid, pmksa->pmkid, WLAN_PMKID_LEN); ++ pmk_op.pmk[0].pmkid_len = WLAN_PMKID_LEN; ++ pmk_op.pmk[0].time_left = alive ? BRCMF_PMKSA_NO_EXPIRY : 0; ++ } ++ ++ pmk_op.length = cpu_to_le16(length); ++ ++ return brcmf_fil_iovar_data_set(ifp, "pmkid_info", &pmk_op, sizeof(pmk_op)); ++} ++ + static __used s32 + brcmf_update_pmklist(struct brcmf_cfg80211_info *cfg, struct brcmf_if *ifp) + { +@@ -4086,6 +4114,14 @@ brcmf_cfg80211_set_pmksa(struct wiphy *wiphy, struct net_device *ndev, + if (!check_vif_up(ifp->vif)) + return -EIO; + ++ brcmf_dbg(CONN, "set_pmksa - PMK bssid: %pM =\n", pmksa->bssid); ++ brcmf_dbg(CONN, "%*ph\n", WLAN_PMKID_LEN, pmksa->pmkid); ++ ++ if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_PMKID_V3)) ++ return brcmf_pmksa_v3_op(ifp, pmksa, true); ++ ++ /* TODO: implement PMKID_V2 */ ++ + npmk = le32_to_cpu(cfg->pmk_list.npmk); + for (i = 0; i < npmk; i++) + if (!memcmp(pmksa->bssid, pmk[i].bssid, ETH_ALEN)) +@@ -4102,9 +4138,6 @@ brcmf_cfg80211_set_pmksa(struct wiphy *wiphy, struct net_device *ndev, + return -EINVAL; + } + +- brcmf_dbg(CONN, "set_pmksa - PMK bssid: %pM =\n", pmk[npmk].bssid); +- brcmf_dbg(CONN, "%*ph\n", WLAN_PMKID_LEN, pmk[npmk].pmkid); +- + err = brcmf_update_pmklist(cfg, ifp); + + brcmf_dbg(TRACE, "Exit\n"); +@@ -4128,6 +4161,11 @@ brcmf_cfg80211_del_pmksa(struct wiphy *wiphy, struct net_device *ndev, + + brcmf_dbg(CONN, "del_pmksa - PMK bssid = %pM\n", pmksa->bssid); + ++ if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_PMKID_V3)) ++ return brcmf_pmksa_v3_op(ifp, pmksa, false); ++ ++ /* TODO: implement PMKID_V2 */ ++ + npmk = le32_to_cpu(cfg->pmk_list.npmk); + for (i = 0; i < npmk; i++) + if (!memcmp(pmksa->bssid, pmk[i].bssid, ETH_ALEN)) +@@ -4164,6 +4202,11 @@ brcmf_cfg80211_flush_pmksa(struct wiphy *wiphy, struct net_device *ndev) + if (!check_vif_up(ifp->vif)) + return -EIO; + ++ if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_PMKID_V3)) ++ return brcmf_pmksa_v3_op(ifp, NULL, false); ++ ++ /* TODO: implement PMKID_V2 */ ++ + memset(&cfg->pmk_list, 0, sizeof(cfg->pmk_list)); + err = brcmf_update_pmklist(cfg, ifp); + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h +index 7be1f4ca5..bc936c181 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h +@@ -174,6 +174,10 @@ + + #define BRCMF_HE_CAP_MCS_MAP_NSS_MAX 8 + ++#define BRCMF_PMKSA_VER_2 2 ++#define BRCMF_PMKSA_VER_3 3 ++#define BRCMF_PMKSA_NO_EXPIRY 0xffffffff ++ + /* MAX_CHUNK_LEN is the maximum length for data passing to firmware in each + * ioctl. It is relatively small because firmware has small maximum size input + * playload restriction for ioctls. +@@ -355,6 +359,12 @@ struct brcmf_ssid_le { + unsigned char SSID[IEEE80211_MAX_SSID_LEN]; + }; + ++/* Alternate SSID structure used in some places... */ ++struct brcmf_ssid8_le { ++ u8 SSID_len; ++ unsigned char SSID[IEEE80211_MAX_SSID_LEN]; ++}; ++ + struct brcmf_scan_params_le { + struct brcmf_ssid_le ssid_le; /* default: {0, ""} */ + u8 bssid[ETH_ALEN]; /* default: bcast */ +@@ -875,6 +885,51 @@ struct brcmf_pmksa { + u8 pmkid[WLAN_PMKID_LEN]; + }; + ++/** ++ * struct brcmf_pmksa_v2 - PMK Security Association ++ * ++ * @length: Length of the structure. ++ * @bssid: The AP's BSSID. ++ * @pmkid: The PMK ID. ++ * @pmk: PMK material for FILS key derivation. ++ * @pmk_len: Length of PMK data. ++ * @ssid: The AP's SSID. ++ * @fils_cache_id: FILS cache identifier ++ */ ++struct brcmf_pmksa_v2 { ++ __le16 length; ++ u8 bssid[ETH_ALEN]; ++ u8 pmkid[WLAN_PMKID_LEN]; ++ u8 pmk[WLAN_PMK_LEN_SUITE_B_192]; ++ __le16 pmk_len; ++ struct brcmf_ssid8_le ssid; ++ u16 fils_cache_id; ++}; ++ ++/** ++ * struct brcmf_pmksa_v3 - PMK Security Association ++ * ++ * @bssid: The AP's BSSID. ++ * @pmkid: The PMK ID. ++ * @pmkid_len: The length of the PMK ID. ++ * @pmk: PMK material for FILS key derivation. ++ * @pmk_len: Length of PMK data. ++ * @fils_cache_id: FILS cache identifier ++ * @ssid: The AP's SSID. ++ * @time_left: Remaining time until expiry. 0 = expired, ~0 = no expiry. ++ */ ++struct brcmf_pmksa_v3 { ++ u8 bssid[ETH_ALEN]; ++ u8 pmkid[WLAN_PMKID_LEN]; ++ u8 pmkid_len; ++ u8 pmk[WLAN_PMK_LEN_SUITE_B_192]; ++ u8 pmk_len; ++ __le16 fils_cache_id; ++ u8 pad; ++ struct brcmf_ssid8_le ssid; ++ __le32 time_left; ++}; ++ + /** + * struct brcmf_pmk_list_le - List of pmksa's. + * +@@ -886,6 +941,34 @@ struct brcmf_pmk_list_le { + struct brcmf_pmksa pmk[BRCMF_MAXPMKID]; + }; + ++/** ++ * struct brcmf_pmk_list_v2_le - List of pmksa's. ++ * ++ * @version: Request version. ++ * @length: Length of this structure. ++ * @pmk: PMK SA information. ++ */ ++struct brcmf_pmk_list_v2_le { ++ __le16 version; ++ __le16 length; ++ struct brcmf_pmksa_v2 pmk[BRCMF_MAXPMKID]; ++}; ++ ++/** ++ * struct brcmf_pmk_op_v3_le - Operation on PMKSA list. ++ * ++ * @version: Request version. ++ * @length: Length of this structure. ++ * @pmk: PMK SA information. ++ */ ++struct brcmf_pmk_op_v3_le { ++ __le16 version; ++ __le16 length; ++ __le16 count; ++ __le16 pad; ++ struct brcmf_pmksa_v3 pmk[BRCMF_MAXPMKID]; ++}; ++ + /** + * struct brcmf_pno_param_le - PNO scan configuration parameters + * +-- +2.34.1 + diff --git a/8025-brcmfmac-cfg80211-Pass-the-PMK-in-binary-instead-of-.patch b/8025-brcmfmac-cfg80211-Pass-the-PMK-in-binary-instead-of-.patch new file mode 100644 index 0000000..2662165 --- /dev/null +++ b/8025-brcmfmac-cfg80211-Pass-the-PMK-in-binary-instead-of-.patch @@ -0,0 +1,49 @@ +From bc717842356e7739ee9b58838592ef0e540d0b39 Mon Sep 17 00:00:00 2001 +From: Hector Martin +Date: Mon, 20 Dec 2021 19:15:58 +0900 +Subject: [PATCH 25/34] brcmfmac: cfg80211: Pass the PMK in binary instead of + hex + +Apparently the hex passphrase mechanism does not work on newer +chips/firmware (e.g. BCM4387). It seems there was a simple way of +passing it in binary all along, so use that and avoid the hexification. + +OpenBSD has been doing it like this from the beginning, so this should +work on all chips. + +Also clear the structure before setting the PMK. This was leaking +uninitialized stack contents to the device. + +Signed-off-by: Hector Martin +--- + .../wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 13 +++++++------ + 1 file changed, 7 insertions(+), 6 deletions(-) + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +index ccda7ce39..d6d34e079 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +@@ -1420,13 +1420,14 @@ static int brcmf_set_pmk(struct brcmf_if *ifp, const u8 *pmk_data, u16 pmk_len) + { + struct brcmf_pub *drvr = ifp->drvr; + struct brcmf_wsec_pmk_le pmk; +- int i, err; ++ int err; ++ ++ memset(&pmk, 0, sizeof(pmk)); + +- /* convert to firmware key format */ +- pmk.key_len = cpu_to_le16(pmk_len << 1); +- pmk.flags = cpu_to_le16(BRCMF_WSEC_PASSPHRASE); +- for (i = 0; i < pmk_len; i++) +- snprintf(&pmk.key[2 * i], 3, "%02x", pmk_data[i]); ++ /* pass pmk directly */ ++ pmk.key_len = cpu_to_le16(pmk_len); ++ pmk.flags = cpu_to_le16(0); ++ memcpy(pmk.key, pmk_data, pmk_len); + + /* store psk in firmware */ + err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_WSEC_PMK, +-- +2.34.1 + diff --git a/8026-brcmfmac-pcie-Add-IDs-properties-for-BCM4387.patch b/8026-brcmfmac-pcie-Add-IDs-properties-for-BCM4387.patch new file mode 100644 index 0000000..a2bddae --- /dev/null +++ b/8026-brcmfmac-pcie-Add-IDs-properties-for-BCM4387.patch @@ -0,0 +1,95 @@ +From 534075f8cc83a2d5b57af7622e0bc03277e2aa84 Mon Sep 17 00:00:00 2001 +From: Hector Martin +Date: Tue, 21 Dec 2021 17:52:03 +0900 +Subject: [PATCH 26/34] brcmfmac: pcie: Add IDs/properties for BCM4387 + +This chip is present on Apple M1 Pro/Max (t600x) platforms: + +* maldives (apple,j314s): MacBook Pro (14-inch, M1 Pro, 2021) +* maldives (apple,j314c): MacBook Pro (14-inch, M1 Max, 2021) +* madagascar (apple,j316s): MacBook Pro (16-inch, M1 Pro, 2021) +* madagascar (apple,j316c): MacBook Pro (16-inch, M1 Max, 2021) + +Signed-off-by: Hector Martin +--- + drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c | 2 ++ + drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 8 ++++++++ + .../net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h | 2 ++ + 3 files changed, 12 insertions(+) + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c +index c4c80664b..f7ca9ff29 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c +@@ -742,6 +742,8 @@ static u32 brcmf_chip_tcm_rambase(struct brcmf_chip_priv *ci) + return 0x170000; + case BRCM_CC_4378_CHIP_ID: + return 0x352000; ++ case BRCM_CC_4387_CHIP_ID: ++ return 0x740000; + default: + brcmf_err("unknown chip: %s\n", ci->pub.name); + break; +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +index b6b789b49..bc2a53812 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +@@ -63,6 +63,7 @@ BRCMF_FW_DEF(4366C, "brcmfmac4366c-pcie"); + BRCMF_FW_DEF(4371, "brcmfmac4371-pcie"); + BRCMF_FW_CLM_DEF(4377B3, "brcmfmac4377b3-pcie"); + BRCMF_FW_CLM_DEF(4378B1, "brcmfmac4378b1-pcie"); ++BRCMF_FW_CLM_DEF(4387C2, "brcmfmac4387c2-pcie"); + + /* firmware config files */ + MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH "brcmfmac*-pcie.txt"); +@@ -96,6 +97,7 @@ static const struct brcmf_firmware_mapping brcmf_pcie_fwnames[] = { + BRCMF_FW_ENTRY(BRCM_CC_4371_CHIP_ID, 0xFFFFFFFF, 4371), + BRCMF_FW_ENTRY(BRCM_CC_4377_CHIP_ID, 0xFFFFFFFF, 4377B3), /* 4 */ + BRCMF_FW_ENTRY(BRCM_CC_4378_CHIP_ID, 0xFFFFFFFF, 4378B1), /* 3 */ ++ BRCMF_FW_ENTRY(BRCM_CC_4387_CHIP_ID, 0xFFFFFFFF, 4387C2), /* 7 */ + }; + + #define BRCMF_PCIE_FW_UP_TIMEOUT 5000 /* msec */ +@@ -2070,6 +2072,11 @@ static int brcmf_pcie_read_otp(struct brcmf_pciedev_info *devinfo) + base = 0x1120; + words = 0x170; + break; ++ case BRCM_CC_4387_CHIP_ID: ++ coreid = BCMA_CORE_GCI; ++ base = 0x113c; ++ words = 0x170; ++ break; + default: + /* OTP not supported on this chip */ + return 0; +@@ -2580,6 +2587,7 @@ static const struct pci_device_id brcmf_pcie_devid_table[] = { + BRCMF_PCIE_DEVICE(BRCM_PCIE_4371_DEVICE_ID), + BRCMF_PCIE_DEVICE(BRCM_PCIE_4377_DEVICE_ID), + BRCMF_PCIE_DEVICE(BRCM_PCIE_4378_DEVICE_ID), ++ BRCMF_PCIE_DEVICE(BRCM_PCIE_4387_DEVICE_ID), + { /* end: all zeroes */ } + }; + +diff --git a/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h b/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h +index 54d7ec515..3d6c803fb 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h ++++ b/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h +@@ -53,6 +53,7 @@ + #define BRCM_CC_4371_CHIP_ID 0x4371 + #define BRCM_CC_4377_CHIP_ID 0x4377 + #define BRCM_CC_4378_CHIP_ID 0x4378 ++#define BRCM_CC_4387_CHIP_ID 0x4387 + #define CY_CC_4373_CHIP_ID 0x4373 + #define CY_CC_43012_CHIP_ID 43012 + #define CY_CC_43752_CHIP_ID 43752 +@@ -91,6 +92,7 @@ + #define BRCM_PCIE_4371_DEVICE_ID 0x440d + #define BRCM_PCIE_4377_DEVICE_ID 0x4488 + #define BRCM_PCIE_4378_DEVICE_ID 0x4425 ++#define BRCM_PCIE_4387_DEVICE_ID 0x4433 + + + /* brcmsmac IDs */ +-- +2.34.1 + diff --git a/8027-brcmfmac-pcie-Replace-brcmf_pcie_copy_mem_todev-with.patch b/8027-brcmfmac-pcie-Replace-brcmf_pcie_copy_mem_todev-with.patch new file mode 100644 index 0000000..8453929 --- /dev/null +++ b/8027-brcmfmac-pcie-Replace-brcmf_pcie_copy_mem_todev-with.patch @@ -0,0 +1,119 @@ +From e5278ec18dc59d4c01afb60e706df41d7e83f1cf Mon Sep 17 00:00:00 2001 +From: Hector Martin +Date: Tue, 21 Dec 2021 17:39:28 +0900 +Subject: [PATCH 27/34] brcmfmac: pcie: Replace brcmf_pcie_copy_mem_todev with + memcpy_toio + +The alignment check was wrong (e.g. & 4 instead of & 3), and the logic +was also inefficient if the length was not a multiple of 4, since it +would needlessly fall back to copying the entire buffer bytewise. + +We already have a perfectly good memcpy_toio function, so just call that +instead of rolling our own copy logic here. brcmf_pcie_init_ringbuffers +was already using it anyway. + +Fixes: 9e37f045d5e7 ("brcmfmac: Adding PCIe bus layer support.") +Signed-off-by: Hector Martin +--- + .../broadcom/brcm80211/brcmfmac/pcie.c | 53 +++---------------- + 1 file changed, 6 insertions(+), 47 deletions(-) + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +index bc2a53812..865e3f28c 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +@@ -14,6 +14,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -562,47 +563,6 @@ brcmf_pcie_write_ram32(struct brcmf_pciedev_info *devinfo, u32 mem_offset, + } + + +-static void +-brcmf_pcie_copy_mem_todev(struct brcmf_pciedev_info *devinfo, u32 mem_offset, +- void *srcaddr, u32 len) +-{ +- void __iomem *address = devinfo->tcm + mem_offset; +- __le32 *src32; +- __le16 *src16; +- u8 *src8; +- +- if (((ulong)address & 4) || ((ulong)srcaddr & 4) || (len & 4)) { +- if (((ulong)address & 2) || ((ulong)srcaddr & 2) || (len & 2)) { +- src8 = (u8 *)srcaddr; +- while (len) { +- iowrite8(*src8, address); +- address++; +- src8++; +- len--; +- } +- } else { +- len = len / 2; +- src16 = (__le16 *)srcaddr; +- while (len) { +- iowrite16(le16_to_cpu(*src16), address); +- address += 2; +- src16++; +- len--; +- } +- } +- } else { +- len = len / 4; +- src32 = (__le32 *)srcaddr; +- while (len) { +- iowrite32(le32_to_cpu(*src32), address); +- address += 4; +- src32++; +- len--; +- } +- } +-} +- +- + static void + brcmf_pcie_copy_dev_tomem(struct brcmf_pciedev_info *devinfo, u32 mem_offset, + void *dstaddr, u32 len) +@@ -1702,8 +1662,8 @@ static int brcmf_pcie_download_fw_nvram(struct brcmf_pciedev_info *devinfo, + return err; + + brcmf_dbg(PCIE, "Download FW %s\n", devinfo->fw_name); +- brcmf_pcie_copy_mem_todev(devinfo, devinfo->ci->rambase, +- (void *)fw->data, fw->size); ++ memcpy_toio(devinfo->tcm + devinfo->ci->rambase, ++ (void *)fw->data, fw->size); + + resetintr = get_unaligned_le32(fw->data); + release_firmware(fw); +@@ -1724,7 +1684,7 @@ static int brcmf_pcie_download_fw_nvram(struct brcmf_pciedev_info *devinfo, + brcmf_dbg(PCIE, "Download NVRAM %s\n", devinfo->nvram_name); + address = devinfo->ci->rambase + devinfo->ci->ramsize - + nvram_len; +- brcmf_pcie_copy_mem_todev(devinfo, address, nvram, nvram_len); ++ memcpy_toio(devinfo->tcm + address, nvram, nvram_len); + brcmf_fw_nvram_free(nvram); + + /* +@@ -1734,13 +1694,12 @@ static int brcmf_pcie_download_fw_nvram(struct brcmf_pciedev_info *devinfo, + brcmf_dbg(PCIE, "Download random seed\n"); + + address -= sizeof(footer); +- brcmf_pcie_copy_mem_todev(devinfo, address, &footer, +- sizeof(footer)); ++ memcpy_toio(devinfo->tcm + address, &footer, sizeof(footer)); + + address -= rand_len; + randbuf = kzalloc(rand_len, GFP_KERNEL); + get_random_bytes(randbuf, rand_len); +- brcmf_pcie_copy_mem_todev(devinfo, address, randbuf, rand_len); ++ memcpy_toio(devinfo->tcm + address, randbuf, rand_len); + kfree(randbuf); + } else { + brcmf_dbg(PCIE, "No matching NVRAM file found %s\n", +-- +2.34.1 + diff --git a/8028-brcmfmac-pcie-Read-the-console-on-init-and-shutdown.patch b/8028-brcmfmac-pcie-Read-the-console-on-init-and-shutdown.patch new file mode 100644 index 0000000..56b0723 --- /dev/null +++ b/8028-brcmfmac-pcie-Read-the-console-on-init-and-shutdown.patch @@ -0,0 +1,45 @@ +From f6f42c43e1301ba77fe6b4480007871b3a2da85c Mon Sep 17 00:00:00 2001 +From: Hector Martin +Date: Tue, 21 Dec 2021 17:43:03 +0900 +Subject: [PATCH 28/34] brcmfmac: pcie: Read the console on init and shutdown + +This allows us to get console messages if the firmware crashed during +early init, or if an operation failed and we're about to shut down. + +Signed-off-by: Hector Martin +--- + drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +index 865e3f28c..8b67cddb7 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +@@ -854,6 +854,8 @@ static void brcmf_pcie_bus_console_read(struct brcmf_pciedev_info *devinfo, + return; + + console = &devinfo->shared.console; ++ if (!console->base_addr) ++ return; + addr = console->base_addr + BRCMF_CONSOLE_WRITEIDX_OFFSET; + newidx = brcmf_pcie_read_tcm32(devinfo, addr); + while (newidx != console->read_idx) { +@@ -1632,6 +1634,7 @@ brcmf_pcie_init_share_ram_info(struct brcmf_pciedev_info *devinfo, + shared->max_rxbufpost, shared->rx_dataoffset); + + brcmf_pcie_bus_console_init(devinfo); ++ brcmf_pcie_bus_console_read(devinfo, false); + + return 0; + } +@@ -2401,6 +2404,7 @@ brcmf_pcie_remove(struct pci_dev *pdev) + return; + + devinfo = bus->bus_priv.pcie->devinfo; ++ brcmf_pcie_bus_console_read(devinfo, false); + + devinfo->state = BRCMFMAC_PCIE_STATE_DOWN; + if (devinfo->ci) +-- +2.34.1 + diff --git a/8029-brcmfmac-pcie-Release-firmwares-in-the-brcmf_pcie_se.patch b/8029-brcmfmac-pcie-Release-firmwares-in-the-brcmf_pcie_se.patch new file mode 100644 index 0000000..4b32887 --- /dev/null +++ b/8029-brcmfmac-pcie-Release-firmwares-in-the-brcmf_pcie_se.patch @@ -0,0 +1,31 @@ +From fbf132e816fb5ab9fc5e44be8a3ba78cdc5bb1e1 Mon Sep 17 00:00:00 2001 +From: Hector Martin +Date: Tue, 21 Dec 2021 17:44:51 +0900 +Subject: [PATCH 29/34] brcmfmac: pcie: Release firmwares in the + brcmf_pcie_setup error path + +This avoids leaking memory if brcmf_chip_get_raminfo fails. Note that +the CLM blob is released in the device remove path. + +Fixes: 82f93cf46d60 ("brcmfmac: get chip's default RAM info during PCIe setup") +Signed-off-by: Hector Martin +--- + drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +index 8b67cddb7..f1b90b5e7 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +@@ -2125,6 +2125,8 @@ static void brcmf_pcie_setup(struct device *dev, int ret, + ret = brcmf_chip_get_raminfo(devinfo->ci); + if (ret) { + brcmf_err(bus, "Failed to get RAM info\n"); ++ release_firmware(fw); ++ brcmf_fw_nvram_free(nvram); + goto fail; + } + +-- +2.34.1 + diff --git a/8031-brcmfmac-fwil-Constify-iovar-name-arguments.patch b/8031-brcmfmac-fwil-Constify-iovar-name-arguments.patch new file mode 100644 index 0000000..f8996cd --- /dev/null +++ b/8031-brcmfmac-fwil-Constify-iovar-name-arguments.patch @@ -0,0 +1,215 @@ +From 540d5a24c9b0c9a14dce5b59167628b9f18c27cd Mon Sep 17 00:00:00 2001 +From: Hector Martin +Date: Sun, 26 Dec 2021 00:24:02 +0900 +Subject: [PATCH 31/34] brcmfmac: fwil: Constify iovar name arguments + +Make all the iovar name arguments const char * instead of just char *. + +Signed-off-by: Hector Martin +--- + .../broadcom/brcm80211/brcmfmac/fwil.c | 34 +++++++++---------- + .../broadcom/brcm80211/brcmfmac/fwil.h | 28 +++++++-------- + 2 files changed, 31 insertions(+), 31 deletions(-) + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil.c +index d5578ca68..72fe8bce6 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil.c +@@ -192,7 +192,7 @@ brcmf_fil_cmd_int_get(struct brcmf_if *ifp, u32 cmd, u32 *data) + } + + static u32 +-brcmf_create_iovar(char *name, const char *data, u32 datalen, ++brcmf_create_iovar(const char *name, const char *data, u32 datalen, + char *buf, u32 buflen) + { + u32 len; +@@ -213,7 +213,7 @@ brcmf_create_iovar(char *name, const char *data, u32 datalen, + + + s32 +-brcmf_fil_iovar_data_set(struct brcmf_if *ifp, char *name, const void *data, ++brcmf_fil_iovar_data_set(struct brcmf_if *ifp, const char *name, const void *data, + u32 len) + { + struct brcmf_pub *drvr = ifp->drvr; +@@ -241,7 +241,7 @@ brcmf_fil_iovar_data_set(struct brcmf_if *ifp, char *name, const void *data, + } + + s32 +-brcmf_fil_iovar_data_get(struct brcmf_if *ifp, char *name, void *data, ++brcmf_fil_iovar_data_get(struct brcmf_if *ifp, const char *name, void *data, + u32 len) + { + struct brcmf_pub *drvr = ifp->drvr; +@@ -272,7 +272,7 @@ brcmf_fil_iovar_data_get(struct brcmf_if *ifp, char *name, void *data, + } + + s32 +-brcmf_fil_iovar_int_set(struct brcmf_if *ifp, char *name, u32 data) ++brcmf_fil_iovar_int_set(struct brcmf_if *ifp, const char *name, u32 data) + { + __le32 data_le = cpu_to_le32(data); + +@@ -280,7 +280,7 @@ brcmf_fil_iovar_int_set(struct brcmf_if *ifp, char *name, u32 data) + } + + s32 +-brcmf_fil_iovar_int_get(struct brcmf_if *ifp, char *name, u32 *data) ++brcmf_fil_iovar_int_get(struct brcmf_if *ifp, const char *name, u32 *data) + { + __le32 data_le = cpu_to_le32(*data); + s32 err; +@@ -292,7 +292,7 @@ brcmf_fil_iovar_int_get(struct brcmf_if *ifp, char *name, u32 *data) + } + + static u32 +-brcmf_create_bsscfg(s32 bsscfgidx, char *name, char *data, u32 datalen, ++brcmf_create_bsscfg(s32 bsscfgidx, const char *name, char *data, u32 datalen, + char *buf, u32 buflen) + { + const s8 *prefix = "bsscfg:"; +@@ -337,7 +337,7 @@ brcmf_create_bsscfg(s32 bsscfgidx, char *name, char *data, u32 datalen, + } + + s32 +-brcmf_fil_bsscfg_data_set(struct brcmf_if *ifp, char *name, ++brcmf_fil_bsscfg_data_set(struct brcmf_if *ifp, const char *name, + void *data, u32 len) + { + struct brcmf_pub *drvr = ifp->drvr; +@@ -366,7 +366,7 @@ brcmf_fil_bsscfg_data_set(struct brcmf_if *ifp, char *name, + } + + s32 +-brcmf_fil_bsscfg_data_get(struct brcmf_if *ifp, char *name, ++brcmf_fil_bsscfg_data_get(struct brcmf_if *ifp, const char *name, + void *data, u32 len) + { + struct brcmf_pub *drvr = ifp->drvr; +@@ -396,7 +396,7 @@ brcmf_fil_bsscfg_data_get(struct brcmf_if *ifp, char *name, + } + + s32 +-brcmf_fil_bsscfg_int_set(struct brcmf_if *ifp, char *name, u32 data) ++brcmf_fil_bsscfg_int_set(struct brcmf_if *ifp, const char *name, u32 data) + { + __le32 data_le = cpu_to_le32(data); + +@@ -405,7 +405,7 @@ brcmf_fil_bsscfg_int_set(struct brcmf_if *ifp, char *name, u32 data) + } + + s32 +-brcmf_fil_bsscfg_int_get(struct brcmf_if *ifp, char *name, u32 *data) ++brcmf_fil_bsscfg_int_get(struct brcmf_if *ifp, const char *name, u32 *data) + { + __le32 data_le = cpu_to_le32(*data); + s32 err; +@@ -417,7 +417,7 @@ brcmf_fil_bsscfg_int_get(struct brcmf_if *ifp, char *name, u32 *data) + return err; + } + +-static u32 brcmf_create_xtlv(char *name, u16 id, char *data, u32 len, ++static u32 brcmf_create_xtlv(const char *name, u16 id, char *data, u32 len, + char *buf, u32 buflen) + { + u32 iolen; +@@ -438,7 +438,7 @@ static u32 brcmf_create_xtlv(char *name, u16 id, char *data, u32 len, + return iolen; + } + +-s32 brcmf_fil_xtlv_data_set(struct brcmf_if *ifp, char *name, u16 id, ++s32 brcmf_fil_xtlv_data_set(struct brcmf_if *ifp, const char *name, u16 id, + void *data, u32 len) + { + struct brcmf_pub *drvr = ifp->drvr; +@@ -466,7 +466,7 @@ s32 brcmf_fil_xtlv_data_set(struct brcmf_if *ifp, char *name, u16 id, + return err; + } + +-s32 brcmf_fil_xtlv_data_get(struct brcmf_if *ifp, char *name, u16 id, ++s32 brcmf_fil_xtlv_data_get(struct brcmf_if *ifp, const char *name, u16 id, + void *data, u32 len) + { + struct brcmf_pub *drvr = ifp->drvr; +@@ -495,7 +495,7 @@ s32 brcmf_fil_xtlv_data_get(struct brcmf_if *ifp, char *name, u16 id, + return err; + } + +-s32 brcmf_fil_xtlv_int_set(struct brcmf_if *ifp, char *name, u16 id, u32 data) ++s32 brcmf_fil_xtlv_int_set(struct brcmf_if *ifp, const char *name, u16 id, u32 data) + { + __le32 data_le = cpu_to_le32(data); + +@@ -503,7 +503,7 @@ s32 brcmf_fil_xtlv_int_set(struct brcmf_if *ifp, char *name, u16 id, u32 data) + sizeof(data_le)); + } + +-s32 brcmf_fil_xtlv_int_get(struct brcmf_if *ifp, char *name, u16 id, u32 *data) ++s32 brcmf_fil_xtlv_int_get(struct brcmf_if *ifp, const char *name, u16 id, u32 *data) + { + __le32 data_le = cpu_to_le32(*data); + s32 err; +@@ -514,12 +514,12 @@ s32 brcmf_fil_xtlv_int_get(struct brcmf_if *ifp, char *name, u16 id, u32 *data) + return err; + } + +-s32 brcmf_fil_xtlv_int8_get(struct brcmf_if *ifp, char *name, u16 id, u8 *data) ++s32 brcmf_fil_xtlv_int8_get(struct brcmf_if *ifp, const char *name, u16 id, u8 *data) + { + return brcmf_fil_xtlv_data_get(ifp, name, id, data, sizeof(*data)); + } + +-s32 brcmf_fil_xtlv_int16_get(struct brcmf_if *ifp, char *name, u16 id, u16 *data) ++s32 brcmf_fil_xtlv_int16_get(struct brcmf_if *ifp, const char *name, u16 id, u16 *data) + { + __le16 data_le = cpu_to_le16(*data); + s32 err; +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil.h +index cb26f8c59..bc693157c 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil.h ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil.h +@@ -84,26 +84,26 @@ s32 brcmf_fil_cmd_data_get(struct brcmf_if *ifp, u32 cmd, void *data, u32 len); + s32 brcmf_fil_cmd_int_set(struct brcmf_if *ifp, u32 cmd, u32 data); + s32 brcmf_fil_cmd_int_get(struct brcmf_if *ifp, u32 cmd, u32 *data); + +-s32 brcmf_fil_iovar_data_set(struct brcmf_if *ifp, char *name, const void *data, ++s32 brcmf_fil_iovar_data_set(struct brcmf_if *ifp, const char *name, const void *data, + u32 len); +-s32 brcmf_fil_iovar_data_get(struct brcmf_if *ifp, char *name, void *data, ++s32 brcmf_fil_iovar_data_get(struct brcmf_if *ifp, const char *name, void *data, + u32 len); +-s32 brcmf_fil_iovar_int_set(struct brcmf_if *ifp, char *name, u32 data); +-s32 brcmf_fil_iovar_int_get(struct brcmf_if *ifp, char *name, u32 *data); ++s32 brcmf_fil_iovar_int_set(struct brcmf_if *ifp, const char *name, u32 data); ++s32 brcmf_fil_iovar_int_get(struct brcmf_if *ifp, const char *name, u32 *data); + +-s32 brcmf_fil_bsscfg_data_set(struct brcmf_if *ifp, char *name, void *data, ++s32 brcmf_fil_bsscfg_data_set(struct brcmf_if *ifp, const char *name, void *data, + u32 len); +-s32 brcmf_fil_bsscfg_data_get(struct brcmf_if *ifp, char *name, void *data, ++s32 brcmf_fil_bsscfg_data_get(struct brcmf_if *ifp, const char *name, void *data, + u32 len); +-s32 brcmf_fil_bsscfg_int_set(struct brcmf_if *ifp, char *name, u32 data); +-s32 brcmf_fil_bsscfg_int_get(struct brcmf_if *ifp, char *name, u32 *data); +-s32 brcmf_fil_xtlv_data_set(struct brcmf_if *ifp, char *name, u16 id, ++s32 brcmf_fil_bsscfg_int_set(struct brcmf_if *ifp, const char *name, u32 data); ++s32 brcmf_fil_bsscfg_int_get(struct brcmf_if *ifp, const char *name, u32 *data); ++s32 brcmf_fil_xtlv_data_set(struct brcmf_if *ifp, const char *name, u16 id, + void *data, u32 len); +-s32 brcmf_fil_xtlv_data_get(struct brcmf_if *ifp, char *name, u16 id, ++s32 brcmf_fil_xtlv_data_get(struct brcmf_if *ifp, const char *name, u16 id, + void *data, u32 len); +-s32 brcmf_fil_xtlv_int_set(struct brcmf_if *ifp, char *name, u16 id, u32 data); +-s32 brcmf_fil_xtlv_int_get(struct brcmf_if *ifp, char *name, u16 id, u32 *data); +-s32 brcmf_fil_xtlv_int8_get(struct brcmf_if *ifp, char *name, u16 id, u8 *data); +-s32 brcmf_fil_xtlv_int16_get(struct brcmf_if *ifp, char *name, u16 id, u16 *data); ++s32 brcmf_fil_xtlv_int_set(struct brcmf_if *ifp, const char *name, u16 id, u32 data); ++s32 brcmf_fil_xtlv_int_get(struct brcmf_if *ifp, const char *name, u16 id, u32 *data); ++s32 brcmf_fil_xtlv_int8_get(struct brcmf_if *ifp, const char *name, u16 id, u8 *data); ++s32 brcmf_fil_xtlv_int16_get(struct brcmf_if *ifp, const char *name, u16 id, u16 *data); + + #endif /* _fwil_h_ */ +-- +2.34.1 + diff --git a/8032-brcmfmac-common-Add-support-for-downloading-TxCap-bl.patch b/8032-brcmfmac-common-Add-support-for-downloading-TxCap-bl.patch new file mode 100644 index 0000000..9a2eb9a --- /dev/null +++ b/8032-brcmfmac-common-Add-support-for-downloading-TxCap-bl.patch @@ -0,0 +1,189 @@ +From 4c496f67db9939ac2be78a91c483d3afd4960f08 Mon Sep 17 00:00:00 2001 +From: Hector Martin +Date: Sun, 26 Dec 2021 00:25:00 +0900 +Subject: [PATCH 32/34] brcmfmac: common: Add support for downloading TxCap + blobs + +The TxCap blobs are additional data blobs used on Apple devices, and +are uploaded analogously to CLM blobs. Add core support for doing this. + +Signed-off-by: Hector Martin +--- + .../broadcom/brcm80211/brcmfmac/bus.h | 1 + + .../broadcom/brcm80211/brcmfmac/common.c | 97 +++++++++++++------ + 2 files changed, 71 insertions(+), 27 deletions(-) + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h +index b13af8f63..f4bd98da9 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h +@@ -39,6 +39,7 @@ enum brcmf_bus_protocol_type { + /* Firmware blobs that may be available */ + enum brcmf_blob_type { + BRCMF_BLOB_CLM, ++ BRCMF_BLOB_TXCAP, + }; + + struct brcmf_mp_device; +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c +index c84c48e49..d65308c3f 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c +@@ -101,7 +101,7 @@ void brcmf_c_set_joinpref_default(struct brcmf_if *ifp) + + static int brcmf_c_download(struct brcmf_if *ifp, u16 flag, + struct brcmf_dload_data_le *dload_buf, +- u32 len) ++ u32 len, const char *var) + { + s32 err; + +@@ -112,17 +112,17 @@ static int brcmf_c_download(struct brcmf_if *ifp, u16 flag, + dload_buf->crc = cpu_to_le32(0); + len = sizeof(*dload_buf) + len - 1; + +- err = brcmf_fil_iovar_data_set(ifp, "clmload", dload_buf, len); ++ err = brcmf_fil_iovar_data_set(ifp, var, dload_buf, len); + + return err; + } + +-static int brcmf_c_process_clm_blob(struct brcmf_if *ifp) ++static int brcmf_c_download_blob(struct brcmf_if *ifp, ++ const void *data, size_t size, ++ const char *loadvar, const char *statvar) + { + struct brcmf_pub *drvr = ifp->drvr; +- struct brcmf_bus *bus = drvr->bus_if; + struct brcmf_dload_data_le *chunk_buf; +- const struct firmware *clm = NULL; + u32 chunk_len; + u32 datalen; + u32 cumulative_len; +@@ -132,20 +132,11 @@ static int brcmf_c_process_clm_blob(struct brcmf_if *ifp) + + brcmf_dbg(TRACE, "Enter\n"); + +- err = brcmf_bus_get_blob(bus, &clm, BRCMF_BLOB_CLM); +- if (err || !clm) { +- brcmf_info("no clm_blob available (err=%d), device may have limited channels available\n", +- err); +- return 0; +- } +- + chunk_buf = kzalloc(sizeof(*chunk_buf) + MAX_CHUNK_LEN - 1, GFP_KERNEL); +- if (!chunk_buf) { +- err = -ENOMEM; +- goto done; +- } ++ if (!chunk_buf) ++ return -ENOMEM; + +- datalen = clm->size; ++ datalen = size; + cumulative_len = 0; + do { + if (datalen > MAX_CHUNK_LEN) { +@@ -154,9 +145,10 @@ static int brcmf_c_process_clm_blob(struct brcmf_if *ifp) + chunk_len = datalen; + dl_flag |= DL_END; + } +- memcpy(chunk_buf->data, clm->data + cumulative_len, chunk_len); ++ memcpy(chunk_buf->data, data + cumulative_len, chunk_len); + +- err = brcmf_c_download(ifp, dl_flag, chunk_buf, chunk_len); ++ err = brcmf_c_download(ifp, dl_flag, chunk_buf, chunk_len, ++ loadvar); + + dl_flag &= ~DL_BEGIN; + +@@ -165,20 +157,64 @@ static int brcmf_c_process_clm_blob(struct brcmf_if *ifp) + } while ((datalen > 0) && (err == 0)); + + if (err) { +- bphy_err(drvr, "clmload (%zu byte file) failed (%d)\n", +- clm->size, err); +- /* Retrieve clmload_status and print */ +- err = brcmf_fil_iovar_int_get(ifp, "clmload_status", &status); ++ bphy_err(drvr, "%s (%zu byte file) failed (%d)\n", ++ loadvar, size, err); ++ /* Retrieve status and print */ ++ err = brcmf_fil_iovar_int_get(ifp, statvar, &status); + if (err) +- bphy_err(drvr, "get clmload_status failed (%d)\n", err); ++ bphy_err(drvr, "get %s failed (%d)\n", statvar, err); + else +- brcmf_dbg(INFO, "clmload_status=%d\n", status); ++ brcmf_dbg(INFO, "%s=%d\n", statvar, status); + err = -EIO; + } + + kfree(chunk_buf); +-done: +- release_firmware(clm); ++ return err; ++} ++ ++static int brcmf_c_process_clm_blob(struct brcmf_if *ifp) ++{ ++ struct brcmf_pub *drvr = ifp->drvr; ++ struct brcmf_bus *bus = drvr->bus_if; ++ const struct firmware *fw = NULL; ++ s32 err; ++ ++ brcmf_dbg(TRACE, "Enter\n"); ++ ++ err = brcmf_bus_get_blob(bus, &fw, BRCMF_BLOB_CLM); ++ if (err || !fw) { ++ brcmf_info("no clm_blob available (err=%d), device may have limited channels available\n", ++ err); ++ return 0; ++ } ++ ++ err = brcmf_c_download_blob(ifp, fw->data, fw->size, ++ "clmload", "clmload_status"); ++ ++ release_firmware(fw); ++ return err; ++} ++ ++static int brcmf_c_process_txcap_blob(struct brcmf_if *ifp) ++{ ++ struct brcmf_pub *drvr = ifp->drvr; ++ struct brcmf_bus *bus = drvr->bus_if; ++ const struct firmware *fw = NULL; ++ s32 err; ++ ++ brcmf_dbg(TRACE, "Enter\n"); ++ ++ err = brcmf_bus_get_blob(bus, &fw, BRCMF_BLOB_TXCAP); ++ if (err || !fw) { ++ brcmf_info("no txcap_blob available (err=%d)\n", err); ++ return 0; ++ } ++ ++ brcmf_info("TxCap blob found, loading\n"); ++ err = brcmf_c_download_blob(ifp, fw->data, fw->size, ++ "txcapload", "txcapload_status"); ++ ++ release_firmware(fw); + return err; + } + +@@ -248,6 +284,13 @@ int brcmf_c_preinit_dcmds(struct brcmf_if *ifp) + goto done; + } + ++ /* Do TxCap downloading, if needed */ ++ err = brcmf_c_process_txcap_blob(ifp); ++ if (err < 0) { ++ bphy_err(drvr, "download TxCap blob file failed, %d\n", err); ++ goto done; ++ } ++ + /* query for 'ver' to get version info from firmware */ + memset(buf, 0, sizeof(buf)); + err = brcmf_fil_iovar_data_get(ifp, "ver", buf, sizeof(buf)); +-- +2.34.1 + diff --git a/8033-brcmfmac-pcie-Load-and-provide-TxCap-blobs.patch b/8033-brcmfmac-pcie-Load-and-provide-TxCap-blobs.patch new file mode 100644 index 0000000..f90b461 --- /dev/null +++ b/8033-brcmfmac-pcie-Load-and-provide-TxCap-blobs.patch @@ -0,0 +1,91 @@ +From de52f6bca772503aa189136b565584c1fbf6b43a Mon Sep 17 00:00:00 2001 +From: Hector Martin +Date: Sun, 26 Dec 2021 00:26:10 +0900 +Subject: [PATCH 33/34] brcmfmac: pcie: Load and provide TxCap blobs + +These blobs are named .txcap_blob, and exist alongside the existing +.clm_blob files. Use the existing firmware machinery to provide them to +the core. + +Signed-off-by: Hector Martin +--- + .../net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +index f1b90b5e7..b16bab061 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +@@ -73,6 +73,7 @@ MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH "brcmfmac*-pcie.*.txt"); + /* per-board firmware binaries */ + MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH "brcmfmac*-pcie.*.bin"); + MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH "brcmfmac*-pcie.*.clm_blob"); ++MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH "brcmfmac*-pcie.*.txcap_blob"); + + static const struct brcmf_firmware_mapping brcmf_pcie_fwnames[] = { + BRCMF_FW_ENTRY(BRCM_CC_43602_CHIP_ID, 0xFFFFFFFF, 43602), +@@ -327,7 +328,9 @@ struct brcmf_pciedev_info { + char fw_name[BRCMF_FW_NAME_LEN]; + char nvram_name[BRCMF_FW_NAME_LEN]; + char clm_name[BRCMF_FW_NAME_LEN]; ++ char txcap_name[BRCMF_FW_NAME_LEN]; + const struct firmware *clm_fw; ++ const struct firmware *txcap_fw; + const struct brcmf_pcie_reginfo *reginfo; + void __iomem *regs; + void __iomem *tcm; +@@ -1504,6 +1507,10 @@ static int brcmf_pcie_get_blob(struct device *dev, const struct firmware **fw, + *fw = devinfo->clm_fw; + devinfo->clm_fw = NULL; + break; ++ case BRCMF_BLOB_TXCAP: ++ *fw = devinfo->txcap_fw; ++ devinfo->txcap_fw = NULL; ++ break; + default: + return -ENOENT; + } +@@ -2095,6 +2102,7 @@ static int brcmf_pcie_read_otp(struct brcmf_pciedev_info *devinfo) + #define BRCMF_PCIE_FW_CODE 0 + #define BRCMF_PCIE_FW_NVRAM 1 + #define BRCMF_PCIE_FW_CLM 2 ++#define BRCMF_PCIE_FW_TXCAP 3 + + static void brcmf_pcie_setup(struct device *dev, int ret, + struct brcmf_fw_request *fwreq) +@@ -2120,6 +2128,7 @@ static void brcmf_pcie_setup(struct device *dev, int ret, + nvram = fwreq->items[BRCMF_PCIE_FW_NVRAM].nv_data.data; + nvram_len = fwreq->items[BRCMF_PCIE_FW_NVRAM].nv_data.len; + devinfo->clm_fw = fwreq->items[BRCMF_PCIE_FW_CLM].binary; ++ devinfo->txcap_fw = fwreq->items[BRCMF_PCIE_FW_TXCAP].binary; + kfree(fwreq); + + ret = brcmf_chip_get_raminfo(devinfo->ci); +@@ -2196,6 +2205,7 @@ brcmf_pcie_prepare_fw_request(struct brcmf_pciedev_info *devinfo) + { ".bin", devinfo->fw_name }, + { ".txt", devinfo->nvram_name }, + { ".clm_blob", devinfo->clm_name }, ++ { ".txcap_blob", devinfo->txcap_name }, + }; + + fwreq = brcmf_fw_alloc_request(devinfo->ci->chip, devinfo->ci->chiprev, +@@ -2210,6 +2220,8 @@ brcmf_pcie_prepare_fw_request(struct brcmf_pciedev_info *devinfo) + fwreq->items[BRCMF_PCIE_FW_NVRAM].flags = BRCMF_FW_REQF_OPTIONAL; + fwreq->items[BRCMF_PCIE_FW_CLM].type = BRCMF_FW_TYPE_BINARY; + fwreq->items[BRCMF_PCIE_FW_CLM].flags = BRCMF_FW_REQF_OPTIONAL; ++ fwreq->items[BRCMF_PCIE_FW_TXCAP].type = BRCMF_FW_TYPE_BINARY; ++ fwreq->items[BRCMF_PCIE_FW_TXCAP].flags = BRCMF_FW_REQF_OPTIONAL; + /* NVRAM reserves PCI domain 0 for Broadcom's SDK faked bus */ + fwreq->domain_nr = pci_domain_nr(devinfo->pdev->bus) + 1; + fwreq->bus_nr = devinfo->pdev->bus->number; +@@ -2426,6 +2438,7 @@ brcmf_pcie_remove(struct pci_dev *pdev) + brcmf_pcie_reset_device(devinfo); + brcmf_pcie_release_resource(devinfo); + release_firmware(devinfo->clm_fw); ++ release_firmware(devinfo->txcap_fw); + + if (devinfo->ci) + brcmf_chip_detach(devinfo->ci); +-- +2.34.1 + diff --git a/8034-brcmfmac-common-Add-support-for-external-calibration.patch b/8034-brcmfmac-common-Add-support-for-external-calibration.patch new file mode 100644 index 0000000..c31da1b --- /dev/null +++ b/8034-brcmfmac-common-Add-support-for-external-calibration.patch @@ -0,0 +1,100 @@ +From f92aef8679038a4d0b055babf368f8f43bdd072b Mon Sep 17 00:00:00 2001 +From: Hector Martin +Date: Sun, 26 Dec 2021 00:53:37 +0900 +Subject: [PATCH 34/34] brcmfmac: common: Add support for external calibration + blobs + +The calibration blob for a chip is normally stored in SROM and loaded +internally by the firmware. However, Apple ARM64 platforms instead store +it as part of platform configuration data, and provide it via the Apple +Device Tree. We forward this into the Linux DT in the bootloader. + +Add support for taking this blob from the DT and loading it into the +dongle. The loading mechanism is the same as used for the CLM and TxCap +blobs. + +Signed-off-by: Hector Martin +--- + .../broadcom/brcm80211/brcmfmac/common.c | 24 +++++++++++++++++++ + .../broadcom/brcm80211/brcmfmac/common.h | 2 ++ + .../wireless/broadcom/brcm80211/brcmfmac/of.c | 9 +++++++ + 3 files changed, 35 insertions(+) + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c +index d65308c3f..ad36e6b5d 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c +@@ -218,6 +218,23 @@ static int brcmf_c_process_txcap_blob(struct brcmf_if *ifp) + return err; + } + ++static int brcmf_c_process_cal_blob(struct brcmf_if *ifp) ++{ ++ struct brcmf_pub *drvr = ifp->drvr; ++ struct brcmf_mp_device *settings = drvr->settings; ++ s32 err; ++ ++ brcmf_dbg(TRACE, "Enter\n"); ++ ++ if (!settings->cal_blob || !settings->cal_size) ++ return 0; ++ ++ brcmf_info("Calibration blob provided by platform, loading\n"); ++ err = brcmf_c_download_blob(ifp, settings->cal_blob, settings->cal_size, ++ "calload", "calload_status"); ++ return err; ++} ++ + int brcmf_c_preinit_dcmds(struct brcmf_if *ifp) + { + struct brcmf_pub *drvr = ifp->drvr; +@@ -291,6 +308,13 @@ int brcmf_c_preinit_dcmds(struct brcmf_if *ifp) + goto done; + } + ++ /* Download external calibration blob, if available */ ++ err = brcmf_c_process_cal_blob(ifp); ++ if (err < 0) { ++ bphy_err(drvr, "download calibration blob file failed, %d\n", err); ++ goto done; ++ } ++ + /* query for 'ver' to get version info from firmware */ + memset(buf, 0, sizeof(buf)); + err = brcmf_fil_iovar_data_get(ifp, "ver", buf, sizeof(buf)); +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h +index a88c4a931..f321346ed 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h +@@ -51,6 +51,8 @@ struct brcmf_mp_device { + struct brcmfmac_pd_cc *country_codes; + const char *board_type; + const char *antenna_sku; ++ void *cal_blob; ++ int cal_size; + union { + struct brcmfmac_sdio_pd sdio; + } bus; +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c +index 31407d3a1..9db5fa106 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c +@@ -86,6 +86,15 @@ void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type, + if (!of_property_read_string(np, "apple,antenna-sku", &prop)) + settings->antenna_sku = devm_kstrdup(dev, prop, GFP_KERNEL); + ++ /* ++ * The WLAN calibration blob is normally stored in SROM, but Apple ++ * ARM64 platforms pass it via the DT instead. ++ */ ++ prop = of_get_property(np, "brcm,cal-blob", &settings->cal_size); ++ if (prop && settings->cal_size) ++ settings->cal_blob = devm_kmemdup(dev, prop, settings->cal_size, ++ GFP_KERNEL); ++ + /* Set board-type to the first string of the machine compatible prop */ + root = of_find_node_by_path("/"); + if (root && !settings->board_type) { +-- +2.34.1 + diff --git a/8003-brcmfmac-p2p-Ensure-virtual-interface-is-initialized.patch b/8035-brcmfmac-p2p-Ensure-virtual-interface-is-initialized.patch similarity index 100% rename from 8003-brcmfmac-p2p-Ensure-virtual-interface-is-initialized.patch rename to 8035-brcmfmac-p2p-Ensure-virtual-interface-is-initialized.patch diff --git a/PKGBUILD b/PKGBUILD index 46cc8c8..ebe5470 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -4,7 +4,7 @@ pkgbase=linux-mbp pkgver=5.15.12 _srcname=linux-${pkgver} -pkgrel=3 +pkgrel=4 pkgdesc='Linux for MBP' _srctag=v${pkgver%.*}-${pkgver##*.} url="https://git.archlinux.org/linux.git/log/?h=v$_srctag" @@ -48,10 +48,6 @@ source=( 4008-HID-apple-Add-support-for-MacBookAir9-1-keyboard-tra.patch 4009-HID-apple-Add-support-for-MacBookPro16-1-keyboard-tr.patch - # Broadcom Wifi rambase debugging additions - 5001-brcmfmac-move-brcmf_mp_device-into-its-own-header.patch - 5002-brcmfmac-Add-ability-to-manually-specify-FW-rambase-.patch - # MBP Peripheral support 6001-media-uvcvideo-Add-support-for-Apple-T2-attached-iSi.patch # UVC Camera support @@ -59,11 +55,42 @@ source=( 7001-drm-i915-fbdev-Discard-BIOS-framebuffers-exceeding-h.patch # Broadcom WIFI device support - 8001-brcmfmac-Add-initial-support-for-the-BRCM4355.patch - 8002-brcmfmac-Add-initial-support-for-the-BRCM4377.patch + 8001-brcmfmac-pcie-Declare-missing-firmware-files-in-pcie.patch + 8002-brcmfmac-firmware-Support-having-multiple-alt-paths.patch + 8003-brcmfmac-firmware-Handle-per-board-clm_blob-files.patch + 8004-brcmfmac-pcie-sdio-usb-Get-CLM-blob-via-standard-fir.patch + 8005-brcmfmac-firmware-Support-passing-in-multiple-board_.patch + 8006-brcmfmac-pcie-Read-Apple-OTP-information.patch + 8007-brcmfmac-of-Fetch-Apple-properties.patch + 8008-brcmfmac-pcie-Perform-firmware-selection-for-Apple-p.patch + 8009-brcmfmac-firmware-Allow-platform-to-override-macaddr.patch + 8010-brcmfmac-msgbuf-Increase-RX-ring-sizes-to-1024.patch + 8011-brcmfmac-pcie-Fix-crashes-due-to-early-IRQs.patch + 8012-brcmfmac-pcie-Support-PCIe-core-revisions-64.patch + 8013-brcmfmac-pcie-Add-IDs-properties-for-BCM4378.patch + 8014-ACPI-property-Support-strings-in-Apple-_DSM-props.patch + 8015-brcmfmac-acpi-Add-support-for-fetching-Apple-ACPI-pr.patch + 8016-brcmfmac-pcie-Provide-a-buffer-of-random-bytes-to-th.patch + 8017-brcmfmac-pcie-Add-IDs-properties-for-BCM4355.patch + 8018-brcmfmac-pcie-Add-IDs-properties-for-BCM4377.patch + 8019-brcmfmac-pcie-Perform-correct-BCM4364-firmware-selec.patch + 8020-brcmfmac-chip-Only-disable-D11-cores-handle-an-arbit.patch + 8021-brcmfmac-chip-Handle-1024-unit-sizes-for-TCM-blocks.patch + 8022-brcmfmac-cfg80211-Add-support-for-scan-params-v2.patch + 8023-brcmfmac-feature-Add-support-for-setting-feats-based.patch + 8024-brcmfmac-cfg80211-Add-support-for-PMKID_V3-operation.patch + 8025-brcmfmac-cfg80211-Pass-the-PMK-in-binary-instead-of-.patch + 8026-brcmfmac-pcie-Add-IDs-properties-for-BCM4387.patch + 8027-brcmfmac-pcie-Replace-brcmf_pcie_copy_mem_todev-with.patch + 8028-brcmfmac-pcie-Read-the-console-on-init-and-shutdown.patch + 8029-brcmfmac-pcie-Release-firmwares-in-the-brcmf_pcie_se.patch + 8031-brcmfmac-fwil-Constify-iovar-name-arguments.patch + 8032-brcmfmac-common-Add-support-for-downloading-TxCap-bl.patch + 8033-brcmfmac-pcie-Load-and-provide-TxCap-blobs.patch + 8034-brcmfmac-common-Add-support-for-external-calibration.patch # Broadcom P2P VIF fix - 8003-brcmfmac-p2p-Ensure-virtual-interface-is-initialized.patch + 8035-brcmfmac-p2p-Ensure-virtual-interface-is-initialized.patch # Broadcom BT device support 9001-bluetooth-add-disable-read-tx-power-quirk.patch @@ -99,12 +126,41 @@ sha256sums=('7de919772b62647591527e904e3b3583783381a29d812404f58a222484e751a0' '40eff5e88bb30c51c6b97e85c2e7b8dec5f97916f768e6c07618d9c5afe68574' 'cac035fe07663a319185c644c5b39b34bef89ada348881fa4a02d15290260445' '9dfa9f02d17c5cd9620fa2c1d43ca967b81b6a56d33c2bafae14e0c64e498baa' - '4d22727c1456e268de1c39ac73f2dc0c1630ac25aa66364d99f94e29eba5c6b9' - 'cc8a177699862101cbed9172def8c3985d65f7b5c7755f600559aa45dd80e348' '9640178d6251686c980c30fc528b3d70beac6ce8246bf433506a3f843808326c' '90a6012cdd8a64ede8e0bbaf7331960bd68f628e0973b65459188eb1ccb5b829' - 'fb73c8ba175ec2bdf765207f434d1e8977efa0be3097a6d1e2843536a531c351' - '294300fe5e290e18ee4062fe6847f7838c0f1a977af91157a1630828f55f7aa2' + '862f631ef9f25453ce38d9ed0197e62d85f9f5a0625ed77237e643297fb42f75' + '2f7899b70d5c55aea3f6385385fea01ce21b48f9441982a94f36c842cceec083' + '2b126cda3863f49b8d3a6de8fa8cca979d87bd9e66812531be5c02c9e5840d82' + '70a277c9ad4fba624b3916e397624e557135b269c34eb704ace29aa1a6b8e430' + '42ae52b93ea0cbd0d1859512b88e0c290e3500b8e52f8de3be7398cb6039d0b4' + '300d926bac23b81d267e73433d668581ec1e3b12fa76462ba3d0b1cf2728b82d' + '01f3185e551dd49007b533d4bae37774131820a51715e1f1a391220e055afc66' + 'db55305b8e3c2a8fa0a85aeaad661717ae745d5dabc7735221adb184e89a2d1b' + '82f679f3736e09ee9ea8a8b53c052e84bb40df8a05f21a2082224184ad3cf162' + '9907f67d099a2b6243747350a2c057d82c39e822107ca57cbfdc32baf378d2cb' + 'd25cd32de8c74ba8bcb430c21f9d84deae1174594d00ea94e1fd1e2ab70ea5cb' + '823d35349844605dadf381ae7c6097379a23c72da59e3cf393fcf3e5d466dafd' + 'ed6e84bc03cd6adfc3f8def843f150b71470df6d6a88fc348d5e1b36f133f424' + '23d9018c90d02389f2ddeb0821e581d354184b3b38d4488fbc0f3363463a0c9e' + 'd2e2b0f0c80fb5b4da36d3a7a87b10c2419255c0e38e0faa1d7478eaab1b9a35' + 'ecef58f944bf61950b3211e88acd104b0006a177e76f59a47b8253aaf5e6acc6' + '1eb6e14b5504efbad7911aabc801a265e9ba13cb2fd6ce8e029af55bf97cec86' + 'f2b553e11240bb88e5d0ffd7883d808c069ede544e5c578c22975466a5c9d26a' + 'ac4b200dadbb88179bf37dcea280efe25bf42b420a90ab1399c3bd9c7905f592' + 'e12726162b868435081a215f04d921cd8b9307de71738c41090ec93a267725de' + 'bfa3bb8d16b6c26831f9b5e833d46ea2c60854f016540a051f96c418be1a728f' + 'e9df13adedefd0043ea6678c19a9de608aa69fe83929a13213c528052096ed3c' + 'b51a916bb0048d7cb57ed2afc25394ec72664efe2a8c5705b0dcfe62384e34ed' + '2ec5dddd41327b5018d41b920955182bc3f220f692a32b061d8797c8fee99dbc' + 'a8596e6180a895515cbc1f361edc8fca460f630dd15bbd161037d84717717ba8' + '55b6981468b489f5bb7c59d5f9a6b479c0d96bb1018efa209ed8506d54de8399' + '2339acd32f020db66f2a3190910d925a030798e3fd57006a09dda56e5acbf279' + 'f41ab41dd9445dee28699c1af7909723514f9d41d30a5c148d4f99617ed2d46e' + '0e6cd10376f13873a9226d233161a0dab6b1d3c6a7d66bc3c4e8d3cc0f0397d0' + '8f9a6d47eaec7d9df9a822a146ab15ca7bee906866545493cac8621570237060' + 'ecede30aa68ea4646d3efb0a7190466ff1784f4e93756a04bb58756536f28035' + '0bed877897873ae86e512d711b86fa11adc5b8e7fe35139e290e8d0a0133f6a5' + '23f4a7002632f95abb1ed75a4df0570b7a81e5cf4067a16da7101b16eb582a01' 'fa0ad2e2f171eafd727d780588f7ef5d47ddf2d75fab02c67356bbc7b26e25e0' '31e414978a947bdb71f27ed364c4da73b81fcf1921250cb69ee1bcf2bbd25636' '8aeed7ebb2544aabf2361c7eaeea4ab76f1ce2c5f6257224545b82ef42cf4b44'