2017-07-22 18:43:56

by Hans de Goede

[permalink] [raw]
Subject: brcm43430 sdio wifi regression with 4.13-rc1

Hi,

When upgrading my devel environment to 4.13-rc1+ I noticed that
the brcm43430 sdio wifi on a Chuwi Hi8 plus stopped working:

jul 22 14:13:23 localhost.localdomain kernel: brcmfmac: brcmf_sdio_probe: Loading firmware brcm/brcmfmac43430-sdio.bin for chip 0000a9a6 rev 00000001
jul 22 14:13:23 localhost.localdomain kernel: usbcore: registered new interface driver brcmfmac
jul 22 14:13:23 localhost.localdomain kernel: brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: Aug 29 2016 20:48:16 version 7.45.41.26 (r640327) FWID 01-4527cfab
jul 22 14:13:23 localhost.localdomain kernel: brcmfmac: brcmf_sdio_hostmail: Unknown mailbox data content: 0x40012
jul 22 14:13:26 localhost.localdomain kernel: brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
jul 22 14:13:28 localhost.localdomain kernel: brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
jul 22 14:13:31 localhost.localdomain kernel: brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
<repeats>

The real culprit here seems to be:

jul 22 14:13:23 localhost.localdomain kernel: brcmfmac: brcmf_sdio_hostmail: Unknown mailbox data content: 0x40012


I've tried reverting allmost all changes under drivers/net/wireless/broadcom/brcm80211
as well as those under drivers/mmc, but that did not help.

Googling for the "Unknown mailbox data content" error found some Raspberry Pi 3
related comments where users report success with a different firmware version
from: https://android.googlesource.com/platform/hardware/broadcom/wlan/+/master/bcmdhd/firmware/bcm4343/

So I tried that as well as a version extracted from the Android install
on the tablet and both work fine, only the "version 7.45.41.26" which
happens to be the one in linux-firmware causes this problem, I've put
all (Linux build, not NDIS) versions I could find here:

http://jwrdegoede.danny.cz/brcm-firmware/

I've the feeling that the 7.45.41.26 version is a bit buggy / suspect to
certain timing problems and 4.13 just happens to trigger those timing
conditions...

russianneuromancer has reported seeing a similar problem with 4.13.

russianneuromancer, can you check if the device you are seeing this with
also has a brcm43430 sdio wifi and if so if switching to:

http://jwrdegoede.danny.cz/brcm-firmware/brcmfmac43430-sdio.bin.7.45.77.0.ucode1043.2054

Fixes this ?

Regards,

Hans


2017-07-22 21:34:01

by Arend Van Spriel

[permalink] [raw]
Subject: Re: brcm43430 sdio wifi regression with 4.13-rc1

On 22-07-17 20:43, Hans de Goede wrote:
> The real culprit here seems to be:
>
> jul 22 14:13:23 localhost.localdomain kernel: brcmfmac:
> brcmf_sdio_hostmail: Unknown mailbox data content: 0x40012

So I dug a little deeper in our firmware and as it turns out it is
indeed a firmware halt which is indicated by 0x10. 0x02 is DEVREADY and
0x40000 indicates the protocol version.

Regards,
Arend

2017-07-22 19:53:59

by Arend Van Spriel

[permalink] [raw]
Subject: Re: brcm43430 sdio wifi regression with 4.13-rc1

On 22-07-17 21:19, Ian Molton wrote:
> On 22/07/17 20:18, Ian Molton wrote:
>> On 22/07/17 19:43, Hans de Goede wrote:
>>> Hi,
>>>
>>> When upgrading my devel environment to 4.13-rc1+ I noticed that
>>> the brcm43430 sdio wifi on a Chuwi Hi8 plus stopped working:
>>
>> There is a fix for this:
>>
>> https://patchwork.kernel.org/patch/9836383/
>
> Sorry, ignore me - this was a fix for the other 4.13-rc1 regression.
> Arend is looking into he other one. It affects me too.
>
> It appears to be the firmware going astray.

It is still an enigma although admittedly I did not put much time in it
this week. The change below fixes it as the device goes haywire from
this command. At least this was reported by Stefan Wahren ("brcmfmac:
BCM43431 won't get probed on Raspberry Pi Zero W") on linux-wireless
mailing list. Still I can not explain it. Could be that there is not
enough free memory on the device.

Regards,
Arend
---
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
index d21258d..def120c 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
@@ -159,8 +159,9 @@ void brcmf_feat_attach(struct brcmf_pub *drvr)

brcmf_feat_firmware_capabilities(ifp);
memset(&gscan_cfg, 0, sizeof(gscan_cfg));
- brcmf_feat_iovar_data_set(ifp, BRCMF_FEAT_GSCAN, "pfn_gscan_cfg",
- &gscan_cfg, sizeof(gscan_cfg));
+ if (drvr->bus_if->chip != BRCM_CC_43430_CHIP_ID)
+ brcmf_feat_iovar_data_set(ifp, BRCMF_FEAT_GSCAN,
"pfn_gscan_cfg",
+ &gscan_cfg, sizeof(gscan_cfg));
brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_PNO, "pfn");
if (drvr->bus_if->wowl_supported)
brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_WOWL, "wowl");

2017-07-22 19:19:49

by Ian Molton

[permalink] [raw]
Subject: Re: brcm43430 sdio wifi regression with 4.13-rc1

On 22/07/17 20:18, Ian Molton wrote:
> On 22/07/17 19:43, Hans de Goede wrote:
>> Hi,
>>
>> When upgrading my devel environment to 4.13-rc1+ I noticed that
>> the brcm43430 sdio wifi on a Chuwi Hi8 plus stopped working:
>
> There is a fix for this:
>
> https://patchwork.kernel.org/patch/9836383/

Sorry, ignore me - this was a fix for the other 4.13-rc1 regression.
Arend is looking into he other one. It affects me too.

