Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp2593182rwl; Fri, 6 Jan 2023 08:25:57 -0800 (PST) X-Google-Smtp-Source: AMrXdXug/kAKFt/M3BbKhyxHi2bXNwx5vxewyshTh8+I+Ert6QW2gWHIMaBZz0zBgUnsYqvMZhjN X-Received: by 2002:a17:906:158c:b0:7c4:f752:e959 with SMTP id k12-20020a170906158c00b007c4f752e959mr45305712ejd.33.1673022357097; Fri, 06 Jan 2023 08:25:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673022357; cv=none; d=google.com; s=arc-20160816; b=fJhUikwJUSWlCLr22xscLmLQG3Bgzf4GbmHsSuaY2jUuBhlR9vxm+Xk4ttb/194S5A PlFN8vhOE0ueUpMZpMXvPiaYIgHf+CwzqVZ+lD+3hWny32qWSLfx3oJYAQuSSkFnjsQj t0KsVbfnnzsQIlsjVPcgdu5OWQAguIL+RuQd/muKRKhm/Ijnnl6Bhl7YuG9XehXmWNWj /++6JB1zQgefYks2Qmre+7FMoUJ4eo8NM0WlPq4cBXxOI4iKLAqYJSBRg1nkV/jGHcjj fry55at+CQ0I91vJPJe4Ag9BKaYBnnVUrH9jKh5t8xQTrvG5gWL0HPWUSCWOEYXSShe5 r7uQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=rvoHA51dBPJxu29rUy3n+YN/knXWowFgBFUnc3YEs8M=; b=HwCfsaWnuAGhxwHAuNuf0maPGkBiVQdCckEt5oUCJrXbLv2MPCE0d8+0KwHbNiIkFy fZ1k4VHEesqCDKrmXnW1y9zMyyBrGiLlGXsuMn0oPtUjOrQB++Gay3nBdvaVodTQKxSE v5+RS59/TdBieAk2z3Y10R8oHzZmOE2WVKlFU1RO9+e6EJl1KD8m8w9ZBXxSWAJhvL4Q 4gekx8Dy/oTCPIYKBFTQWsdhqnFrPc6AOwonvFY126vKGRodVc6LNU8LdZvdpKvBFJrV 4XQdSh+Bqa5c4+mJAxUc/7swsfxnvlVRbIfw+7WAfmAXOsNVFoXYWf/UCNcH9th+Jpao 7xNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=FAdRo3A0; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dp17-20020a170906c15100b0078e27f2ef52si1958698ejc.603.2023.01.06.08.25.36; Fri, 06 Jan 2023 08:25:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=FAdRo3A0; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231191AbjAFQVd (ORCPT + 66 others); Fri, 6 Jan 2023 11:21:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229498AbjAFQVb (ORCPT ); Fri, 6 Jan 2023 11:21:31 -0500 Received: from mail-vs1-xe2f.google.com (mail-vs1-xe2f.google.com [IPv6:2607:f8b0:4864:20::e2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1719A7622E; Fri, 6 Jan 2023 08:21:30 -0800 (PST) Received: by mail-vs1-xe2f.google.com with SMTP id i188so1915229vsi.8; Fri, 06 Jan 2023 08:21:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=rvoHA51dBPJxu29rUy3n+YN/knXWowFgBFUnc3YEs8M=; b=FAdRo3A0VAjazJq3nJhVSdkEXJObUUJGwMBwSzNqrSjqbhU8oaGvT+XzotRusmYoCu lxq00qMhKYRWByczvVg+rZibNLuwWv6u2mQJ1uMTZJP/xubGnYFnIT9SY17kHiWgLHMq NpXBcenbxYH81QzOYBhAtBtJuyJumxErMx08cRO7+Tm/vgOKxHeRHHxMOS9r5fSGlIZ3 NRRfBiKWlJl8M2dVH3N1UBTHpHIrudhivsO/STC/Sl8lNIuZ7C4+U0bNLAnUYbreBOcB aAfrBU6xTVqs7XKj3+xlP8qXe8XfCzuqQiEUEd2gSczmAdDcqSA7I5qDjU8b0W+VwkPD 8IUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=rvoHA51dBPJxu29rUy3n+YN/knXWowFgBFUnc3YEs8M=; b=Cc6A1r5tHdJU1X27sGJKj7OjGnT3bCnTWkCXh+BTa99nOKawzHDvfqq/YbIJOvgE5x rfKuLol6tWKRHKdp4kerwoPAFxk8YxlmaZL/NbmSIAPEf02Jt/cnby1NLIAB6TUNWPfV E0neNul2mtwroGE9hXj6NbjC5toPnTngiPryecKmkJEcoYIJHXicZvYFX7AYEcZ7i3b4 ihpkDajKD/R6XjjopKGyANFH96CxYLd/OeB3IMgSRNZtpDXLy1yxu1kDiiRgaP1Irfe6 iYeKisblOHt5TBCRfT9NrV8GnCc/iI0ssOEnB727ZbN38LW6wJ6Rffh3MqGncdvG49oc GeLA== X-Gm-Message-State: AFqh2koIv5BosIjuD/xP1uJNBpiZXzU8P2UB16q9oDjFboUh/56FI8AX uTFcX0uMYH2742F2+H5bnwY= X-Received: by 2002:a05:6102:1626:b0:3ce:c261:e8e with SMTP id cu38-20020a056102162600b003cec2610e8emr4716733vsb.17.1673022089152; Fri, 06 Jan 2023 08:21:29 -0800 (PST) Received: from [192.168.178.136] (f215227.upc-f.chello.nl. [80.56.215.227]) by smtp.gmail.com with ESMTPSA id w22-20020a05620a425600b006cbc00db595sm747029qko.23.2023.01.06.08.21.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 06 Jan 2023 08:21:28 -0800 (PST) Message-ID: <0b277149-867b-8acf-30d8-2cd68ba24c99@gmail.com> Date: Fri, 6 Jan 2023 17:21:24 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH v2] brcmfmac: Prefer DT board type over DMI board type Content-Language: en-US To: "Ivan T. Ivanov" , marcan@marcan.st Cc: franky.lin@broadcom.com, hante.meuleman@broadcom.com, rmk+kernel@armlinux.org.uk, stefan.wahren@i2se.com, pbrobinson@gmail.com, jforbes@fedoraproject.org, kvalo@kernel.org, davem@davemloft.net, devicetree@vger.kernel.org, edumazet@google.com, krzysztof.kozlowski+dt@linaro.org, kuba@kernel.org, pabeni@redhat.com, robh+dt@kernel.org, linux-arm-kernel@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, SHA-cyfmac-dev-list@infineon.com, stable@vger.kernel.org References: <20230106131905.81854-1-iivanov@suse.de> From: Arend Van Spriel In-Reply-To: <20230106131905.81854-1-iivanov@suse.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 1/6/2023 2:19 PM, Ivan T. Ivanov wrote: > The introduction of support for Apple board types inadvertently changed > the precedence order, causing hybrid SMBIOS+DT platforms to look up the > firmware using the DMI information instead of the device tree compatible > to generate the board type. Revert back to the old behavior, > as affected platforms use firmwares named after the DT compatible. > > Fixes: 7682de8b3351 ("wifi: brcmfmac: of: Fetch Apple properties") > > [1] https://bugzilla.opensuse.org/show_bug.cgi?id=1206697#c13 > > Cc: stable@vger.kernel.org > Signed-off-by: Ivan T. Ivanov Looks good to me. I do have a question about the devicetree node for brcmfmac. The driver does a compatible check against "brcm,bcm4329-fmac". I actually expect all devicetree specifications to use this. That said I noticed the check for it in brcmf_of_probe() should be moved so it is the first check done. Reviewed-by: Arend van Spriel > Reviewed-by: Hector Martin > --- > Changes since v1 > Rewrite commit message according feedback. > https://lore.kernel.org/all/20230106072746.29516-1-iivanov@suse.de/ > > drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c > index a83699de01ec..fdd0c9abc1a1 100644 > --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c > +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c > @@ -79,7 +79,8 @@ void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type, > /* 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, "brcm,board-type", &prop)) > + err = of_property_read_string(np, "brcm,board-type", &prop); > + if (!err) > settings->board_type = prop; > > if (!of_property_read_string(np, "apple,antenna-sku", &prop)) > @@ -87,7 +88,7 @@ void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type, > > /* Set board-type to the first string of the machine compatible prop */ > root = of_find_node_by_path("/"); > - if (root && !settings->board_type) { > + if (root && err) { > char *board_type; > const char *tmp; >