From: Sascha Silbe <sascha-ml-linux-kernel-libertas-dev@silbe.org>
To: Kiran Divekar <dkiran@marvell.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"libertas-dev@lists.infradead.org"
<libertas-dev@lists.infradead.org>
Subject: Re: [PATCH v2] Libertas: Added callback functions to support SDIO suspend/resume.
Date: Thu, 13 May 2010 11:20:14 +0200 [thread overview]
Message-ID: <20100513092013.GA22652@twin.sascha.silbe.org> (raw)
In-Reply-To: <25B60CDC2F704E4E9D88FFD52780CB4C04D61E8CF1@SC-VEXCH1.marvell.com>
[-- Attachment #1: Type: text/plain, Size: 2752 bytes --]
On Wed, May 12, 2010 at 10:07:55PM -0700, Kiran Divekar wrote:
> In suspend() host sleep is activated using already configured
> host sleep parameters through wol command, and in resume() host
> sleep is cancelled. Earlier priv->fw_ready flag used to reset and
> set in suspend and resume handler respectively. Since after suspend
> only host goes into sleep state and firmware is always ready, those
> changes in flag state are removed.
This patch looks a lot like the one that broke suspend on XO-1. I see
you've made changes that affect this, but it doesn't seem to be actually
fixed; see my comment on if_usb_suspend() below.
> diff --git a/drivers/net/wireless/libertas/if_sdio.c
> b/drivers/net/wireless/libertas/if_sdio.c
> index 64dd345..6b1048b 100644
> --- a/drivers/net/wireless/libertas/if_sdio.c
> +++ b/drivers/net/wireless/libertas/if_sdio.c
[if_sdio_suspend()]
> + if (card->priv->wol_criteria == 0xffffffff) {
For consistency, the literal value should be replaced with
EHS_REMOVE_WAKEUP.
> + lbs_pr_info("Suspend without wake params -- "
> + "powering down card.");
So with "ethtool eth0 d" an SDIO-connected libertas chip will get
powered down during suspend? OK.
> diff --git a/drivers/net/wireless/libertas/if_usb.c
> b/drivers/net/wireless/libertas/if_usb.c
> index fcea574..e7a483c 100644
> --- a/drivers/net/wireless/libertas/if_usb.c
> +++ b/drivers/net/wireless/libertas/if_usb.c
[if_usb_suspend()]
> + if (priv->wol_criteria == 0xffffffff) {
Again, s/0xffffffff/EHS_REMOVE_WAKEUP/.
> + lbs_pr_info("Suspend attempt without "
> + "configuring wake params!\n");
> + return -ENOSYS;
> + }
AFAICT this would cause a USB-connected libertas chip with WOL disabled
("ethtool eth0 d") to prevent suspend, instead of just powering down
like an SDIO-connected chip. So instead of failing during
lbs_host_sleep_cfg() because the 8388 doesn't support EHS_REMOVE_WAKEUP,
you just bail out earlier, still breaking suspend.
> diff --git a/drivers/net/wireless/libertas/main.c
> b/drivers/net/wireless/libertas/main.c
> index d35ebca..dcbff80 100644
> --- a/drivers/net/wireless/libertas/main.c
> +++ b/drivers/net/wireless/libertas/main.c
[lbs_resume()]
> + priv->wol_criteria |= EHS_REMOVE_WAKEUP;
This resets an ethtool-set WOL policy on each resume, requiring user
space to call ethtool before every suspend (not just once during
startup). I still don't understand why we do that (I'd expect anything
set by user space to be active until re-set by user space), but I've
been told it has been this way before (i.e. your patch doesn't change
the behaviour).
CU Sascha
--
http://sascha.silbe.org/
http://www.infra-silbe.de/
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
next prev parent reply other threads:[~2010-05-13 9:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-13 5:07 [PATCH v2] Libertas: Added callback functions to support SDIO suspend/resume Kiran Divekar
2010-05-13 9:20 ` Sascha Silbe [this message]
2010-05-14 8:43 ` Amitkumar Karwar
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=20100513092013.GA22652@twin.sascha.silbe.org \
--to=sascha-ml-linux-kernel-libertas-dev@silbe.org \
--cc=dkiran@marvell.com \
--cc=libertas-dev@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=sascha-ml-reply-to-2010-2@silbe.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