diff mbox

brcm43430 sdio wifi regression with 4.13-rc1

Message ID 9e616361-da87-6f46-8ee3-4a4f673c3c80@broadcom.com (mailing list archive)
State RFC
Delegated to: Kalle Valo
Headers show

Commit Message

Arend van Spriel July 22, 2017, 7:53 p.m. UTC
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
---
                brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_WOWL, "wowl");

Comments

James Hughes July 22, 2017, 8:30 p.m. UTC | #1
On 22 July 2017 at 20:53, Arend van Spriel <arend.vanspriel@broadcom.com> 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.
Hans de Goede July 23, 2017, 7:08 a.m. UTC | #2
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");
>
James Hughes July 24, 2017, 8:36 a.m. UTC | #3
On 23 July 2017 at 08:08, Hans de Goede <hdegoede@redhat.com> 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
Hans de Goede Aug. 14, 2017, 3:20 p.m. UTC | #4
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
Kalle Valo Aug. 14, 2017, 3:46 p.m. UTC | #5
Hans de Goede <hdegoede@redhat.com> 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.
Hans de Goede Aug. 14, 2017, 5:25 p.m. UTC | #6
Hi,

On 14-08-17 17:46, Kalle Valo wrote:
> Hans de Goede <hdegoede@redhat.com> 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
diff mbox

Patch

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)