Netdev List
 help / color / mirror / Atom feed
From: Daniel Mack <daniel@zonque.org>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Chris Ball <chris@printf.net>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	"libertas-dev@lists.infradead.org"
	<libertas-dev@lists.infradead.org>,
	linux-wireless@vger.kernel.org,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: Suspend of SDIO function devices
Date: Tue, 26 Jun 2018 22:34:39 +0200	[thread overview]
Message-ID: <fcec2b1b-e2ab-3404-d958-b62d6d91583a@zonque.org> (raw)
In-Reply-To: <CAPDyKFrgcFrah34+eFMsBQYWr03bTSMMUuYw61jYfpffSQrQAg@mail.gmail.com>

Hi Ulf,

Thanks for the prompt reply!

On Monday, June 25, 2018 05:00 PM, Ulf Hansson wrote:
> On 24 June 2018 at 22:46, Daniel Mack <daniel@zonque.org> wrote:
>> Please advise, I'm happy to test approaches and send patches.
> 
>  From a top level point of view, I think this needs to be changed:
> 
> 1)
> In cases when the libertas sdio driver's ->suspend() callback, thinks
> of returning -ENOSYS, it should instead call if_sdio_power_off().
> Depending if if_sdio_power_save() has already been called, this shall
> be skipped.
> 
> The important thing here is to disable the SDIO func device and to
> release the SDIO irq.
> 
> 2)
> During resume, depending on whether the earlier ->suspend() callback
> invoked if_sdio_power_off(),  libertas sdio driver's ->resume()
> callback should call if_sdio_power_on().
> 
> This should re-initiate the libertas sdio device and re-program the
> firmware. To complete these actions, the firmware file also needs to
> be fetched, which requires file system accesses also to be resumed.
> 
> We also need to wait for the firmware programming to be completed,
> hence also do a "wait_event(card->pwron_waitq, priv->fw_ready);" from
> somewhere.

Great, thanks, that helped a lot! I have something that does the job ob 
my board. Will send out a patch shortly.


Best regards,
Daniel

      reply	other threads:[~2018-06-26 20:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-24 20:46 Suspend of SDIO function devices Daniel Mack
2018-06-25 15:00 ` Ulf Hansson
2018-06-26 20:34   ` Daniel Mack [this message]

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=fcec2b1b-e2ab-3404-d958-b62d6d91583a@zonque.org \
    --to=daniel@zonque.org \
    --cc=chris@printf.net \
    --cc=libertas-dev@lists.infradead.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=ulf.hansson@linaro.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