Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp2529pxt; Wed, 4 Aug 2021 04:33:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxPYF7NMgOj8qe1oxbbP0/sr9n5O8ksFDlijwqOL0kePMr+XJOgQjvu30tTVGdEJ7aWTq9V X-Received: by 2002:a05:6602:1790:: with SMTP id y16mr35972iox.12.1628076828930; Wed, 04 Aug 2021 04:33:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628076828; cv=none; d=google.com; s=arc-20160816; b=Xe+nXbvQWEckPA7mnke/gmecHBbvz/o1H4dRm1Z4ctitLHBJWbwiy/Yfui6ZsyT+D3 K1yUHtHbpAmwfDNPw2Y7didvmbW37pdS7IsjxE5RSj1tokJH+tL+/P9v8EM4jwhnK4D1 gZ9Y+97rO+12U22kXkOWqewdHCG30fqP76hbAzDk6hOUgMoNNOXbc8M4dJsYjVz+uIoy eqtr/OBscUo4Pzti3qA7ISGfIFzKIA9Kn3lcBGPloUmMhFplk9tYdDwxGAmiokJCmVEm DxTcIgHE1VRwjNGZ3jPSFE54kFSw43OAcLWC/pYYTde/xDN8unXLuq/zNmv3wGEWmVzU 1/JQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:references:cc :to:subject:from:dkim-signature:dkim-filter; bh=Gj/nmGdqNsB7EBVWCisXVY0jU8VToWR5gH5/L8cNT0Q=; b=UIkzCc5F3NqWDeCzTP9jOecw6lxbkKjFaO61CUL49jlYP2jpmXxIXluyOuQPZsq4QK NJjLRJNdVEDkBzZD+/IDPQtA/j7QxUgLca/pPuShcsRanQtkeysbEuv/wYpv3P4NmGC/ 7NKFyTlrha1pKe8ni/WlEPgBjtrVjRVtpj6zoO54h0m3k5eQwrK2UinhHfM7TOGQY6ii FPB2BA8RTHJsoH7c5XKIAnc+5nI5h/NQ+kngVh/7SP7Y5tANdpgpnXstgMIloXaLeDcY YtJaMeGfuRYusOt6weLAjLa7KzCEVmyChB/LC9X2gEWgoJSW6+xuOA+elACo4b1JlS6h YMNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=dkimrelay header.b=SvvXF49I; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y13si2267991ilu.34.2021.08.04.04.33.32; Wed, 04 Aug 2021 04:33:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=dkimrelay header.b=SvvXF49I; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236990AbhHDLcr (ORCPT + 99 others); Wed, 4 Aug 2021 07:32:47 -0400 Received: from lpdvsmtp10.broadcom.com ([192.19.11.229]:56564 "EHLO relay.smtp-ext.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232885AbhHDLcq (ORCPT ); Wed, 4 Aug 2021 07:32:46 -0400 Received: from bld-lvn-bcawlan-34.lvn.broadcom.net (bld-lvn-bcawlan-34.lvn.broadcom.net [10.75.138.137]) by relay.smtp-ext.broadcom.com (Postfix) with ESMTP id EA1B62E22D; Wed, 4 Aug 2021 04:32:32 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com EA1B62E22D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1628076753; bh=zk83iXNpbo+buzqPU3gpG1XVe6m+R78f04CnZJVATXE=; h=From:Subject:To:Cc:References:Date:In-Reply-To:From; b=SvvXF49IF2S3RjhuNg7T1s4JgIxbiQKstYZtxzaaHqBvGxVNC3JU9b5sMD/Ufvyg3 eMU2bxEDjHWxi1mvqs1E8pKcK6DemcU1pZ/GcbHTTWlVYs6et+HNt2kHVwwcNjOWl0 r2ii+pUSJWr5I90hCXFAPM79eGv8n8LG7Y52IkUE= Received: from [10.230.42.155] (unknown [10.230.42.155]) by bld-lvn-bcawlan-34.lvn.broadcom.net (Postfix) with ESMTPSA id AEFEE1874BD; Wed, 4 Aug 2021 04:32:28 -0700 (PDT) From: Arend van Spriel Subject: Re: [PATCH] brcmfmac: firmware: Allow per-board firmware binaries To: Linus Walleij Cc: Dmitry Osipenko , Arend van Spriel , Franky Lin , Hante Meuleman , Chi-hsien Lin , Wright Feng , Chung-hsien Hsu , linux-wireless , Kalle Valo , phone-devel@vger.kernel.org, newbyte@disroot.org, Stephan Gerhold References: <20210711231659.255479-1-linus.walleij@linaro.org> <02415358-6635-a974-7682-a721912ca4fc@gmail.com> Message-ID: Date: Wed, 4 Aug 2021 13:32:20 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 04-08-2021 11:35, Linus Walleij wrote: > On Wed, Aug 4, 2021 at 10:48 AM Arend van Spriel > wrote: > >> Right. I didn't get to looking at this earlier, but indeed the check >> whether the requested firmware exists is done in another thread context >> so the return value here only indicates whether the firmware request >> could be scheduled or not. > > I think my recent patch fixes is, please have a look. Right. I want to explore another option for myself, but I will first look at your patch so we can fix the current issue in timely manner. >> My first reaction to the patch was to reject it, but leaning towards >> supporting this now. OEMs tend to get tailor-made firmware in terms of >> features. Depending on their requirements they get their mix of firmware >> features. That such difference lead to a crash in 3d engine is somewhat >> surprising. I am curious if we can debug this more and learn how a >> firmware variant could cause such a crash. Maybe some DMA issue? > > I am not certain what happens, but I think the 3D engine misses its > interrupts. This may in turn be because GPIO IRQs are held > low or fireing repeatedly for an extensive period of time, stressing > the system to the point that other important IRQs are missed. > > This in turn can be caused by the wrong (non-custom) firmware > managing these GPIO IRQs fireing left and right. > > I have noticed that the config files for brcmfmac contain words > about GPIOs and so on and that is what makes me think this way. Not sure what config files you refer to. I am only aware of the device tree bindings mentioning GPIO for out-of-band SDIO interrupt. > I can tell for sure that brcmfmac has definately had special > firmware tailored by/for Samsung for these phones. We can just > look at the files extracted from the platforms (the original > files are named bcmdhd_sta.bin_b2 or similar): > > BRCMFMAC 4330 > -rw-r--r--. 1 linus linus 213390 Mar 22 23:32 > brcmfmac4330-sdio.samsung,janice.bin > -rw-r--r--. 1 linus linus 203593 Jul 11 01:53 > brcmfmac4330-sdio.samsung,codina.bin > -rw-r--r--. 1 linus linus 212956 Mar 22 23:31 > brcmfmac4330-sdio.samsung,gavini.bin > > BRCMFMAC 4334 > -rw-r--r--. 1 linus linus 346151 Mar 16 22:53 > brcmfmac4334-sdio.samsung,golden.bin > -rw-r--r--. 1 linus linus 434236 Jul 7 00:43 brcmfmac4334-sdio.samsung,kyle.bin > -rw-r--r--. 1 linus linus 434236 Mar 16 22:54 > brcmfmac4334-sdio.samsung,skomer.bin > > All different file sizes, except Kyle and Skomer, who actually share > the same firmware. (Those were the two last phones produced > in this series BTW.) Doing strings * on each file reveals that they > were compiled at different dates around the time these phones > were produced. As said earlier customers get their mix of firmware features. Apart from the compile date using strings will also give you the firmware compile target, ie. 4330*-roml/... Could you share that? > These are all for standard WiFi functionality. There is two more > firmwares for each phone, one for the access point usecase and > one more which I don't know what it is for, the actual set of firmware > for each phone is for example (Skomer): > > bcmdhd_apsta.bin_b2 > bcmdhd_mfg.bin_b2 > bcmdhd_p2p.bin_b2 > bcmdhd_sta.bin_b2 > > So I am half-guessing that bcmdhd_sta.bin_b2 is obviously for the > ordinary use case, *mfg* is probably for manufacturing, *apsta* > for mobile hotspot (access point) and *p2p* for some other cool Half-guessing seems sufficient ;-) If I recall correctly on Android the driver loads different firmware based on what a user selects in the gui. Not something we do in upstream linux. p2p is a WFA specification and supported in upstream linux cfg80211. Many TV sets support it to show content from your portable device. Regards, Arend