netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: "Luis R. Rodriguez" <mcgrof@kernel.org>,
	Arend Van Spriel <arend.vanspriel@broadcom.com>
Cc: "Pavel Machek" <pavel@ucw.cz>, "Daniel Wagner" <wagi@monom.org>,
	"Tom Gundersen" <teg@jklm.no>,
	"Pali Rohár" <pali.rohar@gmail.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Kalle Valo" <kvalo@codeaurora.org>,
	"David Gnedt" <david.gnedt@davizone.at>,
	"Tony Lindgren" <tony@atomide.com>,
	"Sebastian Reichel" <sre@kernel.org>,
	"Ivaylo Dimitrov" <ivo.g.dimitrov.75@gmail.com>,
	"Aaro Koskinen" <aaro.koskinen@iki.fi>,
	"Takashi Iwai" <tiwai@suse.de>,
	"AKASHI Takahiro" <takahiro.akashi@linaro.org>,
	"David Woodhouse" <dwmw2@infradead.org>,
	"Bjorn Andersson" <bjorn.andersson@linaro.org>,
	"Grazvydas Ignotas" <notasas@gmail.com>,
	linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org,
	netdev@vger.kernel.org, "Michał Kazior" <kazikcz@gmail.com>
Subject: Re: [PATCH 2/6] wl1251: Use request_firmware_prefer_user() for loading NVS calibration data
Date: Wed, 17 May 2017 14:06:06 +0200	[thread overview]
Message-ID: <1495022766.2442.1.camel@sipsolutions.net> (raw)
In-Reply-To: <20170515231339.GF17314@wotan.suse.de>

On Tue, 2017-05-16 at 01:13 +0200, Luis R. Rodriguez wrote:
> > > Now for N900 case there is a similar scenario
> > > alhtough it has additional requirement to go to user-space due to
> > > need to use a proprietary library to obtain the NVS calibration
> > > data. My thought: Why should firmware_class care?
> 
> Agreed.

In fact, why should the *driver* care either? IOW - why should
"request_firmware_prefer_user()" even exist?

> > > So the idea is that firmware_class provides
> > > a registry for modules that can produce a certain firmware
> > > "file". Those
> > > modules can do whatever is needed. If they need to use umh so be
> > > it.
> > > They would only register themselves with firmware_class on
> > > platforms
> > > that need them. It would basically be replacing the fallback
> > > mechanism
> > > and only be effective on certain platforms.
> 
> Sure, so it sounds like the work that Daniel Wagner and Tom Gundersen
> worked [0] on which provides a firmwared with two modes: best-effort, 
> and final-mode, would address what you are looking for but without
> requiring any upstream changes, *and* it also helps solve the rootfs
> race remote-proc folks had concerns over.

Right.

> The other added gain over this solution is if folks need their own
> proprietary concoction they can just fork firmwared

Or just reimplement it to the same kernel API, no need to even use the
same code base.

> Lastly, if we did not want to deal with timeouts for the way the
> driver data API implements it I think we might be able to do away
> with them for for async requests if we assume there will be a daemon
> that spawns in final-mode eventually, and since it *knows* when the
> rootfs is ready it should be able to do a final lookup, if it returns
> -ENOENT; then indeed we know we can give up. Now, perhaps how and if
> we want to deal with timeouts when using the driver data API for the
> fallback mechanism is worth considering given it does not have a
> fallback mechanism support yet. If we *add* them it would seem this
> would also put an implicit race against userspace finishing
> initialization and running firmwared in final-mode.
> 
> Johannes, do you recall the corner cases we spoke about regarding
> timeouts? Does this match what we spoke about?

I think we have to protect against userspace code crashing, not
existing, etc. - so I think we do need a timeout anyway.

However, I don't recall any (other) corner cases we might have spoken
about.

> Note that firmware signing will require an additional file, the
> detached signature.

Is anything like that happening finally? :)

