From: "Reizer, Eyal" <eyalr@ti.com>
To: Tony Lindgren <tony@atomide.com>, Ulf Hansson <ulf.hansson@linaro.org>
Cc: Kalle Valo <kvalo@codeaurora.org>,
KISHON VIJAY ABRAHAM <kishon@ti.com>, "Mishol, Guy" <guym@ti.com>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
linux-omap <linux-omap@vger.kernel.org>,
Anders Roxell <anders.roxell@linaro.org>,
John Stultz <john.stultz@linaro.org>,
Ricardo Salveti <rsalveti@rsalveti.net>
Subject: RE: [EXTERNAL] Re: [PATCH] wlcore: Fix bringing up wlan0 again if powered down briefly
Date: Sun, 23 Dec 2018 07:38:15 +0000 [thread overview]
Message-ID: <c22e2ab61b494ea0852c0f4654fef92d@ti.com> (raw)
In-Reply-To: <20181220231401.GG6707@atomide.com>
> > > > Instead, it looks like what you need, is a way to keep track of
> > > > whether the SDIO card, became power cycled or if it stayed powered
> on,
> > > > when "ifconfig wlan0 up" is done. In case of a power cycle, you need
> > > > to re-program the firmware, right?
> > >
> > > Yeah mostly. But we also need to ensure things do get powered down
> > > properly after ifconfig wlan0 down :) IMO after ifconfig wlan0 down
> > > returns, there should be no waiting needed.
> > >
> > > > Would it be possible to re-program the firmware, even if the SDIO card
> > > > stayed powered-on?
> > >
> > > That might help for some cases, but the problem of how to ensure the
> > > card is powered down after ifconfig wlan0 down returns still exists.
> >
> > Well, does the SDIO card really have to be powered down before
> > "ifconfig wlan0 down" returns? If so, why?
>
> Good question. Eyal, any comments what should happen here from
> the wlcore hardware point of view?
>
You are ok as long as the wlan_enable pin Does go down for a sufficient amount of time
turning the wl18xx device off.
The firmware can only be downloaded once after power on.
In between down/up you have to make sure the wlan_enable is fully going through on->off->on
and the wl18xx device is fully reset.
On power on the firmware is loaded by the driver and this will fail in case the reset didn't happen
.
> > An option would be to call pm_runtime_get_sync() at "ifconfig wlan0
> > up" (I assume you already do that) and then re-program the firmware,
> > even if the card hasn't been power cycled. Wouldn't that work?
>
No, this wouldn't work in case the wlan_enable pin didn't reset the chip as part of the
"ifconfig wlan0 down" Command.
> Ricardo, care to test and see if the problem comes back if you
> keep PM runtime enabled?
>
> > Or perhaps this is the problem you are encountering, that the FW can't
> > be reprogrammed, unless the card has been power cycled? You can easily
> > test that, by simply bumping the runtime usage count for the card
> > device via sysfs, before doing the "ifconfig wlan0 up/down" thingy.
>
Correct. The firmware can't be reprogrammed , unless the card has been power cycled.
> Ricardo, care to play with this too?
>
Best Regards,
Eyal
next prev parent reply other threads:[~2018-12-23 7:38 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-17 16:42 [PATCH] wlcore: Fix bringing up wlan0 again if powered down briefly Tony Lindgren
2018-12-18 1:06 ` Ricardo Salveti
2018-12-18 12:34 ` Ulf Hansson
2018-12-18 15:54 ` Tony Lindgren
2018-12-20 10:14 ` Ulf Hansson
2018-12-20 23:14 ` Tony Lindgren
2018-12-23 7:38 ` Reizer, Eyal [this message]
2018-12-23 16:02 ` [EXTERNAL] " Tony Lindgren
2018-12-28 11:01 ` Ulf Hansson
2018-12-28 19:59 ` Tony Lindgren
2019-01-02 12:01 ` Ulf Hansson
2019-01-07 15:18 ` Tony Lindgren
2019-01-07 16:12 ` Kalle Valo
2019-01-14 13:47 ` Ulf Hansson
2018-12-28 9:48 ` Ulf Hansson
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=c22e2ab61b494ea0852c0f4654fef92d@ti.com \
--to=eyalr@ti.com \
--cc=anders.roxell@linaro.org \
--cc=guym@ti.com \
--cc=john.stultz@linaro.org \
--cc=kishon@ti.com \
--cc=kvalo@codeaurora.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=rsalveti@rsalveti.net \
--cc=tony@atomide.com \
--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;
as well as URLs for NNTP newsgroup(s).