linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Reizer, Eyal" <eyalr@ti.com>
To: Ricardo Salveti <rsalveti@rsalveti.net>,
	Tony Lindgren <tony@atomide.com>
Cc: John Stultz <john.stultz@linaro.org>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"anders.roxell@linaro.org" <anders.roxell@linaro.org>
Subject: RE: [EXTERNAL] Re: wlcore getting stuck on hikey after the runtime PM autosuspend support change
Date: Thu, 13 Dec 2018 07:49:23 +0000	[thread overview]
Message-ID: <9060b4655e064665a1812d9fae00f1ec@ti.com> (raw)
In-Reply-To: <CAHYQr0ojkf3CvFb_zuEK4Vuz1w-rm9Sb=+dk5BkqYkWoxy8+aQ@mail.gmail.com>

> > > I Just tried on an available am335x-evm using 4.20.0-rc1 which I believe
> has all the patches merged already.
> > > I am using the same script  and not seeing any failure yet.
> > > See below:
> > >
> > > root@am335x-evm:/usr/share/wl18xx# uname -r
> > > 4.20.0-rc1-11287-gf487c00
> > > root@am335x-evm:/usr/share/wl18xx#
> > > root@am335x-evm:/usr/share/wl18xx#
> > > root@am335x-evm:/usr/share/wl18xx#
> > > root@am335x-evm:/usr/share/wl18xx#
> > > root@am335x-evm:/usr/share/wl18xx# while true; do ifconfig wlan0
> down; ifconfig wlan0 up; done;
> > > [1378786.491101] wlcore: down
> > > [1378787.093006] wlcore: PHY firmware version: Rev 8.2.0.0.242
> > > [1378787.168523] wlcore: firmware booted (Rev 8.9.0.1.79)
> > > [1378787.215897] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not
> ready
> > ...
> >
> > Yeah I was seeing the same yesterday when I tried it.
> >
> > Could it be that there needs to be a little msleep() after
> > loading the firmware on some platforms and before enabling
> > PM runtime?
> 
> The issue I'm having seems to happen when trying to load the firmware,
> getting stuck in mmc_wait_for_req_done -> wait_for_completion, so the
> firmware is never really fully loaded when the hang happens.
> 
When the interface is brought up the wlan_renable gpio comes up (enabled) and turning the wl18xx device on.
It might be that what happens here is that the chip is not yet enabled when the first sdio command is started causing a timeout.
There is normally a delay associated with the fixed voltage regulator that is tied to this gpio and used for disable/enable (startup-delay-us).

Similar to this:
/ {
	model = "TI AM335x BeagleBone Black Wireless";
	compatible = "ti,am335x-bone-black-wireless", "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx";

	wlan_en_reg: fixedregulator@2 {
...
...
		startup-delay-us= <70000>;

		/* WL_EN */
		gpio = <&gpio3 9 0>;
		enable-active-high;
	};
};

Perhaps, as a debug step, try to add a delay in "wl12xx_sdio_power_on":
https://github.com/torvalds/linux/blob/master/drivers/net/wireless/ti/wlcore/sdio.c

and see if it makes a change?

Best Regards,
Eyal


  reply	other threads:[~2018-12-13  7:49 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-11 18:06 wlcore getting stuck on hikey after the runtime PM autosuspend support change Ricardo Salveti
2018-12-11 18:19 ` Tony Lindgren
2018-12-11 18:52   ` Ricardo Salveti
2018-12-11 19:01     ` Tony Lindgren
2018-12-11 19:25       ` Ricardo Salveti
2018-12-11 19:50         ` John Stultz
2018-12-11 20:12           ` Tony Lindgren
2018-12-11 20:23             ` Ricardo Salveti
2018-12-11 20:44               ` Ricardo Salveti
2018-12-12  1:45                 ` Tony Lindgren
2018-12-12  7:27                   ` [EXTERNAL] " Reizer, Eyal
2018-12-12 18:31                     ` Tony Lindgren
2018-12-12 19:24                       ` Ricardo Salveti
2018-12-13  7:49                         ` Reizer, Eyal [this message]
2018-12-13 13:52                           ` Ricardo Salveti
2018-12-13 14:45                             ` Tony Lindgren
2018-12-13 14:53                               ` Reizer, Eyal
2018-12-13 14:55                                 ` Ricardo Salveti
2018-12-14 20:41                               ` Ricardo Salveti
2018-12-14 23:28                                 ` Tony Lindgren
2018-12-15  3:37                                   ` Ricardo Salveti
2018-12-17 14:45                                     ` Tony Lindgren
2018-12-12 19:16                     ` Ricardo Salveti
2018-12-11 21:50               ` Ricardo Salveti
2018-12-11 23:44                 ` Anders Roxell
2018-12-12 18:33                   ` Tony Lindgren
2018-12-17  9:36                     ` Anders Roxell
2018-12-12  1:25                 ` Tony Lindgren
2018-12-12 19:20                   ` Ricardo Salveti
2018-12-11 19:13 ` John Stultz

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=9060b4655e064665a1812d9fae00f1ec@ti.com \
    --to=eyalr@ti.com \
    --cc=anders.roxell@linaro.org \
    --cc=john.stultz@linaro.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=rsalveti@rsalveti.net \
    --cc=tony@atomide.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 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).