It appears to be the firmware going astray.

-Ian

2017-07-24 08:36:44

by James Hughes

[permalink] [raw]
Subject: Re: brcm43430 sdio wifi regression with 4.13-rc1

On 23 July 2017 at 08:08, Hans de Goede <[email protected]> wrote:
> Hi,
>
> On 22-07-17 21:53, Arend van Spriel wrote:
>>
>> On 22-07-17 21:19, Ian Molton wrote:
>>>
>>> On 22/07/17 20:18, Ian Molton wrote:
>>>>
>>>> On 22/07/17 19:43, Hans de Goede wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> When upgrading my devel environment to 4.13-rc1+ I noticed that
>>>>> the brcm43430 sdio wifi on a Chuwi Hi8 plus stopped working:
>>>>
>>>>
>>>> There is a fix for this:
>>>>
>>>> https://patchwork.kernel.org/patch/9836383/
>>>
>>>
>>> Sorry, ignore me - this was a fix for the other 4.13-rc1 regression.
>>> Arend is looking into he other one. It affects me too.
>>>
>>> It appears to be the firmware going astray.
>>
>>
>> It is still an enigma although admittedly I did not put much time in it
>> this week. The change below fixes it as the device goes haywire from
>> this command. At least this was reported by Stefan Wahren ("brcmfmac:
>> BCM43431 won't get probed on Raspberry Pi Zero W") on linux-wireless
>> mailing list. Still I can not explain it. Could be that there is not
>> enough free memory on the device.
>
>
> As mentioned in my original mail, switching firmware version seems to
> fix this. linux-firmware has:
>
> [hans@shalem ~]$ strings
> brcm-firmware/brcmfmac43430-sdio.bin.7.45.41.26.ucode1043.2060 | tail -n1
> 43430a1-roml/sdio-g-p2p-pool-pno-pktfilter-keepalive-aoe-mchan-tdls-proptxstatus-ampduhostreorder-lpc-sr-bcmcps
> Version: 7.45.41.26 CRC: a75d4f1b Date: Mon 2016-08-29 20:53:22 CEST Ucode
> Ver: 1043.2060 FWID: 01-4527cfab
>
> Where as this one (from the android image on the tablet) does work:
>
> [hans@shalem ~]$ strings
> brcm-firmware/brcmfmac43430-sdio.bin.7.45.77.0.ucode1043.2054 | tail -n1
> 43430a1-roml/sdio-g-pool-p2p-pno-pktfilter-keepalive-aoe-mchan-proptxstatus-ampduhostreorder-lpc-wl11u-rcc-fmc-wepso-okc-anqpo-11nprop-ndoe-tdls-hs20sta-clm_4335_ss-hwapwar-ivwar-srfast
> Version: 7.45.77.0 CRC: c1a399d4 Date: Wed 2016-03-30 11:31:45 CST Ucode
> Ver: 1043.2054 FWID: 01-ee8a6268
>
> Here: https://www.spinics.net/lists/linux-wireless/msg164304.html
> you write that the firmware in linux-firmware does not have the
> gscan feature, the check for which is causing the issue, enabled,
> could it be the other firmware build does have it enabled? It does seem
> to have a bunch of extra things enabled. Maybe there simply is an error
> in the error-handling in the firmware when it is disabled ?
>
> I've put all firmware versions I have here:
>
> http://jwrdegoede.danny.cz/brcm-firmware/
>
> Regards,
>
> Hans
>
>
>
>
>>
>> Regards,
>> Arend
>> ---
>> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
>> b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
>> index d21258d..def120c 100644
>> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
>> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
>> @@ -159,8 +159,9 @@ void brcmf_feat_attach(struct brcmf_pub *drvr)
>>
>> brcmf_feat_firmware_capabilities(ifp);
>> memset(&gscan_cfg, 0, sizeof(gscan_cfg));
>> - brcmf_feat_iovar_data_set(ifp, BRCMF_FEAT_GSCAN, "pfn_gscan_cfg",
>> - &gscan_cfg, sizeof(gscan_cfg));
>> + if (drvr->bus_if->chip != BRCM_CC_43430_CHIP_ID)
>> + brcmf_feat_iovar_data_set(ifp, BRCMF_FEAT_GSCAN,
>> "pfn_gscan_cfg",
>> + &gscan_cfg, sizeof(gscan_cfg));
>> brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_PNO, "pfn");
>> if (drvr->bus_if->wowl_supported)
>> brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_WOWL, "wowl");
>>
>

May or may not be useful, but we have just had a bug report on
Raspberry Pi that is filled with these mailbox messages. Don't seem to
be related to this scan issue, but the mailbox error is the same. I am
not enough of an expert on Wifi to really comment, or see whether this
patch would help.

https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=189046

2017-07-23 07:09:00

by Hans de Goede

[permalink] [raw]
Subject: Re: brcm43430 sdio wifi regression with 4.13-rc1

Hi,

