Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp2096644rwl; Fri, 6 Jan 2023 01:41:39 -0800 (PST) X-Google-Smtp-Source: AMrXdXst2NPqEUCnaegTE7EOosjbI9ynNTIiazbyR2QbQce4+Ad1hZBAfwC7/ZS8pJYjvKf5r9Rv X-Received: by 2002:a05:6a20:9497:b0:a4:486c:568f with SMTP id hs23-20020a056a20949700b000a4486c568fmr53988158pzb.59.1672998099147; Fri, 06 Jan 2023 01:41:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672998099; cv=none; d=google.com; s=arc-20160816; b=eXFXplnr65hVDaOIJ8thTIfiNOFwQHhtlFPwdqnx5yWMaqZ+cxDMweoKS8x3RHIQee 4+iIeVmFMzIOS8DyBM8ezeseKKOMvNyX2ebG8nMxLe0eZY7lchC3AZjn+b2pZpo/aLdV JbQ7Vrh6JrxTgpK8iZb+cbuh+4vaMn7OrVwDbn37YyEZDf6ehsOHjEMrO/IRuUj7pvUO 1+n/dgVgSVCbEZRjET/AVn8JOd8TdS9FQRLKXNufm9qyxWkY8VrEOkyFtyT753W10Gwj fdxWUp5eTMjOwj2rLv+83zMYV3bjyrpfHt1v1bFxDqb8LG5BTYuSisnOggiRxjTGywRx cQMw== 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=le9vyQBC2mEBkap3zgtFRMytB/zFBl2cvA4eSucqK6w=; b=M8Wl7F6K3sEzDdv9hCAFyvGvuvznS2ZQvJSWmiXy/tUcr/lQR/dAbyFIFTzZbE7j7e XBjn/lTj++z7F4Gi5+7S/A5osnGWWMqCyS6AxdBrLD9fxukKbfDOzvwfdftqpKNGFrCz 6uKQXTnwzyPpf1sSFIysDARjwlhtYSEoMzAjRhy8R82o3BYuomqBUgTvpzN1t2bRgwQp WzFt9Y+RUJErMKSeLwR4lfuhRAjv7HAZ7XLKBRGmV7LzF3m7/noyJxbNBZJ8ig/TPIXQ qHNr2KTLnAWpkA20EYrvDBr++BLhOPqfsYVQYrDFu1u1iJiOrpyrMB1UXajW64y78tdc 95/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marcan.st header.s=default header.b=ndaDkCSo; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=marcan.st Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h63-20020a638342000000b0046eed3142cesi1021548pge.350.2023.01.06.01.41.26; Fri, 06 Jan 2023 01:41:39 -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=@marcan.st header.s=default header.b=ndaDkCSo; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=marcan.st Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232042AbjAFJg2 (ORCPT + 66 others); Fri, 6 Jan 2023 04:36:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234303AbjAFJfp (ORCPT ); Fri, 6 Jan 2023 04:35:45 -0500 Received: from mail.marcansoft.com (marcansoft.com [212.63.210.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AEF8477D10; Fri, 6 Jan 2023 01:27:44 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: marcan@marcan.st) by mail.marcansoft.com (Postfix) with ESMTPSA id C6FB542165; Fri, 6 Jan 2023 09:27:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=marcan.st; s=default; t=1672997262; bh=pqxtamDoWidS7O09w7HZAMcUH3w/MyHbr77vLOidp7c=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=ndaDkCSoEI92lNXnG1YNs5b8oVjNVGvjl+Mr2Hc7C3fMM3GOx5s7fW5/CtiHV1fil ND4cScruX7TWwbiOv2Smrp8JLArJIXQpVzeJ7kJxnfFrtRc/vOOo9oC3WlUf2k9E4r BGD+KqMAamhVW8Uvd83rFubB9Fh1TbdHbKWNWo51FfKe+h13dmto1CIm+xxBvjSg5m +WgVXXCcM41YfUHD91Ws7QU6UvPFKUGqBMj2F4yIKhhf5VcFd9owLqNnI2VnnjxXnJ BKX0V1NAfmV6RuukcT4eU33YfSoquItPhRp9lz8vzafh6EniMgC5Ofwgn2C9NiM07y dvaqcnDYBw8aQ== Message-ID: Date: Fri, 6 Jan 2023 18:27:35 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH] brcmfmac: of: Use board compatible string for board type Content-Language: en-US To: "Ivan T. Ivanov" , aspriel@gmail.com Cc: franky.lin@broadcom.com, hante.meuleman@broadcom.com, rmk+kernel@armlinux.org.uk, 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 References: <20230106072746.29516-1-iivanov@suse.de> From: Hector Martin In-Reply-To: <20230106072746.29516-1-iivanov@suse.de> Content-Type: text/plain; charset=UTF-8 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,NICE_REPLY_A,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 2023/01/06 16:27, Ivan T. Ivanov wrote: > When "brcm,board-type" is not explicitly set in devicetree > fallback to board compatible string for board type. > > Some of the existing devices rely on the most compatible device > string to find best firmware files, including Raspberry PI's[1]. > > Fixes: 7682de8b3351 ("wifi: brcmfmac: of: Fetch Apple properties") > > [1] https://bugzilla.opensuse.org/show_bug.cgi?id=1206697#c13 > > Signed-off-by: Ivan T. Ivanov The existing code already falls back to the compatible string, *as long as there is no board_type set already*. As far as I can tell, the only way the board_type can get another value first is if it comes from DMI. This behavior was inadvertently changed by commit 7682de8b3351 (since I was not expecting platforms to have *both* DT and DMI information). I'm guessing the Raspberry Pi is one such platform, and `/sys/devices/virtual/dmi` exists? Hybrid UEFI+ACPI+DT platform I take it? If so, your commit description should probably be something like: === brcmfmac: Prefer DT board type over DMI board type The introduction of support for Apple board types inadvertently changed the precedence order, causing hybrid ACPI+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") === An also add a Cc: stable@vger.kernel.org to make sure this gets backported. With the fixed description, Reviewed-by: Hector Martin - Hector