linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arend van Spriel <arend.vanspriel@broadcom.com>
To: Kyle Evans <kvans32@gmail.com>, linux-wireless@vger.kernel.org
Subject: Re: brcmfmac4329-sdio firmware load failed.
Date: Wed, 10 Jan 2018 09:47:33 +0100	[thread overview]
Message-ID: <5A55D325.60805@broadcom.com> (raw)
In-Reply-To: <7c73dc36-5b7a-729e-4656-b45839c1360d@gmail.com>

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] [<c061fd98>] (device_release_driver_internal) from
> [<c068f394>] (brcmf_sdio_firmware_callback+0x244/0x5b8)
> [   64.596500] [<c068f394>] (brcmf_sdio_firmware_callback) from
> [<c0686870>] (brcmf_fw_request_nvram_done+0x1cc/0x73c)
> [   64.596716] [<c0686870>] (brcmf_fw_request_nvram_done) from
> [<c063337c>] (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/

---
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;
         }

         chunk_buf = kzalloc(sizeof(*chunk_buf) + MAX_CHUNK_LEN - 1, 
GFP_KERNEL)

  reply	other threads:[~2018-01-10  8:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-09 12:51 brcmfmac4329-sdio firmware load failed Kyle Evans
2018-01-10  8:47 ` Arend van Spriel [this message]
2018-01-12 20:18   ` Kyle Evans
2018-01-13  9:19     ` Arend van Spriel
2018-01-16  1:20       ` Kyle Evans
2018-01-16 20:18         ` Arend van Spriel
2018-01-18 17:50       ` sdio failure to initialize on warm boot Kyle Evans
2018-01-19  8:21         ` Arend van Spriel
2018-01-19 16:05           ` Kyle Evans
2018-01-22  9:22             ` Arend van Spriel
2018-01-26 10:45               ` Kyle Evans

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5A55D325.60805@broadcom.com \
    --to=arend.vanspriel@broadcom.com \
    --cc=kvans32@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).