netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Luis R. Rodriguez" <mcgrof@suse.com>
To: Casey Leedom <leedom@chelsio.com>
Cc: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>,
	tiwai@suse.de, chunkeey@googlemail.com, cocci@systeme.lip6.fr,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	gregkh@linuxfoundation.org, Philip Oswald <poswald@suse.com>,
	Santosh Rastapur <santosh@chelsio.com>,
	Jeffrey Cheung <jcheung@suse.com>, David Chang <dchang@suse.com>,
	Hariprasad Shenai <hariprasad@chelsio.com>
Subject: Re: [PATCH 2/3] cxgb4: make configuration load use request_firmware_direct()
Date: Wed, 25 Jun 2014 03:50:48 +0200	[thread overview]
Message-ID: <20140625015048.GI27687@wotan.suse.de> (raw)
In-Reply-To: <D46B557B-AF4A-4E60-8D83-6181D406C64F@chelsio.com>

On Tue, Jun 24, 2014 at 03:54:44PM -0700, Casey Leedom wrote:
> [[ Hopefully this makes it through to the kernel.org lists -- I’m using the
>   Mac OS/X Mailer and it’s not clear how to force it not to use HTML format.
>   -- Casey ]]
> 
>   So does request_firmware_direct() only fail if the requested file is not
>   present on the file system or does it fail in other cases as well?

Same as before they are the same exact call with the only difference
being udev is not used as an extra helper, so it saves the extra
delay caused by udev. That's all.

>   If it’s the former, then the change to cxgb4 is fine.
> 
>   But if it’s the latter, then it’s definitely not okay.  While the driver
>   _can_ continue running without the local on-disk Firmware Configuration
>   File, that file can be used to significantly change the behavior and
>   capabilities of the adapter and is user-customizable.  If a user makes
>   changes to the local on-disk Firmware Configuration File and these are
>   randomly silently ignored this will lead to highly annoying support issues.

This just avoids udev, the request goes directly to the filesystem. The
failure will happen when the file is not present just as before, the
only difference here is skipping udev, it doesn't suffer from the extra 
60 second timeout. There's another possible failure, when
usermodehelper_read_trylock() fails but that is just as the code was before
so this change doesn't introduce that as a new false check. When that
triggers yout get a nasty WARN_ON() just as before.

One thing to note though is that the kernel firmware loader does not
log any failure to the kernel ring buffer if the firmware is not on the
filesystem, while the udev loader is a bit more chatty:

[ 2463.666120] platform fake-dev.0: Direct firmware load failed with error -2
[ 2463.666129] platform fake-dev.0: Falling back to user helper

Stuffing a print into the non-udev approach upstream seems a bit excessive
though (unless folks disagree), so if you want the driver to be a bit more
informative I think its best to place this feedback on the driver for now.

I see the driver does provide this information already though so is any
additional prints really desirable ?

        dev_info(adapter->pdev_dev, "Successfully configured using Firmware "\  
                 "Configuration File \"%s\", version %#x, computed checksum %#x\n",
                 config_name, finiver, cfcsum);   

  Luis

  reply	other threads:[~2014-06-25  1:50 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-24 22:39 [PATCH 0/3] drivers: expand usage of request_firmware_direct() Luis R. Rodriguez
2014-06-24 22:39 ` [PATCH 1/3] mmc: vub300: use request_firmware_direct() for pseudo code Luis R. Rodriguez
2014-06-24 22:39 ` [PATCH 2/3] cxgb4: make configuration load use request_firmware_direct() Luis R. Rodriguez
2014-06-24 22:54   ` Casey Leedom
2014-06-25  1:50     ` Luis R. Rodriguez [this message]
2014-06-25 17:12       ` Casey Leedom
2014-06-25 17:31         ` Luis R. Rodriguez
2014-06-25 18:58           ` Casey Leedom
2014-06-25 20:05             ` Luis R. Rodriguez
2014-06-24 22:39 ` [PATCH 3/3] p54: use request_firmware_direct() for optional EEPROM override Luis R. Rodriguez
2014-06-25  1:10   ` [RESEND][PATCH " Christian Lamparter
2014-06-25  7:26   ` [PATCH " Arend van Spriel
2014-06-25  8:06     ` Luis R. Rodriguez
2014-06-26 16:18 ` [PATCH 0/3] drivers: expand usage of request_firmware_direct() Takashi Iwai
2014-06-26 19:21   ` Greg KH
2014-07-08 22:25   ` Greg KH
2014-07-08 23:52     ` Luis R. Rodriguez
2014-07-09  0:24       ` Greg KH
2014-07-09  0:46         ` Luis R. Rodriguez

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=20140625015048.GI27687@wotan.suse.de \
    --to=mcgrof@suse.com \
    --cc=chunkeey@googlemail.com \
    --cc=cocci@systeme.lip6.fr \
    --cc=dchang@suse.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hariprasad@chelsio.com \
    --cc=jcheung@suse.com \
    --cc=leedom@chelsio.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcgrof@do-not-panic.com \
    --cc=netdev@vger.kernel.org \
    --cc=poswald@suse.com \
    --cc=santosh@chelsio.com \
    --cc=tiwai@suse.de \
    /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).