linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Larry Finger <Larry.Finger@lwfinger.net>
Cc: LKML <linux-kernel@vger.kernel.org>,
	driverdevel <devel@driverdev.osuosl.org>,
	wireless <linux-wireless@vger.kernel.org>,
	linux-hotplug@vger.kernel.org
Subject: Re: will these methods work with firmware loading?
Date: Mon, 20 Feb 2012 09:46:07 +0000	[thread overview]
Message-ID: <1329731167.3458.4.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <4F414230.5040506@lwfinger.net> (sfid-20120219_194128_235089_6C62CE24)

Hi Larry,

> I know that changing the request_firmware() call to request_firmware_nowait() 
> solves the problem; however, that gives some trouble for driver b43legacy as it 
> loads 3 or 4 firmware files depending on the hardware version. When I launch the 
> 3 or 4 nowait requests, I get an error because the system is trying to start 
> several tasks with the same name.
> 
> Would it be OK to load the first file with the nowait version, and issue a 
> request_firmware() for the others from the callback routine? I think that would 
> not cause any problems, but I would like to get confirmation from an expert.

That should work -- I just looked at the firmware code and it spawns a
new thread for every "nowait" request (and it calls the callback in that
thread's context), so it won't block against itself.

> Similarly, if I were to create a work queue, init and schedule it from 
> module_init(), and then use synchronous loads to get the firmware from the work 
> queue callback, would that get around the boot problem? I know it works as I 
> have trial patches; however, my version of udev is not one affected. This method 
> is very easy to implement, but again I would like confirmation from an expert.

We discussed that before, and technically it should work, I'm just a bit
worried about udev treating asynchronous and synchronous requests
differently and that causing issues, but somebody who knows udev better
will have to comment on that.

johannes


  reply	other threads:[~2012-02-20  9:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-19 18:40 will these methods work with firmware loading? Larry Finger
2012-02-20  9:46 ` Johannes Berg [this message]
2012-02-20 10:01 ` Arend van Spriel
2012-02-20 10:19   ` Kay Sievers
2012-02-20 10:32     ` Arend van Spriel
2012-02-20 20:12     ` Larry Finger

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=1329731167.3458.4.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=Larry.Finger@lwfinger.net \
    --cc=devel@driverdev.osuosl.org \
    --cc=linux-hotplug@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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).