Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp2260793rwl; Fri, 6 Jan 2023 04:14:27 -0800 (PST) X-Google-Smtp-Source: AMrXdXtn4d5+fPqJvl8PQfYUdnj/xMUqIRcwCSrDekAbIXOYynCXkmh4L+Ezh8LziAQB8ee0ZqVw X-Received: by 2002:a62:e510:0:b0:582:5b8d:52be with SMTP id n16-20020a62e510000000b005825b8d52bemr20800434pff.8.1673007267056; Fri, 06 Jan 2023 04:14:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673007267; cv=none; d=google.com; s=arc-20160816; b=Wr/uAlC8ZO3C0bK1M9oe1Wk56Ny7t/Y1kxgPqW93EnVZq0lV1Bi8J0rFO76Oj0fuC1 pR2ls355n+E49PBrbpmqbLe+hfCxObJ6lW8iMulh2GpDGBYIJmxto5W6AF02BGe/2FQv gC/p0ysyZN1KXe98Xp1CIho0fu7QGtT1ZFx3N+nUuJ7w0/AdJeH9XtOkMZwDSUx/FrAc rc7q4AHTsXatWHyo33RVNn4N/00/+/+y6Xf2xnYGYK+mLEJnODVmrwYQpYyb3zV3z7+D k+mq5ecRElvo9BdWaAgRf1xE5XjfW0CJry385s82jWbBnQQw9I4sw7xf+7EsLIz+3mYg qcYQ== 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:references :cc:to:from:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=wGku1N4UU19FZJHS/kTy3hafaLV0kLdNagOmxXyQvhU=; b=lfL3XkDTD98KdPn3zfalKaT3IlXWCDaAz7GLw5fw8e+3EzvZNlk1krm35CqckuAuzz K3KgmdETAkT8VjzFLLNO/EN42zQ/9yZv40cNxL19NCr8QOsAugofHYNuq4knLdS+mPUL UR/hQJ+xndd35EqfN4Eo4DYQCl1GX6JKbNtZ8kbK88tAE2KvhgLQOa/8VTyp+V0/v1dK e97s87NJGp0WhJJnFlbt0KgzFdNMVm2pGiRLWDei2u3PNlAJ5hIINHCACL6uyt9V+eF/ 20V3vNjh90e2qSfBNAQslZz8YcVhwaW3vCea9cJKfuJhtLz6wen00dFoc+SkXQbOV+S1 2eYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marcan.st header.s=default header.b=y7oeNNeE; 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 q21-20020a056a00085500b00565ba4c501asi1330521pfk.276.2023.01.06.04.14.18; Fri, 06 Jan 2023 04:14:27 -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=y7oeNNeE; 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 S230501AbjAFMNp (ORCPT + 66 others); Fri, 6 Jan 2023 07:13:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229676AbjAFMNn (ORCPT ); Fri, 6 Jan 2023 07:13:43 -0500 Received: from mail.marcansoft.com (marcansoft.com [212.63.210.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2F553E853; Fri, 6 Jan 2023 04:13:41 -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 D1820425C6; Fri, 6 Jan 2023 12:13:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=marcan.st; s=default; t=1673007219; bh=ffTqLBgC6Oc9QYx+/49/fsiTf1EZpYb2tADAI8jUA30=; h=Date:Subject:From:To:Cc:References:In-Reply-To; b=y7oeNNeEEuPSzkjmIRnkQmDbxuTq+bp1qa/Tizo6eqU28HCmuqvLeECXWRu1DGBNt /tmo2EKfezQpmGnCOmgOuzrh/uhsUs6t3rTZULUiHDcs4gJMZ8KCRg5amJhRDkStQ/ s17ZeRXhOD/AzADNBEGr3CbJ0mzMmnCFgDmRdrSQhkaZoQmnQSUZd1CXH6WKAYzZ4x 1nyrqICv8AhGSLhLM5P8LTf2sB08SQJdNIT4XOmOIt1o3eIJIgl8x7SF3E0IGYDE+n 2cCzVJ3LdSpCAUzkhTMTT33nc1fnoU6wCqwCxo41JEE0o1uyjHd8Mk62KDZ+lTjYkF HlTccZjfrjPog== Message-ID: <2711b084-5937-7e0f-26d8-67510da3939c@marcan.st> Date: Fri, 6 Jan 2023 21:13:32 +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 From: Hector Martin 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> In-Reply-To: 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 18:27, Hector Martin wrote: > 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 Looking into this a bit more from what was mentioned in the linked bug, the DMI data comes from the SMBIOS table. We don't have that on Apple platforms even though we also boot via U-Boot+EFI, but I'm guessing you build U-Boot with CONFIG_GENERATE_SMBIOS_TABLE and provide that stuff in the DT? So s/ACPI/SMBIOS/ would be more accurate in the commit message. - Hector