All of lore.kernel.org
 help / color / mirror / Atom feed
* brcm4330 fails to load on newer kernels
@ 2016-07-26 22:35 Fabio Estevam
  2016-07-27 20:51 ` Arend van Spriel
  0 siblings, 1 reply; 5+ messages in thread
From: Fabio Estevam @ 2016-07-26 22:35 UTC (permalink / raw)
  To: Arend van Spriel, Hante Meuleman; +Cc: linux-wireless, brcm80211-dev-list

Hi,

On a imx6sl-warp board with a brcm4330 I get the following results
depending on the kernel version:

- Kernel 4.4.15: place brcmfmac4330-sdio.bin and brcmfmac4330-sdio.txt
in the rootfs and the kernel is able to read them correctly. wlan0 is
present. All is fine.

- Kernel 4.5.7: place brcmfmac4330-sdio.bin brcmfmac4330-sdio.txt in
the rootfs and the kernel fails to load them:

brcmfmac mmc1:0001:1: Direct firmware load for
brcm/brcmfmac4330-sdio.bin failed with error -2

Then I build brcmfmac4330-sdio.bin brcmfmac4330-sdio.txt into the
kernel and then firmware is detected and wlan0 appears.

- Kernel 4.7: I can place the firmware and nvram file into the rootfs
or built-i and the following error is seen:

brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50

So wlan0 never appears here.

Does anyone have any suggestions about these different behaviours?

Thanks,

Fabio Estevam

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: brcm4330 fails to load on newer kernels
  2016-07-26 22:35 brcm4330 fails to load on newer kernels Fabio Estevam
@ 2016-07-27 20:51 ` Arend van Spriel
  2016-07-27 20:57   ` Fabio Estevam
  0 siblings, 1 reply; 5+ messages in thread
From: Arend van Spriel @ 2016-07-27 20:51 UTC (permalink / raw)
  To: Fabio Estevam, Arend van Spriel, Hante Meuleman
  Cc: linux-wireless, brcm80211-dev-list

On 27-07-16 00:35, Fabio Estevam wrote:
> Hi,
> 
> On a imx6sl-warp board with a brcm4330 I get the following results
> depending on the kernel version:
> 
> - Kernel 4.4.15: place brcmfmac4330-sdio.bin and brcmfmac4330-sdio.txt
> in the rootfs and the kernel is able to read them correctly. wlan0 is
> present. All is fine.
> 
> - Kernel 4.5.7: place brcmfmac4330-sdio.bin brcmfmac4330-sdio.txt in
> the rootfs and the kernel fails to load them:
> 
> brcmfmac mmc1:0001:1: Direct firmware load for
> brcm/brcmfmac4330-sdio.bin failed with error -2
> 
> Then I build brcmfmac4330-sdio.bin brcmfmac4330-sdio.txt into the
> kernel and then firmware is detected and wlan0 appears.
> 
> - Kernel 4.7: I can place the firmware and nvram file into the rootfs
> or built-i and the following error is seen:
> 
> brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
> brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
> brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
> 
> So wlan0 never appears here.
> 
> Does anyone have any suggestions about these different behaviours?

So for all kernel you have brcmfmac built-in the kernel or as a module?

Regards,
Arend

> Thanks,
> 
> Fabio Estevam
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: brcm4330 fails to load on newer kernels
  2016-07-27 20:51 ` Arend van Spriel
@ 2016-07-27 20:57   ` Fabio Estevam
  2016-07-28 18:37     ` Arend van Spriel
  0 siblings, 1 reply; 5+ messages in thread
From: Fabio Estevam @ 2016-07-27 20:57 UTC (permalink / raw)
  To: Arend van Spriel
  Cc: Arend van Spriel, Hante Meuleman, linux-wireless, brcm80211-dev-list

Hi Arend,

On Wed, Jul 27, 2016 at 5:51 PM, Arend van Spriel
<arend.vanspriel@broadcom.com> wrote:
> On 27-07-16 00:35, Fabio Estevam wrote:
>> Hi,
>>
>> On a imx6sl-warp board with a brcm4330 I get the following results
>> depending on the kernel version:
>>
>> - Kernel 4.4.15: place brcmfmac4330-sdio.bin and brcmfmac4330-sdio.txt
>> in the rootfs and the kernel is able to read them correctly. wlan0 is
>> present. All is fine.
>>
>> - Kernel 4.5.7: place brcmfmac4330-sdio.bin brcmfmac4330-sdio.txt in
>> the rootfs and the kernel fails to load them:
>>
>> brcmfmac mmc1:0001:1: Direct firmware load for
>> brcm/brcmfmac4330-sdio.bin failed with error -2
>>
>> Then I build brcmfmac4330-sdio.bin brcmfmac4330-sdio.txt into the
>> kernel and then firmware is detected and wlan0 appears.
>>
>> - Kernel 4.7: I can place the firmware and nvram file into the rootfs
>> or built-i and the following error is seen:
>>
>> brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
>> brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
>> brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
>>
>> So wlan0 never appears here.
>>
>> Does anyone have any suggestions about these different behaviours?
>
> So for all kernel you have brcmfmac built-in the kernel or as a module?