On 22-07-17 21:53, Arend van Spriel wrote:
> On 22-07-17 21:19, Ian Molton wrote:
>> On 22/07/17 20:18, Ian Molton wrote:
>>> On 22/07/17 19:43, Hans de Goede wrote:
>>>> Hi,
>>>>
>>>> When upgrading my devel environment to 4.13-rc1+ I noticed that
>>>> the brcm43430 sdio wifi on a Chuwi Hi8 plus stopped working:
>>>
>>> There is a fix for this:
>>>
>>> https://patchwork.kernel.org/patch/9836383/
>>
>> Sorry, ignore me - this was a fix for the other 4.13-rc1 regression.
>> Arend is looking into he other one. It affects me too.
>>
>> It appears to be the firmware going astray.
>
> It is still an enigma although admittedly I did not put much time in it
> this week. The change below fixes it as the device goes haywire from
> this command. At least this was reported by Stefan Wahren ("brcmfmac:
> BCM43431 won't get probed on Raspberry Pi Zero W") on linux-wireless
> mailing list. Still I can not explain it. Could be that there is not
> enough free memory on the device.

As mentioned in my original mail, switching firmware version seems to
fix this. linux-firmware has:

[hans@shalem ~]$ strings brcm-firmware/brcmfmac43430-sdio.bin.7.45.41.26.ucode1043.2060 | tail -n1
43430a1-roml/sdio-g-p2p-pool-pno-pktfilter-keepalive-aoe-mchan-tdls-proptxstatus-ampduhostreorder-lpc-sr-bcmcps Version: 7.45.41.26 CRC: a75d4f1b Date: Mon 2016-08-29 20:53:22 CEST Ucode Ver: 1043.2060 FWID: 01-4527cfab

Where as this one (from the android image on the tablet) does work:

[hans@shalem ~]$ strings brcm-firmware/brcmfmac43430-sdio.bin.7.45.77.0.ucode1043.2054 | tail -n1
43430a1-roml/sdio-g-pool-p2p-pno-pktfilter-keepalive-aoe-mchan-proptxstatus-ampduhostreorder-lpc-wl11u-rcc-fmc-wepso-okc-anqpo-11nprop-ndoe-tdls-hs20sta-clm_4335_ss-hwapwar-ivwar-srfast Version: 7.45.77.0 CRC: c1a399d4 Date: Wed 2016-03-30 11:31:45 CST Ucode Ver: 1043.2054 FWID: 01-ee8a6268

Here: https://www.spinics.net/lists/linux-wireless/msg164304.html
you write that the firmware in linux-firmware does not have the
gscan feature, the check for which is causing the issue, enabled,
could it be the other firmware build does have it enabled? It does seem
to have a bunch of extra things enabled. Maybe there simply is an error
in the error-handling in the firmware when it is disabled ?

I've put all firmware versions I have here:

http://jwrdegoede.danny.cz/brcm-firmware/

Regards,

Hans



>
> Regards,
> Arend
> ---
> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
> b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
> index d21258d..def120c 100644
> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
> @@ -159,8 +159,9 @@ void brcmf_feat_attach(struct brcmf_pub *drvr)
>
> brcmf_feat_firmware_capabilities(ifp);
> memset(&gscan_cfg, 0, sizeof(gscan_cfg));
> - brcmf_feat_iovar_data_set(ifp, BRCMF_FEAT_GSCAN, "pfn_gscan_cfg",
> - &gscan_cfg, sizeof(gscan_cfg));
> + if (drvr->bus_if->chip != BRCM_CC_43430_CHIP_ID)
> + brcmf_feat_iovar_data_set(ifp, BRCMF_FEAT_GSCAN,
> "pfn_gscan_cfg",
> + &gscan_cfg, sizeof(gscan_cfg));
> brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_PNO, "pfn");
> if (drvr->bus_if->wowl_supported)
> brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_WOWL, "wowl");
>

2017-07-22 19:18:26

by Ian Molton

[permalink] [raw]
Subject: Re: brcm43430 sdio wifi regression with 4.13-rc1

On 22/07/17 19:43, Hans de Goede wrote:
> Hi,
>
> When upgrading my devel environment to 4.13-rc1+ I noticed that
> the brcm43430 sdio wifi on a Chuwi Hi8 plus stopped working:

There is a fix for this:



https://patchwork.kernel.org/patch/9836383/

IIRC

-Ian

2017-07-22 20:30:26

by James Hughes

[permalink] [raw]
Subject: Re: brcm43430 sdio wifi regression with 4.13-rc1

On 22 July 2017 at 20:53, Arend van Spriel <[email protected]> wrote:
> On 22-07-17 21:19, Ian Molton wrote:
>> On 22/07/17 20:18, Ian Molton wrote:
>>> On 22/07/17 19:43, Hans de Goede wrote:
>>>> Hi,
>>>>
>>>> When upgrading my devel environment to 4.13-rc1+ I noticed that
>>>> the brcm43430 sdio wifi on a Chuwi Hi8 plus stopped working:
>>>
>>> There is a fix for this:
>>>
>>> https://patchwork.kernel.org/patch/9836383/
>>
>> Sorry, ignore me - this was a fix for the other 4.13-rc1 regression.
>> Arend is looking into he other one. It affects me too.
>>
>> It appears to be the firmware going astray.
>
> It is still an enigma although admittedly I did not put much time in it
> this week. The change below fixes it as the device goes haywire from
> this command. At least this was reported by Stefan Wahren ("brcmfmac:
> BCM43431 won't get probed on Raspberry Pi Zero W") on linux-wireless
> mailing list. Still I can not explain it. Could be that there is not
> enough free memory on the device.
>
> Regards,
> Arend
> ---
> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
> b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
> index d21258d..def120c 100644
> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
> @@ -159,8 +159,9 @@ void brcmf_feat_attach(struct brcmf_pub *drvr)
>
> brcmf_feat_firmware_capabilities(ifp);
> memset(&gscan_cfg, 0, sizeof(gscan_cfg));
> - brcmf_feat_iovar_data_set(ifp, BRCMF_FEAT_GSCAN, "pfn_gscan_cfg",
> - &gscan_cfg, sizeof(gscan_cfg));
> + if (drvr->bus_if->chip != BRCM_CC_43430_CHIP_ID)
> + brcmf_feat_iovar_data_set(ifp, BRCMF_FEAT_GSCAN,
> "pfn_gscan_cfg",
> + &gscan_cfg, sizeof(gscan_cfg));
> brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_PNO, "pfn");
> if (drvr->bus_if->wowl_supported)
> brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_WOWL, "wowl");
>

