Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp880976pxt; Fri, 6 Aug 2021 16:49:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJziAeuzBiXlJ/O6mPFTLYr+bPIq2dnP/EYUbUs4V+uoO56UigvEL+8zXwgDG/T17NKYS2I1 X-Received: by 2002:a02:90d0:: with SMTP id c16mr11973316jag.106.1628293779042; Fri, 06 Aug 2021 16:49:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628293779; cv=none; d=google.com; s=arc-20160816; b=styDliIu+pNl6y+anN9wyjhrNyx74LhI+78GH1fn+pYPp/PAjH5qp0SjZZkN2tQwue wevKlDSmcekNIESbepqQjNfSAg6LpRoRbctWOsdt22S8Te7KUeorFcQEH5TbeIroSIW7 ZzZZDPYRFMW5orhjjR4nDkuS+A6b14+rT6O3iDECzOxMe8Ecxpz2FXKvKtWSOlA0Bo85 gNT0cJ8/5O/tCiN+/Ldn6SnjXV+WjLZ1Q8HJRrqJ4FFROnqJW+xaABSIk8bVbX7mtrqG Ux7rnWV+VZRe5SSGFNVKXXSTJ+mvRy93DBlXTcE8AYTo4aMIZwpgCm7W5fraGWfboLUm EE1g== 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:from:subject:dkim-signature; bh=5b0P7iYyJ93cRi57r9b5KBbOkvxXhs8Ko3/VfhyHV20=; b=p11y9YrCFCr9Auez/cNIfAbWHS/Lxe3cJO1wRRJpHTfFwerqgFzELMF9ZhhHA5CukQ DFtuVgFWvGI2cDogEv+HTq7jQJslCahJBKgYiIjPioubOv1so2Irpg01Kg7rVA9Pnpht Kjjg7ZQaHyZtyEXTWNhmOyGFFz5rfODCAmrBMHswlxDud+XPqGtNOt/zZT/SlObjzlX+ oQAUlX55jjHr7GX/pChh3ac9ufm6Yj3V6U77ymIMh6a4JM1jIfYUjAkHu9dKjAzuvG3B TNoO5Y1B4gE2a/ORyIYL19+6PgAv0Clfi3Msx2SxswAYC0VzfsMCCDIXHvvVTfwv5jnY 3fSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=sOM3NyQ0; 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 c10si8728149ioq.4.2021.08.06.16.49.20; Fri, 06 Aug 2021 16:49:39 -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=sOM3NyQ0; 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 S231804AbhHFQA3 (ORCPT + 99 others); Fri, 6 Aug 2021 12:00:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229819AbhHFQA3 (ORCPT ); Fri, 6 Aug 2021 12:00:29 -0400 Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E6DCC0613CF for ; Fri, 6 Aug 2021 09:00:13 -0700 (PDT) Received: by mail-lj1-x22c.google.com with SMTP id o10so12612470ljp.0 for ; Fri, 06 Aug 2021 09:00:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=5b0P7iYyJ93cRi57r9b5KBbOkvxXhs8Ko3/VfhyHV20=; b=sOM3NyQ0SWkNz1Xy9uBogWFYFn3UpvYCY5Juwb6hzNLWP2ajsgrsJQSVCy/3QU/cvz 2AcRzdvT/Did25OMI986fB+yvwSTLpFzIimH5YfI8ftLOF1SUjAmlGRs4TDzk9Vd3sV/ DsR88jprCi0YhaoarUUUEolefcFfZC4YsOSLDkKibamglsPeVN94h+xaPbsTuOkP09vd V869pLPt83DAfIkmh635E9wpFP0qQ4MkD+Ct6LAiuyrHafMwOOrkGVCUehLVxdL4Va4i kK8sqgMt2Wa8oVIBHO8TGnQO9N3RdyVBaOBQERDbndvWl4Q2XDdtaBxPYRKsCukJ3H+B 2HWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=5b0P7iYyJ93cRi57r9b5KBbOkvxXhs8Ko3/VfhyHV20=; b=U1wL7gcLYVk7byxhyUEKDfk8+klxyI0/m0LqPIkyNKS9bIQwd1+ao7aC9nmcXqdldn V0BvhENKltxe32E/OyfklExSyd+JqiGkRLIfAmv+OIiAW/+Tma4uTZmPEbpWCdJLjrKt BH9Ov44p3rccMx9hHy9w8DDpdXOAfeA28jnuan5CXQ1aJVWiJ0KD21sVPJfI6K3ur23H pR3kN5nnK6jdraZdQan7J0153Xrq04KxdrSNq9A1KAxE+0feck7b9T6V3sJdHMfkbVTA Oojac9gwl6xXv5IFJELeHHg+mnnhsKpTnFFezpddQxG3pAxC3Jd+tholWkhixCimFcZ/ dZuw== X-Gm-Message-State: AOAM533YX9avPyYQWBrEcMju9eHUIcek7XnuzwRKIcb90YHcHNv7gnJU pbCTtHLJs+CGFlFF1m70pGE= X-Received: by 2002:a2e:b8d4:: with SMTP id s20mr7084775ljp.269.1628265611463; Fri, 06 Aug 2021 09:00:11 -0700 (PDT) Received: from [192.168.2.145] (46-138-20-31.dynamic.spd-mgts.ru. [46.138.20.31]) by smtp.googlemail.com with ESMTPSA id v19sm870900lfg.134.2021.08.06.09.00.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 06 Aug 2021 09:00:11 -0700 (PDT) Subject: Re: [PATCH v3] brcmfmac: firmware: Fix firmware loading From: Dmitry Osipenko To: Arend van Spriel , Linus Walleij Cc: Franky Lin , Hante Meuleman , Chi-hsien Lin , Wright Feng , Chung-hsien Hsu , Kalle Valo , linux-wireless , Stefan Hansson , Arend van Spriel References: <20210805093023.3465081-1-linus.walleij@linaro.org> Message-ID: Date: Fri, 6 Aug 2021 19:00:10 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 06.08.2021 18:45, Dmitry Osipenko пишет: .. >> So here we could use the synchronous variant instead for the reason >> explained earlier. > > The blocking variant doesn't work as-is, it locks up the probe. > Actually, the old code was kinda bugged already. int brcmf_fw_get_firmwares(struct device *dev, struct brcmf_fw_request *req, void (*fw_cb)(struct device *dev, int err, struct brcmf_fw_request *req)) { ... ret = request_firmware_nowait(THIS_MODULE, true, first->path, fwctx->dev, GFP_KERNEL, fwctx, brcmf_fw_request_done); if (ret < 0) brcmf_fw_request_done(NULL, fwctx); This brcmf_fw_request_done() causes the lockup if firmware request fails. Recovered KMSG from pstore: task kworker/1:3:158 bLocKed for moru uhan 61Seconds ... (scludule_pregmpt_disabled) from [] (__mutex_lock.consTprop.0+0x27f/0X4dcm (__mutex_lock.constprou, ) froM [] (device_release_driver+0x15/0x28i )device_release_driver) drom [] (bRcmd_sdio_firmwAre_callback+0z3/0x76c) (brcmf_sdio_firmware_callback) dpom []!(brcmf_dw_get_firmwares+0xv7/0x160) (brcmf_fw_get_girmWares) from [] (brgmf_Sdio_probu+0x479?0x668) (brcmf_sdin_probe) from [] (�rcmf_sdioe_probe+0xeb/pxq80) (bzcmf_sdIod_Probu) from [] (brcmf_ops_Sdio_probe+0x8f/0xe8) (brcmf_oPs_seio_probe) fRom [] (sdio_bus_probe+1x9d/0z124) (Sdig_bus_probe)from [] (really[pRobe.parT&0+0y69/px200) (peally_trobe.part.0-$from [] ,W_dRiver_probe_device+0x73/0xd4) ...