summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Robinson <pbrobinson@gmail.com>2019-01-14 13:25:54 +0000
committerPeter Robinson <pbrobinson@gmail.com>2019-01-14 13:25:54 +0000
commit1b6c082c377455115b90edc0fffa800981f8a1fa (patch)
treecbff5de4006d1c8b2fa839bba3e1b07ffe754804
parent87ea4dfa87aa898d2c5eaf2aaffe5b8d0b88187b (diff)
downloadkernel-1b6c082c377455115b90edc0fffa800981f8a1fa.tar.gz
kernel-1b6c082c377455115b90edc0fffa800981f8a1fa.tar.xz
kernel-1b6c082c377455115b90edc0fffa800981f8a1fa.zip
re-add the fix for brcmfmac on Raspberry Pi aarch64
-rw-r--r--brcmfmac-Call-brcmf_dmi_probe-before-brcmf_of_probe.patch43
-rw-r--r--kernel.spec2
2 files changed, 45 insertions, 0 deletions
diff --git a/brcmfmac-Call-brcmf_dmi_probe-before-brcmf_of_probe.patch b/brcmfmac-Call-brcmf_dmi_probe-before-brcmf_of_probe.patch
new file mode 100644
index 000000000..ea3f435fe
--- /dev/null
+++ b/brcmfmac-Call-brcmf_dmi_probe-before-brcmf_of_probe.patch
@@ -0,0 +1,43 @@
+From 554da3868eb1d7174710c18b4ddd6ff01f6d612c Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Fri, 23 Nov 2018 10:11:48 +0100
+Subject: brcmfmac: Call brcmf_dmi_probe before brcmf_of_probe
+
+ARM systems with UEFI may have both devicetree (of) and DMI data in this
+case we end up setting brcmf_mp_device.board_type twice.
+
+In this case we should prefer the devicetree data, because:
+1) The devicerree data is more reliable
+2) Some ARM systems (e.g. the Raspberry Pi 3 models) support both UEFI and
+ classic uboot booting, the devicetree data is always there, so using it
+ makes sure we ask for the same nvram file independent of how we booted.
+
+This commit moves the brcmf_dmi_probe call to before the brcmf_of_probe
+call, so that the latter can override the value of the first if both are
+set.
+
+Fixes: bd1e82bb420a ("brcmfmac: Set board_type from DMI on x86 based ...")
+Cc: Peter Robinson <pbrobinson@gmail.com>
+Tested-and-reported-by: Peter Robinson <pbrobinson@gmail.com>
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
+---
+ drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
+index e738112ed87c..1f1e95a15a17 100644
+--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
+@@ -449,8 +449,8 @@ struct brcmf_mp_device *brcmf_get_module_param(struct device *dev,
+ }
+ if (!found) {
+ /* No platform data for this device, try OF and DMI data */
+- brcmf_of_probe(dev, bus_type, settings);
+ brcmf_dmi_probe(settings, chip, chiprev);
++ brcmf_of_probe(dev, bus_type, settings);
+ }
+ return settings;
+ }
+--
+cgit 1.2-0.3.lf.el7
diff --git a/kernel.spec b/kernel.spec
index aee05b87b..1efb88fed 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -602,6 +602,8 @@ Patch339: bcm2835-cpufreq-add-CPU-frequency-control-driver.patch
# https://www.spinics.net/lists/linux-wireless/msg178827.html
Patch340: brcmfmac-Remove-firmware-loading-code-duplication.patch
+Patch341: brcmfmac-Call-brcmf_dmi_probe-before-brcmf_of_probe.patch
+
# Fix for AllWinner A64 Timer Errata, still not final
# https://www.spinics.net/lists/arm-kernel/msg699622.html
Patch350: Allwinner-A64-timer-workaround.patch