Any movement on the mailbox issue would be good news for us, it's on
my list of things to investigate, and has been flagged up by Pi3/Pi0W
users as a possible cause/symptom of wireless issues. We have a
catchall thread for these issues here
https://github.com/raspberrypi/linux/issues/1342, with some extra
details but this particular mailbox error I've not been able to find a
way to reliably replicate so far. My Googling hadn't thrown up the
firmware version being relevant, which is a useful data point, along
with Arend's patch above. I should be able to take a bit more of a
look next week, so if anyone has a way of replicating on a Pi3 I'd
like to here about it.

James, Raspberry Pi.

2017-08-14 17:25:38

by Hans de Goede

[permalink] [raw]
Subject: Re: [4.13 REGRESSION] Re: brcm43430 sdio wifi regression with 4.13-rc1

Hi,

On 14-08-17 17:46, Kalle Valo wrote:
> Hans de Goede <[email protected]> writes:
>
>>>> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
>>>> b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
>>>> index d21258d..def120c 100644
>>>> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
>>>> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
>>>> @@ -159,8 +159,9 @@ void brcmf_feat_attach(struct brcmf_pub *drvr)
>>>>
>>>> brcmf_feat_firmware_capabilities(ifp);
>>>> memset(&gscan_cfg, 0, sizeof(gscan_cfg));
>>>> - brcmf_feat_iovar_data_set(ifp, BRCMF_FEAT_GSCAN, "pfn_gscan_cfg",
>>>> - &gscan_cfg, sizeof(gscan_cfg));
>>>> + if (drvr->bus_if->chip != BRCM_CC_43430_CHIP_ID)
>>>> + brcmf_feat_iovar_data_set(ifp, BRCMF_FEAT_GSCAN,
>>>> "pfn_gscan_cfg",
>>>> + &gscan_cfg, sizeof(gscan_cfg));
>>>> brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_PNO, "pfn");
>>>> if (drvr->bus_if->wowl_supported)
>>>> brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_WOWL, "wowl");
>>>>
>>
>> AFAICT this is still a problem with 4.13-rc5, can we at least get
>> the above workaround merged for 4.13 ?
>
> Just applied it few hours ago:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers.git/commit/?id=e9bf53ab1ee34bb05c104bbfd2b77c844773f8e6
>
> I'll try to get it to -rc6 but of course it depends on pull schedules if
> it makes it or not.

Ok, thank you.

Regards,

Hans

2017-08-02 20:54:26

by [email protected]

[permalink] [raw]
Subject: Re: brcm43430 sdio wifi regression with 4.13-rc1

Hello!

Sorry for late answer.

> russianneuromancer has reported seeing a similar problem with 4.13.

> russianneuromancer, can you check if the device you are seeing this with
also has a brcm43430 sdio wifi and if so if switching to:

> http://jwrdegoede.danny.cz/brcm-firmware/brcmfmac43430-sdio.bin.7.45.77.0.ucode1043.2054

> Fixes this ?

Judging by this error message

> [ 7.744262] brcmfmac mmc0:0001:1: Direct firmware load for brcm/brcmfmac43241b4-sdio.txt failed with error -2

Lenovo Miix2 8 have brcm43241b4 sdio wifi.

With brcmfmac43241b4-sdio.txt from NVRAM, as suggested here https://wireless.wiki.kernel.org/en/users/drivers/brcm80211 WiFi connection works for me with upstream Linux 4.12.4, but doesn't work with Linux 4.13rc1 and Linux 4.13rc3.

Few connection attempts with Linux 4.13rc3 looks like this:

> [ 7.779370] usbcore: registered new interface driver brcmfmac
> [ 7.948487] brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: Jul 17 2013 07:36:07 version 6.10.197.71 (r412987) FWID 01-882d2634
> [ 32.282374] brcmfmac: brcmf_p2p_create_p2pdev: set p2p_disc error
> [ 32.282393] brcmfmac: brcmf_cfg80211_add_iface: add iface p2p-dev-wlan0 type 10 failed: err=-16
> [ 43.560596] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
> [ 44.494422] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
> [ 45.492956] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
> [ 46.491317] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
> [ 54.922652] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
> [ 55.849565] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
> [ 56.849437] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
> [ 57.853150] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
> [ 66.542999] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
> [ 67.483115] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
> [ 68.483434] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0

23.07.2017, 02:44, "Hans de Goede" <[email protected]>:
> Hi,
>
> When upgrading my devel environment to 4.13-rc1+ I noticed that
> the brcm43430 sdio wifi on a Chuwi Hi8 plus stopped working:
>
> jul 22 14:13:23 localhost.localdomain kernel: brcmfmac: brcmf_sdio_probe: Loading firmware brcm/brcmfmac43430-sdio.bin for chip 0000a9a6 rev 00000001
> jul 22 14:13:23 localhost.localdomain kernel: usbcore: registered new interface driver brcmfmac
> jul 22 14:13:23 localhost.localdomain kernel: brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: Aug 29 2016 20:48:16 version 7.45.41.26 (r640327) FWID 01-4527cfab
> jul 22 14:13:23 localhost.localdomain kernel: brcmfmac: brcmf_sdio_hostmail: Unknown mailbox data content: 0x40012
> jul 22 14:13:26 localhost.localdomain kernel: brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
> jul 22 14:13:28 localhost.localdomain kernel: brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
> jul 22 14:13:31 localhost.localdomain kernel: brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
> <repeats>
>
> The real culprit here seems to be:
>
> jul 22 14:13:23 localhost.localdomain kernel: brcmfmac: brcmf_sdio_hostmail: Unknown mailbox data content: 0x40012
>
> I've tried reverting allmost all changes under drivers/net/wireless/broadcom/brcm80211
> as well as those under drivers/mmc, but that did not help.
>
> Googling for the "Unknown mailbox data content" error found some Raspberry Pi 3
> related comments where users report success with a different firmware version
> from: https://android.googlesource.com/platform/hardware/broadcom/wlan/+/master/bcmdhd/firmware/bcm4343/
>
> So I tried that as well as a version extracted from the Android install
> on the tablet and both work fine, only the "version 7.45.41.26" which
> happens to be the one in linux-firmware causes this problem, I've put
> all (Linux build, not NDIS) versions I could find here:
>
> http://jwrdegoede.danny.cz/brcm-firmware/
>
> I've the feeling that the 7.45.41.26 version is a bit buggy / suspect to
> certain timing problems and 4.13 just happens to trigger those timing
> conditions...
>
> russianneuromancer has reported seeing a similar problem with 4.13.
>
> russianneuromancer, can you check if the device you are seeing this with
> also has a brcm43430 sdio wifi and if so if switching to:
>
> http://jwrdegoede.danny.cz/brcm-firmware/brcmfmac43430-sdio.bin.7.45.77.0.ucode1043.2054
>
> Fixes this ?
>
> Regards,
>
> Hans

