Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp2482254pxt; Mon, 9 Aug 2021 01:25:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQtJ4B1Lc8+UZQlW6y2QpAEBi2718fKhT09Dy/5oPE84gm33IGdrpj9a4GO5Ziwqs28hUu X-Received: by 2002:a17:906:3019:: with SMTP id 25mr21454869ejz.91.1628497514488; Mon, 09 Aug 2021 01:25:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628497514; cv=none; d=google.com; s=arc-20160816; b=PNR5T8DukWtKPE+Exvm5PnauClfCOUb9ZO9GmVU/FJQ8y5ZPZkS8g3n6QTCm7bBCxM Y1BbPhsNFLuorMbyfK7oAcFg4zG4qEdmKaOvPPzRKF4I0U6o4pXhTjjp4dZHHi4fp01R vZICwmgzC6cVRLBnyaH5RNotc2PiPhuHlyYBf5LOAJ3Tpiv4M7Rb7+nW0s7fPXjkp1tU 53bUw/yRMtElJYr4KzIseCYa3ldi8ln++WiEuVr+eB2PEHxS4fLQCQgL9GnTsrRbAxdL RIYUndDLHTx6lz8ASMH9J+UKPznjR+Q1IzlzQm9Ze2S4NWxmNQrfVPPyNsagqXa15vSt Zj2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=lmWT97CDa6Eep/ahzK3DFdzOqVC7jVfNxph1wNjMACo=; b=G3R/hZIrgW0rbQbuDAG50jM5iI7ieaZuJRF+F3kpLJPJQtQKuZpNpM/zkobYmEecXs 8C42wAtD7WQ7aMWHe261a91OI2HzzblcnjLZMEPukRo8xd2V5qlESXMZylXL+Yd5FbtG dx8mngonX2aHKUmuopapZOg9SaqKZwKkKn/aoiKQROH4k5dYu+8Ifshbw3DI0N0OW9c+ 7qyXtbbEqHJSa4zzhCfGoOEv0IgC40mRMH1Di6lfrk/aP9jUI/5GM21xs0QFfYNuPG/z QnlqDtWrMhySvHmLujhjp0uCCouTG8VUXSClY9NrcOy88ax9OVYzM+TqkPmRLoXp2Y4b 8oMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=GOJN9opg; 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 o1si15675137eji.88.2021.08.09.01.24.43; Mon, 09 Aug 2021 01:25:14 -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=google header.b=GOJN9opg; 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 S233930AbhHIIYQ (ORCPT + 99 others); Mon, 9 Aug 2021 04:24:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233857AbhHIIYP (ORCPT ); Mon, 9 Aug 2021 04:24:15 -0400 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D44CC0613CF for ; Mon, 9 Aug 2021 01:23:55 -0700 (PDT) Received: by mail-ej1-x631.google.com with SMTP id u3so27551528ejz.1 for ; Mon, 09 Aug 2021 01:23:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to; bh=lmWT97CDa6Eep/ahzK3DFdzOqVC7jVfNxph1wNjMACo=; b=GOJN9opge1KjrfRO93ifEF7jpaAUoA2aKf2IzIZRlQRVCLwvqjMRns5reiXuqpwYDf u4HQnJwBTZtNO1mMOAgw/Au58Ms3Dc+bSQ5QBOKViPsYQabWExqQoM9w6rX/FhK5puC7 EUjmN/CThs0KCXKfwAVrf+glkeBwHiDuJPnJg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to; bh=lmWT97CDa6Eep/ahzK3DFdzOqVC7jVfNxph1wNjMACo=; b=eXuXoqNtGdXmgJxUSjqt9d4A0m5FWQO6CMOF+JxB3403nULxCrqre1X6CUQOm1j0VV qW1D/ymnrvKJADbmSIRE8PeRdFpy1olDeHm83jFnptBck7p5LKclaLfa/sO22nBV1Qhq 0Fn9JvmkeY+nx6LlY04wR/CtFTH2nwzJwZRsUpYVNfHWPmgcsN1cB0aSHoHXvNNi8rbL Vr7/agxv5Ia5N1e6B+dagtDRrr9kNECFhVM9uA1wUIAr5nMuT51rBzs4fRzLdO4bCvoq sqV6W3zbOvwG3MCBMfWdlzeZMUsr9p/qKhVzN8hKe0nZfoSI7Mimfk5KnrBbkqSevwUl drMw== X-Gm-Message-State: AOAM531bm24Y1ybpjAOdQtoBiZbgGzBmDG0M11gCqAE0r15gCR1Iau/d Go/gt7f1Ic2zIyeflptt7Igv8oL1vjsTLX6sW+l+B535LLuX5EbaX1jpVs7RGbmh1HttqXJadNp PAOaT2SJPYpy51xFhIrlVMMEkkw== X-Received: by 2002:a17:906:1bf2:: with SMTP id t18mr4359882ejg.314.1628497434108; Mon, 09 Aug 2021 01:23:54 -0700 (PDT) Received: from [192.168.178.136] (f140230.upc-f.chello.nl. [80.56.140.230]) by smtp.gmail.com with ESMTPSA id br3sm5647408ejb.103.2021.08.09.01.23.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 09 Aug 2021 01:23:53 -0700 (PDT) Subject: Re: [PATCH v5] brcmfmac: firmware: Fix firmware loading To: Dmitry Osipenko , Arend van Spriel , Franky Lin , Hante Meuleman , Chi-hsien Lin , Wright Feng , Chung-hsien Hsu , Kalle Valo , Linus Walleij Cc: linux-wireless@vger.kernel.org, Stefan Hansson References: <20210808180510.8753-1-digetx@gmail.com> From: Arend van Spriel Message-ID: <902984be-2c27-e6b0-247b-8d9a94c08cc4@broadcom.com> Date: Mon, 9 Aug 2021 10:23:51 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <20210808180510.8753-1-digetx@gmail.com> Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="000000000000175bb305c91c1b6b" Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org --000000000000175bb305c91c1b6b Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Language: en-US On 8/8/2021 8:05 PM, Dmitry Osipenko wrote: > From: Linus Walleij > > The patch that would first try the board-specific firmware > had a bug because the fallback would not be called: the > asynchronous interface is used meaning request_firmware_nowait() > returns 0 immediately. > > Harden the firmware loading like this: > > - If we cannot build an alt_path (like if no board_type is > specified) just request the first firmware without any > suffix, like in the past. > > - If the lookup of a board specific firmware fails, we get > a NULL fw in the async callback, so just try again without > the alt_path from a dedicated brcm_fw_request_done_alt_path > callback. > > - Drop the unnecessary prototype of brcm_fw_request_done. > > - Added MODULE_FIRMWARE match for per-board SDIO bins, making > userspace tools to pull all the relevant firmware files. The original idea was to setup the path names in brcmf_fw_alloc_request() function, but with the introduction of the board_type for NVRAM files that was abandoned and we cook up alternative paths. Now similar is done for the firmware files. So I would want to rework the code, but for now I am going with Linus's/Your fix for the sake of having the regression more or less quickly resolved. You reported an issue earlier where the firmware callback was called from the probe context causing it to hang and it is not clear to me whether that is fixed with this version of the patch. Regards, Arend -- This electronic communication and the information and any files transmitted with it, or attached to it, are confidential and are intended solely for the use of the individual or entity to whom it is addressed and may contain information that is confidential, legally privileged, protected by privacy laws, or otherwise restricted from disclosure to anyone else. If you are not the intended recipient or the person responsible for delivering the e-mail to the intended recipient, you are hereby notified that any use, copying, distributing, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited. If you received this e-mail in error, please return the e-mail to the sender, delete it from your computer, and destroy any printed copy of it. --000000000000175bb305c91c1b6b Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIIQdwYJKoZIhvcNAQcCoIIQaDCCEGQCAQExDzANBglghkgBZQMEAgEFADALBgkqhkiG9w0BBwGg gg3OMIIFDTCCA/WgAwIBAgIQeEqpED+lv77edQixNJMdADANBgkqhkiG9w0BAQsFADBMMSAwHgYD VQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UE AxMKR2xvYmFsU2lnbjAeFw0yMDA5MTYwMDAwMDBaFw0yODA5MTYwMDAwMDBaMFsxCzAJBgNVBAYT AkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMTEwLwYDVQQDEyhHbG9iYWxTaWduIEdDQyBS MyBQZXJzb25hbFNpZ24gMiBDQSAyMDIwMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA vbCmXCcsbZ/a0fRIQMBxp4gJnnyeneFYpEtNydrZZ+GeKSMdHiDgXD1UnRSIudKo+moQ6YlCOu4t rVWO/EiXfYnK7zeop26ry1RpKtogB7/O115zultAz64ydQYLe+a1e/czkALg3sgTcOOcFZTXk38e aqsXsipoX1vsNurqPtnC27TWsA7pk4uKXscFjkeUE8JZu9BDKaswZygxB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