In all these tests I have brcmfmac built-in the kernel.

Thanks,

Fabio Estevam

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: brcm4330 fails to load on newer kernels
  2016-07-27 20:57   ` Fabio Estevam
@ 2016-07-28 18:37     ` Arend van Spriel
  2016-07-29  1:05       ` Fabio Estevam
  0 siblings, 1 reply; 5+ messages in thread
From: Arend van Spriel @ 2016-07-28 18:37 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Arend van Spriel, Hante Meuleman, linux-wireless, brcm80211-dev-list

On 27-07-16 22:57, Fabio Estevam wrote:
> Hi Arend,
> 
> On Wed, Jul 27, 2016 at 5:51 PM, Arend van Spriel
> <arend.vanspriel@broadcom.com> wrote:
>> On 27-07-16 00:35, Fabio Estevam wrote:
>>> Hi,
>>>
>>> On a imx6sl-warp board with a brcm4330 I get the following results
>>> depending on the kernel version:
>>>
>>> - Kernel 4.4.15: place brcmfmac4330-sdio.bin and brcmfmac4330-sdio.txt
>>> in the rootfs and the kernel is able to read them correctly. wlan0 is
>>> present. All is fine.
>>>
>>> - Kernel 4.5.7: place brcmfmac4330-sdio.bin brcmfmac4330-sdio.txt in
>>> the rootfs and the kernel fails to load them:
>>>
>>> brcmfmac mmc1:0001:1: Direct firmware load for
>>> brcm/brcmfmac4330-sdio.bin failed with error -2
>>>
>>> Then I build brcmfmac4330-sdio.bin brcmfmac4330-sdio.txt into the
>>> kernel and then firmware is detected and wlan0 appears.
>>>
>>> - Kernel 4.7: I can place the firmware and nvram file into the rootfs
>>> or built-i and the following error is seen:
>>>
>>> brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
>>> brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
>>> brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
>>>
>>> So wlan0 never appears here.
>>>
>>> Does anyone have any suggestions about these different behaviours?
>>
>> So for all kernel you have brcmfmac built-in the kernel or as a module?
> 
> In all these tests I have brcmfmac built-in the kernel.

Hi Fabio,

So this is another fine example of firmware API not able to deliver. I
think in all these kernels you have the same issue. The problem is that
the order of events upon kernel boot is not predictable. In this case
you have rootfs being mounted and brcmfmac getting probed as the two
competing events. When rootfs is mounted before brcmfmac is being probed
it works, but if brcmfmac is probed before rootfs is mounted the
firmware request will fail. So the only reliable option for built-in
drivers requiring firmware is to built-in the firmware into the kernel
as well.

Regards,
Arend

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: brcm4330 fails to load on newer kernels
  2016-07-28 18:37     ` Arend van Spriel
@ 2016-07-29  1:05       ` Fabio Estevam
  0 siblings, 0 replies; 5+ messages in thread
From: Fabio Estevam @ 2016-07-29  1:05 UTC (permalink / raw)
  To: Arend van Spriel
  Cc: Arend van Spriel, Hante Meuleman, linux-wireless, brcm80211-dev-list

Hi Arend,

On Thu, Jul 28, 2016 at 3:37 PM, Arend van Spriel
<arend.vanspriel@broadcom.com> wrote:

> Hi Fabio,
>
> So this is another fine example of firmware API not able to deliver. I
> think in all these kernels you have the same issue. The problem is that
> the order of events upon kernel boot is not predictable. In this case
> you have rootfs being mounted and brcmfmac getting probed as the two
> competing events. When rootfs is mounted before brcmfmac is being probed
> it works, but if brcmfmac is probed before rootfs is mounted the
> firmware request will fail. So the only reliable option for built-in
> drivers requiring firmware is to built-in the firmware into the kernel
> as well.

Thanks for your explanation.

Tried building brcmfmac as module and after doing 'modprobe brcmfmac'
the firmware is correctly loaded from the rootfs in all the kernels I
tested.

Now I just need it to load brcmfmac module automatically, but this is
a a separate issue I will investigate.

Thanks a lot for your help!

Fabio Estevam

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-07-29  1:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-26 22:35 brcm4330 fails to load on newer kernels Fabio Estevam
2016-07-27 20:51 ` Arend van Spriel
2016-07-27 20:57   ` Fabio Estevam
2016-07-28 18:37     ` Arend van Spriel
2016-07-29  1:05       ` Fabio Estevam

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.