2017-08-14 15:20:42

by Hans de Goede

[permalink] [raw]
Subject: [4.13 REGRESSION] Re: brcm43430 sdio wifi regression with 4.13-rc1

Hi,

On 23-07-17 09:08, Hans de Goede wrote:
> Hi,
>
> On 22-07-17 21:53, Arend van Spriel wrote:
>> On 22-07-17 21:19, Ian Molton wrote:
>>> On 22/07/17 20:18, Ian Molton wrote:
>>>> On 22/07/17 19:43, Hans de Goede wrote:
>>>>> Hi,
>>>>>
>>>>> When upgrading my devel environment to 4.13-rc1+ I noticed that
>>>>> the brcm43430 sdio wifi on a Chuwi Hi8 plus stopped working:
>>>>
>>>> There is a fix for this:
>>>>
>>>> https://patchwork.kernel.org/patch/9836383/
>>>
>>> Sorry, ignore me - this was a fix for the other 4.13-rc1 regression.
>>> Arend is looking into he other one. It affects me too.
>>>
>>> It appears to be the firmware going astray.
>>
>> It is still an enigma although admittedly I did not put much time in it
>> this week. The change below fixes it as the device goes haywire from
>> this command. At least this was reported by Stefan Wahren ("brcmfmac:
>> BCM43431 won't get probed on Raspberry Pi Zero W") on linux-wireless
>> mailing list. Still I can not explain it. Could be that there is not
>> enough free memory on the device.
>
> As mentioned in my original mail, switching firmware version seems to
> fix this. linux-firmware has:
>
> [hans@shalem ~]$ strings brcm-firmware/brcmfmac43430-sdio.bin.7.45.41.26.ucode1043.2060 | tail -n1
> 43430a1-roml/sdio-g-p2p-pool-pno-pktfilter-keepalive-aoe-mchan-tdls-proptxstatus-ampduhostreorder-lpc-sr-bcmcps Version: 7.45.41.26 CRC: a75d4f1b Date: Mon 2016-08-29 20:53:22 CEST Ucode Ver: 1043.2060 FWID: 01-4527cfab
>
> Where as this one (from the android image on the tablet) does work:
>
> [hans@shalem ~]$ strings brcm-firmware/brcmfmac43430-sdio.bin.7.45.77.0.ucode1043.2054 | tail -n1
> 43430a1-roml/sdio-g-pool-p2p-pno-pktfilter-keepalive-aoe-mchan-proptxstatus-ampduhostreorder-lpc-wl11u-rcc-fmc-wepso-okc-anqpo-11nprop-ndoe-tdls-hs20sta-clm_4335_ss-hwapwar-ivwar-srfast Version: 7.45.77.0 CRC: c1a399d4 Date: Wed 2016-03-30 11:31:45 CST Ucode Ver: 1043.2054 FWID: 01-ee8a6268
>
> Here: https://www.spinics.net/lists/linux-wireless/msg164304.html
> you write that the firmware in linux-firmware does not have the
> gscan feature, the check for which is causing the issue, enabled,
> could it be the other firmware build does have it enabled? It does seem
> to have a bunch of extra things enabled. Maybe there simply is an error
> in the error-handling in the firmware when it is disabled ?
>
> I've put all firmware versions I have here:
>
> http://jwrdegoede.danny.cz/brcm-firmware/
>
> Regards,
>
> Hans
>
>
>
>>
>> Regards,
>> Arend
>> ---
>> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
>> b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
>> index d21258d..def120c 100644
>> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
>> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
>> @@ -159,8 +159,9 @@ void brcmf_feat_attach(struct brcmf_pub *drvr)
>>
>> brcmf_feat_firmware_capabilities(ifp);
>> memset(&gscan_cfg, 0, sizeof(gscan_cfg));
>> - brcmf_feat_iovar_data_set(ifp, BRCMF_FEAT_GSCAN, "pfn_gscan_cfg",
>> - &gscan_cfg, sizeof(gscan_cfg));
>> + if (drvr->bus_if->chip != BRCM_CC_43430_CHIP_ID)
>> + brcmf_feat_iovar_data_set(ifp, BRCMF_FEAT_GSCAN,
>> "pfn_gscan_cfg",
>> + &gscan_cfg, sizeof(gscan_cfg));
>> brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_PNO, "pfn");
>> if (drvr->bus_if->wowl_supported)
>> brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_WOWL, "wowl");
>>

AFAICT this is still a problem with 4.13-rc5, can we at least get
the above workaround merged for 4.13 ?

Regards,

Hans

2017-08-09 15:50:00

by [email protected]

[permalink] [raw]
Subject: Re: brcm43430 sdio wifi regression with 4.13-rc1

Hello!

> There are three patches currently in wireless tree, maybe also in netdev tree, which will probably be included in 4.13-rc4 fixing the issue below.

With Linux 4.13rc4 issue is no longer reproducible on Lenovo Miix2 8.

