Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp2781138pxt; Mon, 9 Aug 2021 08:46:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxR7eeScHxAy37PUTgYmVR8g/9wzBAHbZ40nClBVWQ+mhTjoq6qHfVVz57WOul50MUOpQgl X-Received: by 2002:a05:6402:3496:: with SMTP id v22mr20332966edc.223.1628523971348; Mon, 09 Aug 2021 08:46:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628523971; cv=none; d=google.com; s=arc-20160816; b=pJEv9lvaWeiV13nz3wRrhptPIKmYdlWGXpm1BtIx0xW84/15aBm7KHVpbb/iU972Fp dubs1txv9qMNnd43oqaqmc4DQXG1dUn662ZT+fphyeyrXs7lEY8zSHBf8wLUMWlDSzaT yC2Xfutko/wwSoDDRZWIzW+MvGJRvz6h8/zILqr0g6gKbWrOk/7wNHcVr3PgsxHIcuyG bGP9kTZW5bbbRofzeiep6KSNrqR8KYvBX5Cv4jDvXdSro2H+jjKC8/uwvlTPePHBQ+BF l8V2/t2Up3Hto1nFT5WI/dpvdYdZcGHBAx/S9setgnXkXT7AzFdKXbZc7TTvaSNOy3U0 +AUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version:subject :user-agent:references:in-reply-to:message-id:date:cc:to:from :dkim-signature; bh=0zXAtQHdd07V35NiTn2+J5ezXJkaTtSBp+so832S6p0=; b=Nh4vH1iXsuGOAvYhkNiyZAtqKq5wfLYmet1cvzCCY9wt0ld4szadhuIm9H+boejqdj peMYuN1sJZvb9y7TQvui3o0fA7qFcqUKwn6HB+QpMsTh1bLli1rJEoZE9fwwORZFOKs4 tkqdnevhbJJPeCyOtzlRhgNnPuJhpcnlS+cowdG673IZfBQJy8prBha2TPFDdYJ2Jtw6 5o+l3GLVKOMyHQdK9tYnGn70PbLaOOCoQoMm/yJl123hGn9ZYZ6NjJuUeqkX/bxpwwSG rTKxcYy/mhDrDaXvb8VWa+QX4A3p8SNRNN3emzDi2+lNN4RzPHofBKa4JPJoYOJlNYyK CONg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=H++kCQmC; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ci1si1192981ejc.747.2021.08.09.08.45.42; Mon, 09 Aug 2021 08:46:11 -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=@gmail.com header.s=20161025 header.b=H++kCQmC; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232655AbhHIPm4 (ORCPT + 99 others); Mon, 9 Aug 2021 11:42:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230095AbhHIPmz (ORCPT ); Mon, 9 Aug 2021 11:42:55 -0400 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9BC4C0613D3 for ; Mon, 9 Aug 2021 08:42:34 -0700 (PDT) Received: by mail-ed1-x533.google.com with SMTP id g21so25310928edb.4 for ; Mon, 09 Aug 2021 08:42:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:date:message-id:in-reply-to:references:user-agent :subject:mime-version:content-transfer-encoding; bh=0zXAtQHdd07V35NiTn2+J5ezXJkaTtSBp+so832S6p0=; b=H++kCQmCz5iCHApjx0MUKVgncY5x9Zr8UL0BwzM6FK5eRVNlNLRkOmVAgRmKa6hVkl fZfo1KqLrXh/8PAQWJ32vBEpcTfgjJqSgh6U0qR+NbqVOt1rF5Y8W8JQ28f/b54vLEYy xYNKp6I18qT6eevA+dUuEe14R51c+iIPup7HF0Y9yBdXDtJsbB/Xspn2ByQM5FKBuoTq Fy1nsNzlHaIPaiLsq6PPmAL0rzs1yQlhXMfdaw13w5IMYB/886P3rK4OXn9APh9WIBb9 dVqGPCCFKYzQCUPkMHDh/T7AMyK6ambNSG5L05VTQo5VE72GAtWMYGWSEWreVoQ+GkwZ Ny8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:date:message-id:in-reply-to :references:user-agent:subject:mime-version :content-transfer-encoding; bh=0zXAtQHdd07V35NiTn2+J5ezXJkaTtSBp+so832S6p0=; b=PAorswwjTD3KxN9KyZv9daWYRqOWwwDOT60gl8TDCrDaXTXb+fYKEGsUll2ieiCkVK q6/OrXtvkseGoJ6WFFHOSJxdZ+cm1XK9/5yJPZWNQ5GYHnja+zaBUsWweFz9GglTVZKl q4Gtxw8kEyojO8n6+Ys11ZnfxRs2Kf0JRbWZZrEvjJnLhEAfnnJesEWFBi98YwmZEFdX dYGIevNZCk9HwQjDPgt6sCiZgmHFDLe7X8PdK/gtA/0oErugWZ1118CiuyAPEgfw3Ke4 VKzqHQ5IEpbZK06/SwDul9AyPfcPNnG4p1C1qQ9v7cQtTw9rpp/R6bQvI0R7oHqLgJBJ 1i7w== X-Gm-Message-State: AOAM533LyIim0XgnaBeNBOR26kExtwsLsoeSGWc7LRUbhO1dX2RwKARi ZVNWR64xOX9cYtpXXg3lSi4= X-Received: by 2002:a05:6402:c1b:: with SMTP id co27mr30626089edb.147.1628523753386; Mon, 09 Aug 2021 08:42:33 -0700 (PDT) Received: from [192.168.178.38] (f140230.upc-f.chello.nl. [80.56.140.230]) by smtp.gmail.com with ESMTPSA id g9sm8328125edl.52.2021.08.09.08.42.30 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Aug 2021 08:42:30 -0700 (PDT) From: Arend van Spriel To: Dmitry Osipenko , Arend van Spriel , Franky Lin , Hante Meuleman , "Chi-hsien Lin" , Wright Feng , "Chung-hsien Hsu" , Kalle Valo , Linus Walleij CC: , Stefan Hansson Date: Mon, 09 Aug 2021 17:42:29 +0200 Message-ID: <17b2b945e88.279b.9696ff82abe5fb6502268bdc3b0467d4@gmail.com> In-Reply-To: <36277b51-b647-898c-c1b4-a0e363c52b0d@gmail.com> References: <20210808180510.8753-1-digetx@gmail.com> <902984be-2c27-e6b0-247b-8d9a94c08cc4@broadcom.com> <36277b51-b647-898c-c1b4-a0e363c52b0d@gmail.com> User-Agent: AquaMail/1.30.1-1828 (build: 103001000) Subject: Re: [PATCH v5] brcmfmac: firmware: Fix firmware loading MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="UTF-8" Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On August 9, 2021 4:56:46 PM Dmitry Osipenko wrote: > 09.08.2021 11:23, Arend van Spriel пишет: >> 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. > > Thanks, indeed it could be improved further later on. > >> 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. > > It's independent minor problem that can't be easily reproduced in > practice and seems it existed for a long time. It's not fixed by this patch. Ok. I understand the issue and I have a fix lined up for it. I noticed my reviewed-by tag got lost between V2 and latest version. Feel free to add it back. Regards, Arend