linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Luis R. Rodriguez" <mcgrof@kernel.org>
To: Prarit Bhargava <prarit@redhat.com>
Cc: Arend Van Spriel <arend.vanspriel@broadcom.com>,
	Stanislaw Gruszka <sgruszka@redhat.com>,
	Emmanuel Grumbach <egrumbach@gmail.com>,
	Michal Kazior <michal.kazior@tieto.com>,
	Kalle Valo <kvalo@qca.qualcomm.com>,
	linux-wireless <linux-wireless@vger.kernel.org>,
	ath10k <ath10k@lists.infradead.org>,
	Arend van Spriel <arend@broadcom.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Ming Lei <ming.lei@canonical.com>,
	"Luis R. Rodriguez" <mcgrof@kernel.org>
Subject: Re: [RFC] ath10k: silence firmware file probing warnings
Date: Sat, 23 Jul 2016 00:19:29 +0200	[thread overview]
Message-ID: <20160722221929.GN5537@wotan.suse.de> (raw)
In-Reply-To: <579216D8.2010401@redhat.com>

On Fri, Jul 22, 2016 at 08:51:36AM -0400, Prarit Bhargava wrote:
> On 07/22/2016 08:21 AM, Arend Van Spriel wrote:
> >> Another option to solve to problem would be stop requesting not
> >> available publicly firmware. However, I assume some drivers would
> >> like to preserve that option.
> > 
> > Actually, this is not the case with brcmfmac. We do need a firmware
> > file, ie. brcm/brcmfmac4356-pcie.bin, and also request for a nvram file,
> > ie. brcm/brcmfmac4356-pcie.txt. The latter is optional and the device
> > works fine without it.
> > 
> > What is still unclear to me is when request_firmware_direct() would fail
> > and in what circumstances the udev helper is a valid callback. Can you
> > explain such a scenario. Another question I have is what the reasons are
> > behind the 60 seconds timeout.
> 
> request_firmware_direct() will fail when the specified FW file is not present.
> This is different from request_firmware() which implements a usermode helper to
> potentially download firmware, or unpack a firmware image.
> 
> Re: 60 second timeout ... The 60 second timeout with request_firmware() is
> completely arbitrary.  There is no way for udev to signal back to the kernel
> that userspace helper has not completed its actions, so the kernel has a 60 dead
> man timer-ish delay.

Lets call it what it was: the 60 second timeout thing was simply a mistake.
Its no longer 60 seconds anyway, and in fact its accepted a dreaded issue.
What *we* should be doing is thinking about proper long term architecture now.
Async probe was one solution to some issues, a new flexible firmware API
that avoids the usermode helper 100% is another.

Distros stuck with the fallback option should review their strategies,
either disabling the fallback option, upgrade systemd, or use alternative
solutions (opensuse has a good one).

> >>>> However I wonder if changing that will not broke the case when
> >>>> driver is build-in in the kernel and f/w is not yet available when
> >>>> driver start to initialize. Or maybe nowadays this is not the case
> >>>> any longer, i.e. the MODULE_FIRMWARE macros assure proper f/w 
> >>>> images are build-in in the kernel or copied to initramfs?
> >>>
> >>> That is a nice idea, but I have not seen any change in that area. Could
> >>> have missed it.
> >>
> >> I believe this is how the things are already done, IOW switching to
> >> request_firmware_direct() in the driver should be no harm.
> > 
> > Ok. What are the consequences when:
> > - driver is built-in.
> > - driver+firmware present on initramfs.
> > - driver on initramfs, firmware only present on rootfs.
> > - driver+firmware only on rootfs.
> > 
> > I assume the third one would be considered a configuration issue.
> 
> I think your question here can be answered by reading drivers/base/Kconfig:88,
> and reading about those 4 config options.

No, this documentation is terrible, I've posted some patches to help with this
mess.

> I could paraphrase it butI think the
> Kconfig notes are better than I could explain it.  Note that this is how things
> currently work with request_firmware_nowait().  IIRC request_firmware_nowait()
> is just an asynchronous version of request_firmware().

... its a mess.

  Luis

  reply	other threads:[~2016-07-22 22:19 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-19 13:00 [RFC] ath10k: silence firmware file probing warnings Michal Kazior
2016-07-21  7:09 ` Stanislaw Gruszka
2016-07-21  7:36   ` Emmanuel Grumbach
2016-07-21  8:05     ` Stanislaw Gruszka
2016-07-21 10:23       ` Prarit Bhargava
2016-07-21 11:51         ` Stanislaw Gruszka
2016-07-21 12:01           ` Prarit Bhargava
2016-07-22  8:38           ` Arend Van Spriel
2016-07-22 10:26             ` Stanislaw Gruszka
2016-07-22 12:21               ` Arend Van Spriel
2016-07-22 12:51                 ` Prarit Bhargava
2016-07-22 22:19                   ` Luis R. Rodriguez [this message]
2016-07-25  7:51                     ` Emmanuel Grumbach
2016-07-22 22:15               ` Luis R. Rodriguez
2016-07-28 19:23                 ` Arend van Spriel
2016-08-02 11:10                 ` Valo, Kalle
2016-08-02 14:16                   ` Luis R. Rodriguez
2016-08-03 11:33                     ` Arend van Spriel
2016-08-03 14:21                       ` Luis R. Rodriguez
2016-08-03 15:04                         ` Valo, Kalle
2016-08-03 17:10                           ` Luis R. Rodriguez
2016-08-03 19:19                             ` Arend van Spriel
2016-07-22 22:05             ` Luis R. Rodriguez
2016-07-28 19:23               ` Arend van Spriel
2016-07-28 23:28                 ` Luis R. Rodriguez
2016-08-02 11:18 ` Valo, Kalle
2016-08-02 11:24   ` Felix Fietkau
2017-01-20 12:51 ` Kalle Valo
2017-01-20 12:56   ` Michal Kazior
2017-01-31 15:02 ` Kalle Valo

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=20160722221929.GN5537@wotan.suse.de \
    --to=mcgrof@kernel.org \
    --cc=arend.vanspriel@broadcom.com \
    --cc=arend@broadcom.com \
    --cc=ath10k@lists.infradead.org \
    --cc=egrumbach@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kvalo@qca.qualcomm.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=michal.kazior@tieto.com \
    --cc=ming.lei@canonical.com \
    --cc=prarit@redhat.com \
    --cc=sgruszka@redhat.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).