03.08.2017, 05:05, "Arend van Spriel" <[email protected]>:
> On 02-08-17 22:43, [email protected] wrote:
>>  Hello!
>>
>>  Sorry for late answer.
>>
>>>  russianneuromancer has reported seeing a similar problem with 4.13.
>>
>>>  russianneuromancer, can you check if the device you are seeing this with
>>  also has a brcm43430 sdio wifi and if so if switching to:
>>
>>>  http://jwrdegoede.danny.cz/brcm-firmware/brcmfmac43430-sdio.bin.7.45.77.0.ucode1043.2054
>>
>>>  Fixes this ?
>>
>>  Judging by this error message
>>
>>>  [ 7.744262] brcmfmac mmc0:0001:1: Direct firmware load for brcm/brcmfmac43241b4-sdio.txt failed with error -2
>>
>>  Lenovo Miix2 8 have brcm43241b4 sdio wifi.
>>
>>  With brcmfmac43241b4-sdio.txt from NVRAM, as suggested here https://wireless.wiki.kernel.org/en/users/drivers/brcm80211 WiFi connection works for me with upstream Linux 4.12.4, but doesn't work with Linux 4.13rc1 and Linux 4.13rc3.
>
> Yeah. There are three patches currently in wireless tree, maybe also in
> netdev tree, which will probably be included in 4.13-rc4 fixing the
> issue below.
>
> Regards,
> Arend
>
>>  Few connection attempts with Linux 4.13rc3 looks like this:
>>
>>>  [ 7.779370] usbcore: registered new interface driver brcmfmac
>>>  [ 7.948487] brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: Jul 17 2013 07:36:07 version 6.10.197.71 (r412987) FWID 01-882d2634
>>>  [ 32.282374] brcmfmac: brcmf_p2p_create_p2pdev: set p2p_disc error
>>>  [ 32.282393] brcmfmac: brcmf_cfg80211_add_iface: add iface p2p-dev-wlan0 type 10 failed: err=-16
>>>  [ 43.560596] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
>>>  [ 44.494422] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
>>>  [ 45.492956] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
>>>  [ 46.491317] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
>>>  [ 54.922652] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
>>>  [ 55.849565] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
>>>  [ 56.849437] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
>>>  [ 57.853150] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
>>>  [ 66.542999] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
>>>  [ 67.483115] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
>>>  [ 68.483434] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
>>
>>  23.07.2017, 02:44, "Hans de Goede" <[email protected]>:
>>>  Hi,
>>>
>>>  When upgrading my devel environment to 4.13-rc1+ I noticed that
>>>  the brcm43430 sdio wifi on a Chuwi Hi8 plus stopped working:
>>>
>>>  jul 22 14:13:23 localhost.localdomain kernel: brcmfmac: brcmf_sdio_probe: Loading firmware brcm/brcmfmac43430-sdio.bin for chip 0000a9a6 rev 00000001
>>>  jul 22 14:13:23 localhost.localdomain kernel: usbcore: registered new interface driver brcmfmac
>>>  jul 22 14:13:23 localhost.localdomain kernel: brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: Aug 29 2016 20:48:16 version 7.45.41.26 (r640327) FWID 01-4527cfab
>>>  jul 22 14:13:23 localhost.localdomain kernel: brcmfmac: brcmf_sdio_hostmail: Unknown mailbox data content: 0x40012
>>>  jul 22 14:13:26 localhost.localdomain kernel: brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
>>>  jul 22 14:13:28 localhost.localdomain kernel: brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
>>>  jul 22 14:13:31 localhost.localdomain kernel: brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
>>>  <repeats>
>>>
>>>  The real culprit here seems to be:
>>>
>>>  jul 22 14:13:23 localhost.localdomain kernel: brcmfmac: brcmf_sdio_hostmail: Unknown mailbox data content: 0x40012
>>>
>>>  I've tried reverting allmost all changes under drivers/net/wireless/broadcom/brcm80211
>>>  as well as those under drivers/mmc, but that did not help.
>>>
>>>  Googling for the "Unknown mailbox data content" error found some Raspberry Pi 3
>>>  related comments where users report success with a different firmware version
>>>  from: https://android.googlesource.com/platform/hardware/broadcom/wlan/+/master/bcmdhd/firmware/bcm4343/
>>>
>>>  So I tried that as well as a version extracted from the Android install
>>>  on the tablet and both work fine, only the "version 7.45.41.26" which
>>>  happens to be the one in linux-firmware causes this problem, I've put
>>>  all (Linux build, not NDIS) versions I could find here:
>>>
>>>  http://jwrdegoede.danny.cz/brcm-firmware/
>>>
>>>  I've the feeling that the 7.45.41.26 version is a bit buggy / suspect to
>>>  certain timing problems and 4.13 just happens to trigger those timing
>>>  conditions...
>>>
>>>  russianneuromancer has reported seeing a similar problem with 4.13.
>>>
>>>  russianneuromancer, can you check if the device you are seeing this with
>>>  also has a brcm43430 sdio wifi and if so if switching to:
>>>
>>>  http://jwrdegoede.danny.cz/brcm-firmware/brcmfmac43430-sdio.bin.7.45.77.0.ucode1043.2054
>>>
>>>  Fixes this ?
>>>
>>>  Regards,
>>>
>>>  Hans

2017-08-02 21:06:00

by Arend Van Spriel

[permalink] [raw]
Subject: Re: brcm43430 sdio wifi regression with 4.13-rc1



