From patchwork Wed Jan 10 08:47:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arend van Spriel X-Patchwork-Id: 10154595 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9FDB560231 for ; Wed, 10 Jan 2018 08:47:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 834BA201BD for ; Wed, 10 Jan 2018 08:47:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 781A6204C3; Wed, 10 Jan 2018 08:47:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E6F6F201BD for ; Wed, 10 Jan 2018 08:47:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933878AbeAJIri (ORCPT ); Wed, 10 Jan 2018 03:47:38 -0500 Received: from mail-wr0-f180.google.com ([209.85.128.180]:34686 "EHLO mail-wr0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752986AbeAJIrh (ORCPT ); Wed, 10 Jan 2018 03:47:37 -0500 Received: by mail-wr0-f180.google.com with SMTP id 36so16608445wrh.1 for ; Wed, 10 Jan 2018 00:47:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=4FUHmYy2vgVmewc1e6mhpyAdVGH6mka9OCeH5Bhr1H0=; b=g4g/arkCmbM/gilHC8YJkwcXYBGuCBsPaTgvjHI2IEUzpblcvJl10qWMtlUPVBkUJQ Def0VglDCru7qXJQ1kgqoimfmhwF+P7jQdrWmFwvUyWwz3uAqaBnJ6Qmjyn7CgVgxLUU wwqWFYY66jAIi5Yw8bVdEtfxf+SXkBZm8rIoI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=4FUHmYy2vgVmewc1e6mhpyAdVGH6mka9OCeH5Bhr1H0=; b=mHapgLrd1Q32Xt3pDuvUCQLqvfUg4Xm7VpP52FilmbY2SX9/j1qnG34Qsvb9CdELwJ 17FuXjSTh8n8g4aqZtNCx8LTQ2gps6hNrtaqifn/lhQxUw85qAVVusyIzUj27BtWgaxp Z7rLFziuXtynimWwK48iTH4tHfKCTPB2ns4ed5ftjtlMq9EzM+6cNnhoRyCWn7S/dgEM X/v9Lc5MRPUipiYcoSuxZR6hPvWQ3z9rfmvrL5eX5spfwqyXzsnskpD+1HNTTERwnzfu OJw95g1fERVBkFDmh8RQ6C2UMAhMuVBr1vxZvbY2JNg3rm9u/6iGb5RBfsGcZjVJ4+eR vnOw== X-Gm-Message-State: AKGB3mJzkDQr907PY5cbB6pLNstbrDVgZ0tRFtE5P82YlSRPjJ08DW/k KNbe8FiTmdhR3BRqVn4YrFG2YMxM X-Google-Smtp-Source: ACJfBosjD24ollMgrz5iBU3mKXbLwLpW9PBcfJXvg2gc8MXnol2yUE3fUb1xoJKLSwvVTfWUixEIaA== X-Received: by 10.223.187.14 with SMTP id r14mr17085002wrg.32.1515574055265; Wed, 10 Jan 2018 00:47:35 -0800 (PST) Received: from [10.177.251.60] ([192.19.248.250]) by smtp.gmail.com with ESMTPSA id z74sm5036756wmz.18.2018.01.10.00.47.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Jan 2018 00:47:34 -0800 (PST) Subject: Re: brcmfmac4329-sdio firmware load failed. To: Kyle Evans , linux-wireless@vger.kernel.org References: <7c73dc36-5b7a-729e-4656-b45839c1360d@gmail.com> From: Arend van Spriel Message-ID: <5A55D325.60805@broadcom.com> Date: Wed, 10 Jan 2018 09:47:33 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <7c73dc36-5b7a-729e-4656-b45839c1360d@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 1/9/2018 1:51 PM, Kyle Evans wrote: > This is linux-4.15-rc2 on an ASUS TF101. This device was shipped with > Android and a custom kernel using bcmdhd. I have taken nvram.txt from > /system/etc/ on the stock filesystem and copied to > /lib/firmware/brcm/brcmfmac4329-sdio.txt. Below is the result. Ok. So far so good as that nvram.txt is indeed what you want to use. > [ 2.729157] brcmfmac: F1 signature read @0x18000000=0x9934329 > [ 2.734313] brcmfmac: brcmf_sdiod_regrw_helper: failed to read data > F1@0x080ac, err: -84 The read failure is a bit concerning, but I ignore it for now. > [ 2.739952] brcmfmac: brcmf_fw_map_chip_to_name: using > brcm/brcmfmac4329-sdio.bin for chip 0x004329(17193) rev 0x000003 > [ 2.965820] brcmfmac mmc0:0001:1: Direct firmware load for > brcm/brcmfmac4329-sdio.clm_blob failed with error -2 Expected as you did not put a clm_blob file in /lib/firmware/brcm/. However, ... > [ 2.969658] brcmfmac mmc0:0001:1: Falling back to user helper > [ 64.489695] brcmfmac: brcmf_c_process_clm_blob: request CLM blob file > failed (-11) ...in one of the review cycles for the CLM blob feature it was made clear that this should not result in a probe failure... > [ 64.489720] brcmfmac: brcmf_c_preinit_dcmds: download CLM blob file > failed, -11 > [ 64.489739] brcmfmac: brcmf_bus_started: failed: -11 ... but it does bail out. Turns out the driver is checking for a specific error code -ENOENT (-2) and not -EAGAIN(-11). A patch has been submitted for it earlier [1], but it was rejected. I have taken another stab at it (see below). Let me know if it works for you. > [ 64.489783] brcmfmac: brcmf_sdio_firmware_callback: dongle is not > responding > [ 64.596281] [] (device_release_driver_internal) from > [] (brcmf_sdio_firmware_callback+0x244/0x5b8) > [ 64.596500] [] (brcmf_sdio_firmware_callback) from > [] (brcmf_fw_request_nvram_done+0x1cc/0x73c) > [ 64.596716] [] (brcmf_fw_request_nvram_done) from > [] (request_firmware_work_func+0x3c/0x64) This stack trace is from a driver bug that has been fixed in later -rc [2]. Regards, Arend [1] https://patchwork.kernel.org/patch/10106571/ [2] https://patchwork.kernel.org/patch/10075091/ --- chunk_buf = kzalloc(sizeof(*chunk_buf) + MAX_CHUNK_LEN - 1, GFP_KERNEL) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c b/driver index 6a59d06..f805600 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c @@ -182,12 +182,8 @@ static int brcmf_c_process_clm_blob(struct brcmf_if *ifp) err = request_firmware(&clm, clm_name, dev); if (err) { - if (err == -ENOENT) { - brcmf_dbg(INFO, "continue with CLM data currently prese - return 0; - } - brcmf_err("request CLM blob file failed (%d)\n", err); - return err; + brcmf_info("no CLM blob. Firmware may still need it.\n"); + return 0; }