All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arend van Spriel <arend.vanspriel@broadcom.com>
To: Amitkumar Karwar <amitkarwar@gmail.com>,
	Souptick Joarder <jrdr.linux@gmail.com>
Cc: Kalle Valo <kvalo@codeaurora.org>,
	linux-wireless <linux-wireless@vger.kernel.org>,
	Amitkumar Karwar <amit.karwar@redpinesignals.com>,
	Prameela Rani Garnepudi <prameela.j04cs@gmail.com>,
	Karun Eagalapati <karun256@gmail.com>
Subject: Re: [v2] rsi: sdio suspend and resume support
Date: Fri, 22 Sep 2017 11:03:02 +0200	[thread overview]
Message-ID: <59C4D1C6.1040601@broadcom.com> (raw)
In-Reply-To: <CAEhWJF=eTwUA59VZBoPhxsBvpCm2eM_j1An--Ce_d0XLt8uVFw@mail.gmail.com>

On 9/21/2017 4:32 PM, Amitkumar Karwar wrote:
> On Thu, Sep 21, 2017 at 7:08 PM, Souptick Joarder <jrdr.linux@gmail.com> wrote:
>> On Thu, Sep 21, 2017 at 6:21 PM, Amitkumar Karwar <amitkarwar@gmail.com> wrote:
>>> From: Karun Eagalapati <karun256@gmail.com>
>>>
>>> SDIO suspend and resume handlers are implemented and verified
>>> that device works after suspend/resume cycle.
>>>
>>> Signed-off-by: Karun Eagalapati <karun256@gmail.com>
>>> Signed-off-by: Amitkumar Karwar <amit.karwar@redpinesignals.com>
>>> ---
>>> v2: Replaced never ending while loop with 20msecs loop(Kalle Valo)
>>> ---
>>>   drivers/net/wireless/rsi/rsi_91x_sdio.c | 128 +++++++++++++++++++++++++++++++-
>>>   drivers/net/wireless/rsi/rsi_sdio.h     |   2 +
>>>   2 files changed, 126 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/drivers/net/wireless/rsi/rsi_91x_sdio.c b/drivers/net/wireless/rsi/rsi_91x_sdio.c
>>> index 8d3a483..b3f8006 100644
>>> --- a/drivers/net/wireless/rsi/rsi_91x_sdio.c
>>> +++ b/drivers/net/wireless/rsi/rsi_91x_sdio.c
>>> @@ -1059,16 +1059,136 @@ static void rsi_disconnect(struct sdio_func *pfunction)

[...]

>>>   static int rsi_suspend(struct device *dev)
>>>   {
>>> -       /* Not yet implemented */
>>> -       return -ENOSYS;
>>> +       int ret;
>>> +       struct sdio_func *pfunction = dev_to_sdio_func(dev);
>>> +       struct rsi_hw *adapter = sdio_get_drvdata(pfunction);
>>> +       struct rsi_common *common;
>>> +
>>> +       if (!adapter) {
>>> +               rsi_dbg(ERR_ZONE, "Device is not ready\n");
>>> +               return -ENODEV;
>>> +       }
>>> +       common = adapter->priv;
>>> +       rsi_sdio_disable_interrupts(pfunction);
>>> +
>>> +       ret = rsi_set_sdio_pm_caps(adapter);
>>> +       if (ret)
>>> +               rsi_dbg(INFO_ZONE,
>>> +                       "Setting power management caps failed\n");
>>> +       common->fsm_state = FSM_CARD_NOT_READY;
>>> +
>>> +       return 0;
>>
>> I think it should be return ret if rsi_set_sdio_pm_caps() fails.
>
> This is intentional. We don't want to return error and abort system
> suspend operation due to this.

Has it been verified that powering down the SDIO bus during the suspend 
works for you device. In other words  does the claim in the commit 
message apply to a sdio host controller not supporting the KEEP_POWER 
flag as well?

Regards,
Arend

  reply	other threads:[~2017-09-22  9:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-21 12:51 [v2] rsi: sdio suspend and resume support Amitkumar Karwar
2017-09-21 13:38 ` Souptick Joarder
2017-09-21 14:32   ` Amitkumar Karwar
2017-09-22  9:03     ` Arend van Spriel [this message]
2017-09-22 11:50       ` Amitkumar Karwar
2017-09-25  8:26 ` Kalle Valo

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=59C4D1C6.1040601@broadcom.com \
    --to=arend.vanspriel@broadcom.com \
    --cc=amit.karwar@redpinesignals.com \
    --cc=amitkarwar@gmail.com \
    --cc=jrdr.linux@gmail.com \
    --cc=karun256@gmail.com \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=prameela.j04cs@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.