On 02-08-17 22:43, [email protected] wrote:
> Hello!
>
> Sorry for late answer.
>
>> russianneuromancer has reported seeing a similar problem with 4.13.
>
>> russianneuromancer, can you check if the device you are seeing this with
> also has a brcm43430 sdio wifi and if so if switching to:
>
>> http://jwrdegoede.danny.cz/brcm-firmware/brcmfmac43430-sdio.bin.7.45.77.0.ucode1043.2054
>
>> Fixes this ?
>
> Judging by this error message
>
>> [ 7.744262] brcmfmac mmc0:0001:1: Direct firmware load for brcm/brcmfmac43241b4-sdio.txt failed with error -2
>
> Lenovo Miix2 8 have brcm43241b4 sdio wifi.
>
> With brcmfmac43241b4-sdio.txt from NVRAM, as suggested here https://wireless.wiki.kernel.org/en/users/drivers/brcm80211 WiFi connection works for me with upstream Linux 4.12.4, but doesn't work with Linux 4.13rc1 and Linux 4.13rc3.

Yeah. There are three patches currently in wireless tree, maybe also in
netdev tree, which will probably be included in 4.13-rc4 fixing the
issue below.

Regards,
Arend

> Few connection attempts with Linux 4.13rc3 looks like this:
>
>> [ 7.779370] usbcore: registered new interface driver brcmfmac
>> [ 7.948487] brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: Jul 17 2013 07:36:07 version 6.10.197.71 (r412987) FWID 01-882d2634
>> [ 32.282374] brcmfmac: brcmf_p2p_create_p2pdev: set p2p_disc error
>> [ 32.282393] brcmfmac: brcmf_cfg80211_add_iface: add iface p2p-dev-wlan0 type 10 failed: err=-16
>> [ 43.560596] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
>> [ 44.494422] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
>> [ 45.492956] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
>> [ 46.491317] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
>> [ 54.922652] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
>> [ 55.849565] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
>> [ 56.849437] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
>> [ 57.853150] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
>> [ 66.542999] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
>> [ 67.483115] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
>> [ 68.483434] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
>
> 23.07.2017, 02:44, "Hans de Goede" <[email protected]>:
>> Hi,
>>
>> When upgrading my devel environment to 4.13-rc1+ I noticed that
>> the brcm43430 sdio wifi on a Chuwi Hi8 plus stopped working:
>>
>> jul 22 14:13:23 localhost.localdomain kernel: brcmfmac: brcmf_sdio_probe: Loading firmware brcm/brcmfmac43430-sdio.bin for chip 0000a9a6 rev 00000001
>> jul 22 14:13:23 localhost.localdomain kernel: usbcore: registered new interface driver brcmfmac
>> jul 22 14:13:23 localhost.localdomain kernel: brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: Aug 29 2016 20:48:16 version 7.45.41.26 (r640327) FWID 01-4527cfab
>> jul 22 14:13:23 localhost.localdomain kernel: brcmfmac: brcmf_sdio_hostmail: Unknown mailbox data content: 0x40012
>> jul 22 14:13:26 localhost.localdomain kernel: brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
>> jul 22 14:13:28 localhost.localdomain kernel: brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
>> jul 22 14:13:31 localhost.localdomain kernel: brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
>> <repeats>
>>
>> The real culprit here seems to be:
>>
>> jul 22 14:13:23 localhost.localdomain kernel: brcmfmac: brcmf_sdio_hostmail: Unknown mailbox data content: 0x40012
>>
>> I've tried reverting allmost all changes under drivers/net/wireless/broadcom/brcm80211
>> as well as those under drivers/mmc, but that did not help.
>>
>> Googling for the "Unknown mailbox data content" error found some Raspberry Pi 3
>> related comments where users report success with a different firmware version
>> from: https://android.googlesource.com/platform/hardware/broadcom/wlan/+/master/bcmdhd/firmware/bcm4343/
>>
>> So I tried that as well as a version extracted from the Android install
>> on the tablet and both work fine, only the "version 7.45.41.26" which
>> happens to be the one in linux-firmware causes this problem, I've put
>> all (Linux build, not NDIS) versions I could find here:
>>
>> http://jwrdegoede.danny.cz/brcm-firmware/
>>
>> I've the feeling that the 7.45.41.26 version is a bit buggy / suspect to
>> certain timing problems and 4.13 just happens to trigger those timing
>> conditions...
>>
>> russianneuromancer has reported seeing a similar problem with 4.13.
>>
>> russianneuromancer, can you check if the device you are seeing this with
>> also has a brcm43430 sdio wifi and if so if switching to:
>>
>> http://jwrdegoede.danny.cz/brcm-firmware/brcmfmac43430-sdio.bin.7.45.77.0.ucode1043.2054
>>
>> Fixes this ?
>>
>> Regards,
>>
>> Hans

2017-08-02 22:27:14

by [email protected]

[permalink] [raw]
Subject: Re: brcm43430 sdio wifi regression with 4.13-rc1

Hello!

Thank you for infrmation! I will check rc4 as soon as possible and will let you know.

