mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kay Sievers <kay.sievers@vrfy.org>
To: Javier Pello <javier.pello@urjc.es>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>,
	linux-kernel@vger.kernel.org, GregKH <greg@kroah.com>
Subject: Re: [PATCH] request_firmware: skip timeout if userspace was not  notified
Date: Thu, 09 Aug 2007 13:58:36 +0200	[thread overview]
Message-ID: <1186660716.21247.94.camel@lov.localdomain> (raw)
In-Reply-To: <46BAE005.4000906@urjc.es>

On Thu, 2007-08-09 at 11:36 +0200, Javier Pello wrote:
> On Tue, 07 Aug 2007, Cornelia Huck wrote:
> 
> > So it is indeed that this driver wants to fail its probe if it
> > cannot get the firmware.
> 
> That's right. The driver unbinds itself from the device if it doesn't
> get the firmware.
> 
> > A possibilty to achieve a similar effect would be to use
> > request_firmware_nowait() and to call device_release_driver() from
> > the callback if no firmware is loaded. (This would imply a split of
> > that driver's probe function into two stages.)
> 
> The comments in the source code say that request_firmware_nowait()
> is an "asynchronous version of request_firmware() for contexts where
> it is not possible to sleep". So a driver's decision to call one of
> them is not based on whether it wants to wait or not, but whether it
> _can_ wait.
> 
> Of course, it can be decided that we never want to wait, but then
> the best course of action would be to make request_firmware itself
> behave as request_firmware_nowait (no need to change drivers).
> 
> Anyway, my point is that it is useless to have the kernel block for
> a minute at boot waiting for something that cannot happen, and that
> it should be avoided (even if my proposed solution is not the way
> to go).

That's true. And it sounds all reasonable from your point of view, and
the firmware loader needs fixing, and the silly blocking request needs
to be removed from the kernel, that's known for a very long time now,
but nobody did the work so far.

But in this specific case, it is more the combination of your options,
what causes this problem to appear. You don't have an initramfs, you
don't use modules, but you are linking a driver into the kernel image
which depends on a conceptually broken blocking userspace transaction to
initialize.
This combination of options just doesn't make sense. Either use
initramfs, or use a kernel module for the driver that needs userspace to
initialize, or patch the driver not to block in the request, or patch
the driver to optionally include the firmware in the driver.

You just picked a set of options that doesn't work nicely together. No
distro setup has this problem, that's probably why nobody really cared
and it didn't get fixed so far.

Kay


  reply	other threads:[~2007-08-09 11:55 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-03 19:07 Javier Pello
2007-08-04  5:21 ` david
2007-08-04  8:50   ` Javier Pello
2007-08-04 17:09     ` david
2007-08-04 21:20       ` Javier Pello
2007-08-06 12:24 ` Cornelia Huck
2007-08-06 20:23   ` Javier Pello
     [not found]     ` <20070807125844.4d756b04@gondo lin.boeblingen.de.ibm.com>
2007-08-07 10:58     ` Cornelia Huck
2007-08-07 11:46       ` Kay Sievers
2007-08-07 12:10         ` Cornelia Huck
2007-08-07 12:31           ` Kay Sievers
2007-08-07 12:48             ` Cornelia Huck
2007-08-07 12:47           ` Javier Pello
2007-08-07 12:57             ` Kay Sievers
2007-08-07 13:15               ` Cornelia Huck
2007-08-07 13:59               ` Javier Pello
2007-08-07 14:08                 ` Kay Sievers
2007-08-07 14:38                   ` Cornelia Huck
2007-08-09  9:13                   ` Javier Pello
2007-08-09  9:21                     ` Kay Sievers
2007-08-09  9:26                     ` Cornelia Huck
2007-08-07 14:26                 ` Cornelia Huck
2007-08-09  9:36                   ` Javier Pello
2007-08-09 11:58                     ` Kay Sievers [this message]
2007-08-10 21:24                       ` Javier Pello
2007-08-11 13:26                         ` Kay Sievers
2007-08-07 20:05 ` Andrew Morton

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=1186660716.21247.94.camel@lov.localdomain \
    --to=kay.sievers@vrfy.org \
    --cc=cornelia.huck@de.ibm.com \
    --cc=greg@kroah.com \
    --cc=javier.pello@urjc.es \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®