linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bing Zhao <bzhao@marvell.com>
To: "quozl@laptop.org" <quozl@laptop.org>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: RE: [RFC] mwifiex: block work queue while suspended
Date: Tue, 27 May 2014 16:39:07 -0700	[thread overview]
Message-ID: <477F20668A386D41ADCC57781B1F70430F70F5E39F@SC-VEXCH1.marvell.com> (raw)
In-Reply-To: <20140526080110.GJ6118@us.netrek.org>

Hi James,

> > To understand what is happening here could you apply attached debug
> > patch to generate logs, or enable dynamic_debug for that?
> 
> Here's a dynamic_debug log.
> 
> Note the point of failure is the "mmc0: Timeout waiting for hardware
> interrupt." message, which occurs in the driver SDIO interrupt
> function, which began execution in a critical time period after driver
> suspend but before platform suspend.
> 
> We use a GPIO to wake from WLAN.

This doesn't match the gpio parameter configured in hscfg command 0xe5.
 
> 
> May 26 07:44:33 xo-96-6d-f4 kernel: [  188.090061] Freezing remaining freezable tasks ... (elapsed
> 0.01 seconds) done.
> May 26 07:44:33 xo-96-6d-f4 kernel: [  188.113049] Suspending console(s) (use no_console_suspend to
> debug)

[...]

> May 26 07:44:33 xo-96-6d-f4 kernel: [  188.304049] mwifiex_sdio: cmd: mmc0:0001:1: suspend: PM flag =
> 0x3
> May 26 07:44:33 xo-96-6d-f4 kernel: [  188.304049] mwifiex_sdio mmc0:0001:1: cmd: HS_CFG_CMD:
> condition:0xa gpio:0xff gap:0xff

gpio:0xff --> This configures firmware to use SDIO interface to wake up host.
Could you change the gpio parameter to the actual GPIO pin number (from 8787 point of view)?

> May 26 07:44:33 xo-96-6d-f4 kernel: [  188.304072] mwifiex_sdio mmc0:0001:1: cmd: QUEUE_CMD: cmd=0xe5,
> cmd_pending=1
> May 26 07:44:33 xo-96-6d-f4 kernel: [  188.304083] mwifiex_sdio mmc0:0001:1: cmd: DNLD_CMD:
> (1401090251.944017): 0xe5, act 0x1, len 16, seqno 0x5f

[...]

> May 26 07:44:33 xo-96-6d-f4 kernel: [  188.304886] mwifiex_sdio mmc0:0001:1: event: hs_activated
> May 26 07:44:33 xo-96-6d-f4 kernel: [  188.304903] mwifiex_sdio mmc0:0001:1: cmd: FREE_CMD: cmd=0xe5,
> cmd_pending=0
> May 26 07:44:33 xo-96-6d-f4 kernel: [  188.304907] mwifiex_sdio: cmd: suspend with
> MMC_PM_KEEP_POWER|MMC_PM_WAKE_SDIO_IRQ
> May 26 07:44:33 xo-96-6d-f4 kernel: [  188.307736] mmc0: keeping power over suspend
> May 26 07:44:33 xo-96-6d-f4 kernel: [  188.307736] sdhci_wakeup_irq
> May 26 07:44:33 xo-96-6d-f4 kernel: [  188.307749] sdhci_wakeup_irq
> May 26 07:44:33 xo-96-6d-f4 kernel: [  188.307749] sdhci_wakeup_irq
> May 26 07:44:33 xo-96-6d-f4 kernel: [  188.307751] sdhci_wakeup_irq
> May 26 07:44:33 xo-96-6d-f4 kernel: [  188.307753] [galcore] enter gpu_suspend
> May 26 07:44:33 xo-96-6d-f4 kernel: [  188.307793] [galcore] exit gpu_suspend, return 0
> May 26 07:44:33 xo-96-6d-f4 kernel: [  188.307859] PM: suspend of devices complete after 194.744
> msecs
> May 26 07:44:33 xo-96-6d-f4 kernel: [  188.320018] olpc_ec_1_75_suspend: suspend sync 0000001f
> May 26 07:44:33 xo-96-6d-f4 kernel: [  188.340038] PM: late suspend of devices complete after 32.172
> msecs
> May 26 07:44:33 xo-96-6d-f4 kernel: [  188.340307] PM: noirq suspend of devices complete after 0.263
> msecs
> May 26 07:44:33 xo-96-6d-f4 kernel: [  188.340417] mmp3_pm_enter_d2
> May 26 07:44:33 xo-96-6d-f4 kernel: [  188.340417] before suspend
> May 26 07:44:33 xo-96-6d-f4 kernel: [  188.340430] after resume
> May 26 07:44:33 xo-96-6d-f4 kernel: [  188.372814] PM: noirq resume of devices complete after 0.098
> msecs
> May 26 07:44:33 xo-96-6d-f4 kernel: [  188.391862] PM: early resume of devices complete after 18.934
> msecs
> May 26 07:44:33 xo-96-6d-f4 kernel: [  188.391873] [galcore] enter gpu_resume
> May 26 07:44:33 xo-96-6d-f4 kernel: [  188.396056] [galcore] exit gpu_resume, return 0
> May 26 07:44:33 xo-96-6d-f4 kernel: [  188.396056] sdhci_wakeup_irq
> May 26 07:44:33 xo-96-6d-f4 kernel: [  188.396070] sdhci_wakeup_irq
> May 26 07:44:33 xo-96-6d-f4 kernel: [  188.396072] sdhci_wakeup_irq
> May 26 07:44:33 xo-96-6d-f4 kernel: [  188.396074] sdhci_wakeup_irq
> May 26 07:44:33 xo-96-6d-f4 kernel: [  198.341764] mmc0: Timeout waiting for hardware interrupt.
> May 26 07:44:33 xo-96-6d-f4 kernel: [  198.341784] mwifiex_sdio mmc0:0001:1: read mp_regs failed

I was expecting that mwifiex_sdio_resume handler is called before the SDIO interrupt function is called.

> May 26 07:44:33 xo-96-6d-f4 kernel: [  198.341909] mwifiex_sdio mmc0:0001:1: cmd: HS_CFG_CMD:
> condition:0xffffffff gpio:0xff gap:0xff
> May 26 07:44:33 xo-96-6d-f4 kernel: [  198.341909] mwifiex_sdio mmc0:0001:1: cmd: QUEUE_CMD: cmd=0xe5,
> cmd_pending=1
> May 26 07:44:33 xo-96-6d-f4 kernel: [  198.341947] mwifiex_sdio mmc0:0001:1: cmd: DNLD_CMD:
> (1401090261.950120): 0xe5, act 0x1, len 16, seqno 0x61

Thanks,
Bing


  reply	other threads:[~2014-05-27 23:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-16  1:24 [RFC] mwifiex: block work queue while suspended James Cameron
2014-05-22  3:50 ` Bing Zhao
2014-05-22  5:46   ` James Cameron
2014-05-23  4:12     ` Bing Zhao
2014-05-26  8:01   ` James Cameron
2014-05-27 23:39     ` Bing Zhao [this message]
2014-05-28  2:01       ` James Cameron
2014-05-28  4:35         ` Bing Zhao
2014-05-28  4:49           ` James Cameron
2014-05-28  5:04             ` Bing Zhao
2014-05-29  1:22       ` James Cameron
2014-05-29  2:10         ` Bing Zhao

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=477F20668A386D41ADCC57781B1F70430F70F5E39F@SC-VEXCH1.marvell.com \
    --to=bzhao@marvell.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=quozl@laptop.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).