From: Stanislaw Gruszka <sgruszka@redhat.com>
To: Craig McQueen <craig.mcqueen@innerrange.com.au>
Cc: linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: rt2800usb firmware rt2870.bin 0.36 not scanning
Date: Thu, 14 Dec 2017 13:47:12 +0100 [thread overview]
Message-ID: <20171214124712.GA2737@redhat.com> (raw)
In-Reply-To: <17dbd0476f1e45c7af0cb70efb15d75f@innerrange.com.au>
On Wed, Dec 13, 2017 at 11:24:28PM +0000, Craig McQueen wrote:
> > Actually, I was wrong. With the 3.14.x Yocto-built kernel, this no-scan issue
> > only happens with the Edup with the 5390 chipset, and the D-Link is fine.
> >
> > But further testing with the 4.4.12 Yocto-built kernel shows that it randomly
> > sometimes happens and sometimes doesn't with either the Edup or D-Link
> > devices. That's especially interesting, because it suggests that there may be a
> > race condition happening during the driver initialisation code (called from
> > rt2x00lib_start()). At first I thought it was a race condition between the calls
> > to rt2x00lib_load_firmware() and rt2x00lib_initialize(), but adding a time
> > delay between those calls didn't help.
> >
> > I'm wondering what the difference is between the two chipsets, so that the
> > problem happens more on one chipset than the other. But not exclusively, as
> > I mentioned above, so again, this points to a marginal timing issue that
> > affects one more than the other.
> >
> > > With the Ubuntu 4.4.6 kernel, both devices work fine, without this
> > > no-scan problem.
> > > ...
>
> Now I'm using a 4.9.65 kernel, and this problem is still present. When the USB Wi-Fi dongle is plugged in, it just doesn't do anything -- doesn't scan for Wi-Fi networks, doesn't connect to anything.
>
> My project is using ConnMan, so I've patched ConnMan so that it takes the device up, then down, then up again. Then it reliably works. But of course this is an ugly hack.
>
> Based on my initial investigation, my hypothesis was that there's a race condition during rt2x00lib_start() in rt2x00dev.c. At first I thought it was between firmware loading and initialisation. But adding a time delay between the calls to rt2x00lib_load_firmware() and rt2x00lib_initialize() didn't help. Adding time delays at many possible points in the initialisation didn't seem to help. I thought there must be a race condition in a very specific location in the initialisation sequence, but could not confirm that hypothesis. So now I've drawn a blank.
>
> Any advice on how to diagnose and remedy this issue?
I know the vendor driver do initialization sequence twice - after
finish first sequence the same steps are repeated second time.
I don't know why that is needed and on all my Ralink USB devices
one initialization sequence is sufficient with rt2x00 driver.
Right fix to this will be found proper initialization sequence,
so second step will not be needed, but perhaps this is firmware
problem. Anyway ConnMan patch seems to be a good solution
as well ;-)
Cheers
Stanislaw
next prev parent reply other threads:[~2017-12-14 12:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-04 17:22 rt2800usb firmware rt2870.bin 0.36 not scanning Xose Vazquez Perez
2016-06-09 2:47 ` Craig McQueen
2016-06-15 4:02 ` Craig McQueen
2016-06-16 23:37 ` Craig McQueen
2016-06-23 6:58 ` Craig McQueen
2017-12-13 23:24 ` Craig McQueen
2017-12-14 12:47 ` Stanislaw Gruszka [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-06-03 6:28 Craig McQueen
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=20171214124712.GA2737@redhat.com \
--to=sgruszka@redhat.com \
--cc=craig.mcqueen@innerrange.com.au \
--cc=linux-wireless@vger.kernel.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).