linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] brcmfmac: Call brcmf_dmi_probe before brcmf_of_probe
@ 2018-11-23  9:11 Hans de Goede
  2018-11-23  9:45 ` Kalle Valo
  2018-11-29 15:32 ` Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: Hans de Goede @ 2018-11-23  9:11 UTC (permalink / raw)
  To: Arend van Spriel, Franky Lin, Hante Meuleman, Kalle Valo,
	Chi-Hsien Lin, Wright Feng
  Cc: Hans de Goede, linux-wireless, brcm80211-dev-list.pdl,
	Peter Robinson

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>
---
 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 d52774c6489b..0bb16bf574e3 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;
 }
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] brcmfmac: Call brcmf_dmi_probe before brcmf_of_probe
  2018-11-23  9:11 [PATCH] brcmfmac: Call brcmf_dmi_probe before brcmf_of_probe Hans de Goede
@ 2018-11-23  9:45 ` Kalle Valo
  2018-11-29 15:32 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2018-11-23  9:45 UTC (permalink / raw)
  To: Hans de Goede
  Cc: Arend van Spriel, Franky Lin, Hante Meuleman, Chi-Hsien Lin,
	Wright Feng, linux-wireless, brcm80211-dev-list.pdl,
	Peter Robinson

Hans de Goede <hdegoede@redhat.com> writes:

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

Note to myself: commit bd1e82bb420a is on wireless-drivers-next so need
to queue for 4.20.

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] brcmfmac: Call brcmf_dmi_probe before brcmf_of_probe
  2018-11-23  9:11 [PATCH] brcmfmac: Call brcmf_dmi_probe before brcmf_of_probe Hans de Goede
  2018-11-23  9:45 ` Kalle Valo
@ 2018-11-29 15:32 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2018-11-29 15:32 UTC (permalink / raw)
  To: Hans de Goede
  Cc: Arend van Spriel, Franky Lin, Hante Meuleman, Chi-Hsien Lin,
	Wright Feng, Hans de Goede, linux-wireless,
	brcm80211-dev-list.pdl, Peter Robinson

Hans de Goede <hdegoede@redhat.com> wrote:

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

Patch applied to wireless-drivers-next.git, thanks.

554da3868eb1 brcmfmac: Call brcmf_dmi_probe before brcmf_of_probe

-- 
https://patchwork.kernel.org/patch/10695255/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-11-29 15:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-23  9:11 [PATCH] brcmfmac: Call brcmf_dmi_probe before brcmf_of_probe Hans de Goede
2018-11-23  9:45 ` Kalle Valo
2018-11-29 15:32 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).