johannes
> 

  parent reply	other threads:[~2017-05-17 12:06 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <0fd90416-f33c-a6be-14fd-5e964583e9cb@broadcom.com>
2017-05-15 23:13 ` [PATCH 2/6] wl1251: Use request_firmware_prefer_user() for loading NVS calibration data Luis R. Rodriguez
2017-05-16  8:41   ` Arend Van Spriel
2017-05-16 23:57     ` Luis R. Rodriguez
2017-06-23 21:53     ` Luis R. Rodriguez
2017-06-30 21:35       ` Arend van Spriel
2017-08-10 19:43         ` Luis R. Rodriguez
2017-05-17 12:06   ` Johannes Berg [this message]
2017-05-17 12:53     ` Pali Rohár
2017-05-17 13:04       ` Johannes Berg
2017-05-17 13:21         ` Pali Rohár
2017-05-17 13:22           ` Johannes Berg
2017-05-18  0:08       ` Bjorn Andersson
2016-12-24 16:52 [PATCH 0/6] wl1251: Fix MAC address for Nokia N900 Pali Rohár
     [not found] ` <1482598381-16513-1-git-send-email-pali.rohar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-12-24 16:52   ` [PATCH 2/6] wl1251: Use request_firmware_prefer_user() for loading NVS calibration data Pali Rohár
2016-12-25 20:15     ` Arend Van Spriel
2016-12-25 20:46       ` Pali Rohár
2016-12-26 15:43         ` Pavel Machek
2016-12-26 16:04           ` Pali Rohár
2016-12-26 16:35       ` Pavel Machek
2017-01-03 17:59         ` Luis R. Rodriguez
2017-05-03 19:02           ` Arend Van Spriel
2017-05-04  2:28             ` Luis R. Rodriguez
2017-05-12 20:55               ` Arend Van Spriel
2017-01-27  7:33     ` Kalle Valo
2017-01-27  8:58       ` Arend Van Spriel
2017-01-27  9:43       ` Pali Rohár
2017-01-27 10:05         ` Arend Van Spriel
2017-01-27 10:10           ` Pali Rohár
2017-01-27 10:19             ` Arend Van Spriel
2017-01-27 10:34               ` Pali Rohár
2017-01-27 11:49                 ` Kalle Valo
2017-01-27 11:57                   ` Pali Rohár
2017-01-27 12:26                     ` Kalle Valo
2017-01-27 12:53                       ` Arend Van Spriel
2017-01-27 13:16                         ` Pali Rohár
2017-01-27 13:11                       ` Pali Rohár
2017-01-27 15:23                         ` Kalle Valo
2017-01-27 15:41                           ` Pali Rohár
2017-01-27 19:40                           ` Pavel Machek
2017-01-30 17:53                             ` Tony Lindgren
2017-01-30 18:03                               ` Pali Rohár
     [not found]                               ` <20170130175309.GY7403-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2017-01-31  6:35                                 ` Kalle Valo
2017-01-31 15:59                                   ` Tony Lindgren
2017-02-01  8:33                                     ` Pali Rohár
2017-02-01  9:35                                       ` Michal Kazior
2017-01-29 17:10                         ` Luis R. Rodriguez
2017-01-27 12:03             ` Pavel Machek

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=1495022766.2442.1.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=aaro.koskinen@iki.fi \
    --cc=arend.vanspriel@broadcom.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=david.gnedt@davizone.at \
    --cc=dwmw2@infradead.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=ivo.g.dimitrov.75@gmail.com \
    --cc=kazikcz@gmail.com \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=notasas@gmail.com \
    --cc=pali.rohar@gmail.com \
    --cc=pavel@ucw.cz \
    --cc=sre@kernel.org \
    --cc=takahiro.akashi@linaro.org \
    --cc=teg@jklm.no \
    --cc=tiwai@suse.de \
    --cc=tony@atomide.com \
    --cc=wagi@monom.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).