03.08.2017, 05:06, "Arend van Spriel" <[email protected]>:
> On 02-08-17 22:43, [email protected] wrote:
>>  Hello!
>>
>>  Sorry for late answer.
>>
>>>  russianneuromancer has reported seeing a similar problem with 4.13.
>>
>>>  russianneuromancer, can you check if the device you are seeing this with
>>  also has a brcm43430 sdio wifi and if so if switching to:
>>
>>>  http://jwrdegoede.danny.cz/brcm-firmware/brcmfmac43430-sdio.bin.7.45.77.0.ucode1043.2054
>>
>>>  Fixes this ?
>>
>>  Judging by this error message
>>
>>>  [ 7.744262] brcmfmac mmc0:0001:1: Direct firmware load for brcm/brcmfmac43241b4-sdio.txt failed with error -2
>>
>>  Lenovo Miix2 8 have brcm43241b4 sdio wifi.
>>
>>  With brcmfmac43241b4-sdio.txt from NVRAM, as suggested here https://wireless.wiki.kernel.org/en/users/drivers/brcm80211 WiFi connection works for me with upstream Linux 4.12.4, but doesn't work with Linux 4.13rc1 and Linux 4.13rc3.
>
> Yeah. There are three patches currently in wireless tree, maybe also in
> netdev tree, which will probably be included in 4.13-rc4 fixing the
> issue below.
>
> Regards,
> Arend
>
>>  Few connection attempts with Linux 4.13rc3 looks like this:
>>
>>>  [ 7.779370] usbcore: registered new interface driver brcmfmac
>>>  [ 7.948487] brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: Jul 17 2013 07:36:07 version 6.10.197.71 (r412987) FWID 01-882d2634
>>>  [ 32.282374] brcmfmac: brcmf_p2p_create_p2pdev: set p2p_disc error
>>>  [ 32.282393] brcmfmac: brcmf_cfg80211_add_iface: add iface p2p-dev-wlan0 type 10 failed: err=-16
>>>  [ 43.560596] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
>>>  [ 44.494422] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
>>>  [ 45.492956] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
>>>  [ 46.491317] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
>>>  [ 54.922652] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
>>>  [ 55.849565] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
>>>  [ 56.849437] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
>>>  [ 57.853150] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
>>>  [ 66.542999] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
>>>  [ 67.483115] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
>>>  [ 68.483434] brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x0
>>
>>  23.07.2017, 02:44, "Hans de Goede" <[email protected]>:
>>>  Hi,
>>>
>>>  When upgrading my devel environment to 4.13-rc1+ I noticed that
>>>  the brcm43430 sdio wifi on a Chuwi Hi8 plus stopped working:
>>>
>>>  jul 22 14:13:23 localhost.localdomain kernel: brcmfmac: brcmf_sdio_probe: Loading firmware brcm/brcmfmac43430-sdio.bin for chip 0000a9a6 rev 00000001
>>>  jul 22 14:13:23 localhost.localdomain kernel: usbcore: registered new interface driver brcmfmac
>>>  jul 22 14:13:23 localhost.localdomain kernel: brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: Aug 29 2016 20:48:16 version 7.45.41.26 (r640327) FWID 01-4527cfab
>>>  jul 22 14:13:23 localhost.localdomain kernel: brcmfmac: brcmf_sdio_hostmail: Unknown mailbox data content: 0x40012
>>>  jul 22 14:13:26 localhost.localdomain kernel: brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
>>>  jul 22 14:13:28 localhost.localdomain kernel: brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
>>>  jul 22 14:13:31 localhost.localdomain kernel: brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
>>>  <repeats>
>>>
>>>  The real culprit here seems to be:
>>>
>>>  jul 22 14:13:23 localhost.localdomain kernel: brcmfmac: brcmf_sdio_hostmail: Unknown mailbox data content: 0x40012
>>>
>>>  I've tried reverting allmost all changes under drivers/net/wireless/broadcom/brcm80211
>>>  as well as those under drivers/mmc, but that did not help.
>>>
>>>  Googling for the "Unknown mailbox data content" error found some Raspberry Pi 3
>>>  related comments where users report success with a different firmware version
>>>  from: https://android.googlesource.com/platform/hardware/broadcom/wlan/+/master/bcmdhd/firmware/bcm4343/
>>>
>>>  So I tried that as well as a version extracted from the Android install
>>>  on the tablet and both work fine, only the "version 7.45.41.26" which
>>>  happens to be the one in linux-firmware causes this problem, I've put
>>>  all (Linux build, not NDIS) versions I could find here:
>>>
>>>  http://jwrdegoede.danny.cz/brcm-firmware/
>>>
>>>  I've the feeling that the 7.45.41.26 version is a bit buggy / suspect to
>>>  certain timing problems and 4.13 just happens to trigger those timing
>>>  conditions...
>>>
>>>  russianneuromancer has reported seeing a similar problem with 4.13.
>>>
>>>  russianneuromancer, can you check if the device you are seeing this with
>>>  also has a brcm43430 sdio wifi and if so if switching to:
>>>
>>>  http://jwrdegoede.danny.cz/brcm-firmware/brcmfmac43430-sdio.bin.7.45.77.0.ucode1043.2054
>>>
>>>  Fixes this ?
>>>
>>>  Regards,
>>>
>>>  Hans

2017-08-14 15:46:56

by Kalle Valo

[permalink] [raw]
Subject: Re: [4.13 REGRESSION] Re: brcm43430 sdio wifi regression with 4.13-rc1

Hans de Goede <[email protected]> writes:

>>> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
>>> b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
>>> index d21258d..def120c 100644
>>> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
>>> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
>>> @@ -159,8 +159,9 @@ void brcmf_feat_attach(struct brcmf_pub *drvr)
>>>
>>> brcmf_feat_firmware_capabilities(ifp);
>>> memset(&gscan_cfg, 0, sizeof(gscan_cfg));
>>> - brcmf_feat_iovar_data_set(ifp, BRCMF_FEAT_GSCAN, "pfn_gscan_cfg",
>>> - &gscan_cfg, sizeof(gscan_cfg));
>>> + if (drvr->bus_if->chip != BRCM_CC_43430_CHIP_ID)
>>> + brcmf_feat_iovar_data_set(ifp, BRCMF_FEAT_GSCAN,
>>> "pfn_gscan_cfg",
>>> + &gscan_cfg, sizeof(gscan_cfg));
>>> brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_PNO, "pfn");
>>> if (drvr->bus_if->wowl_supported)
>>> brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_WOWL, "wowl");
>>>
>
> AFAICT this is still a problem with 4.13-rc5, can we at least get
> the above workaround merged for 4.13 ?

Just applied it few hours ago:

https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers.git/commit/?id=e9bf53ab1ee34bb05c104bbfd2b77c844773f8e6

I'll try to get it to -rc6 but of course it depends on pull schedules if
it makes it or not.

--
Kalle Valo