diff mbox

brcmfmac not working on ECS LIVA

Message ID 54633939.6000400@broadcom.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Arend van Spriel Nov. 12, 2014, 10:40 a.m. UTC
On 11-11-14 23:32, Felipe Contreras wrote:
> On Sun, Nov 9, 2014 at 4:46 AM, Arend van Spriel <arend@broadcom.com> wrote:
> 
>> Could you share the nvram obtained from EFI? Also please create a kernel log
>> with debug=0xd416.
> 
> There you go:
> http://people.freedesktop.org/~felipec/dmesg-brcm.txt
> 

It is using the sdhci-acpi driver for the sdio host controller. If I am
not mistaken that one does runtime-pm. This has caused issues with our
device. This is what happens:

1. driver sends control message and waits for firmware response.
 2. runtime pm kicks in and suspends host controller.
  3. host controller suspend disable sdio clock.
   4. host controller does not detect firmware interrupt for response.
    5. control message times out.

You can disable it through sysfs, but the patch below may do it.

Regards,
Arend

         */

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Felipe Contreras Nov. 12, 2014, 3:23 p.m. UTC | #1
On Wed, Nov 12, 2014 at 4:40 AM, Arend van Spriel <arend@broadcom.com> wrote:
> On 11-11-14 23:32, Felipe Contreras wrote:
>> On Sun, Nov 9, 2014 at 4:46 AM, Arend van Spriel <arend@broadcom.com> wrote:
>>
>>> Could you share the nvram obtained from EFI? Also please create a kernel log
>>> with debug=0xd416.
>>
>> There you go:
>> http://people.freedesktop.org/~felipec/dmesg-brcm.txt
>>
>
> It is using the sdhci-acpi driver for the sdio host controller. If I am
> not mistaken that one does runtime-pm. This has caused issues with our
> device. This is what happens:
>
> 1. driver sends control message and waits for firmware response.
>  2. runtime pm kicks in and suspends host controller.
>   3. host controller suspend disable sdio clock.
>    4. host controller does not detect firmware interrupt for response.
>     5. control message times out.
>
> You can disable it through sysfs, but the patch below may do it.

I tried this patch, and although it seems to make a difference, it
still doesn't work.

http://people.freedesktop.org/~felipec/dmesg-brcm-2.txt
Arend van Spriel Nov. 13, 2014, 10:47 a.m. UTC | #2
On 12-11-14 16:23, Felipe Contreras wrote:
> On Wed, Nov 12, 2014 at 4:40 AM, Arend van Spriel <arend@broadcom.com> wrote:
>> On 11-11-14 23:32, Felipe Contreras wrote:
>>> On Sun, Nov 9, 2014 at 4:46 AM, Arend van Spriel <arend@broadcom.com> wrote:
>>>
>>>> Could you share the nvram obtained from EFI? Also please create a kernel log
>>>> with debug=0xd416.
>>>
>>> There you go:
>>> http://people.freedesktop.org/~felipec/dmesg-brcm.txt
>>>
>>
>> It is using the sdhci-acpi driver for the sdio host controller. If I am
>> not mistaken that one does runtime-pm. This has caused issues with our
>> device. This is what happens:
>>
>> 1. driver sends control message and waits for firmware response.
>>  2. runtime pm kicks in and suspends host controller.
>>   3. host controller suspend disable sdio clock.
>>    4. host controller does not detect firmware interrupt for response.
>>     5. control message times out.
>>
>> You can disable it through sysfs, but the patch below may do it.
> 
> I tried this patch, and although it seems to make a difference, it
> still doesn't work.
> 
> http://people.freedesktop.org/~felipec/dmesg-brcm-2.txt

Hi Felipe,

All the messages to the firmware seem ok. If connection would succeed I
normally see a LINK event followed by SET_SSID event. In your log I only
see the SET_SSID event with failed status, hence the connect is
unsuccessful. Do you have any control over the AP? Could you try without
WPA security to quickly confirm connection works? May help in root
causing the issue.

Regards,
Arend

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Felipe Contreras Nov. 14, 2014, 5:03 p.m. UTC | #3
On Thu, Nov 13, 2014 at 4:47 AM, Arend van Spriel <arend@broadcom.com> wrote:
> On 12-11-14 16:23, Felipe Contreras wrote:
>> On Wed, Nov 12, 2014 at 4:40 AM, Arend van Spriel <arend@broadcom.com> wrote:

>> I tried this patch, and although it seems to make a difference, it
>> still doesn't work.
>>
>> http://people.freedesktop.org/~felipec/dmesg-brcm-2.txt
>
> Hi Felipe,
>
> All the messages to the firmware seem ok. If connection would succeed I
> normally see a LINK event followed by SET_SSID event. In your log I only
> see the SET_SSID event with failed status, hence the connect is
> unsuccessful. Do you have any control over the AP? Could you try without
> WPA security to quickly confirm connection works? May help in root
> causing the issue.

I tried disabled WPA security, it's still not working.
Arend van Spriel Nov. 14, 2014, 7:30 p.m. UTC | #4
On 11/14/14 18:03, Felipe Contreras wrote:
> On Thu, Nov 13, 2014 at 4:47 AM, Arend van Spriel<arend@broadcom.com>  wrote:
>> On 12-11-14 16:23, Felipe Contreras wrote:
>>> On Wed, Nov 12, 2014 at 4:40 AM, Arend van Spriel<arend@broadcom.com>  wrote:
>
>>> I tried this patch, and although it seems to make a difference, it
>>> still doesn't work.
>>>
>>> http://people.freedesktop.org/~felipec/dmesg-brcm-2.txt
>>
>> Hi Felipe,
>>
>> All the messages to the firmware seem ok. If connection would succeed I
>> normally see a LINK event followed by SET_SSID event. In your log I only
>> see the SET_SSID event with failed status, hence the connect is
>> unsuccessful. Do you have any control over the AP? Could you try without
>> WPA security to quickly confirm connection works? May help in root
>> causing the issue.
>
> I tried disabled WPA security, it's still not working.

Thanks, Felipe

Could you check the runtime-pm for mmc1 controller. You need to find 
sdhci-acpi driver in sysfs. I think it is under 
/sys/bus/platform/drivers. One of the bound devices is mmc1 (although 
probably will have different nameing there) and there is subfolder power 
with file named control. Can you cat that file and do 'echo on > 
control' if it says auto.

Regards,
Arend

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
b/drivers/net/wire
index f754ffc..d231e65 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
@@ -27,6 +27,7 @@ 
 #include <linux/mmc/sdio_func.h>
 #include <linux/mmc/card.h>
 #include <linux/mmc/host.h>
+#include <linux/pm_runtime.h>
 #include <linux/platform_device.h>
 #include <linux/platform_data/brcmfmac-sdio.h>
 #include <linux/suspend.h>
@@ -976,6 +977,12 @@  static int brcmf_sdiod_probe(struct brcmf_sdio_dev
*sdiodev
                                           SG_MAX_SINGLE_ALLOC);
        sdiodev->max_segment_size = host->max_seg_size;

+       /*
+        * Several issues with the driver seem to occur when the SDIO host
+        * is using runtime-pm. Prevent host from doing runtime-pm here.
+        */
+       __pm_runtime_use_autosuspend(&host->class_dev, false);
+
        /* allocate scatter-gather table. sg support
         * will be disabled upon allocation failure.