From: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>
To: tiwai@suse.de, chunkeey@googlemail.com, leedom@chelsio.com,
cocci@systeme.lip6.fr
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
gregkh@linuxfoundation.org, "Luis R. Rodriguez" <mcgrof@suse.com>,
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: [PATCH 2/3] cxgb4: make configuration load use request_firmware_direct()
Date: Tue, 24 Jun 2014 15:39:42 -0700 [thread overview]
Message-ID: <1403649583-12707-3-git-send-email-mcgrof@do-not-panic.com> (raw)
In-Reply-To: <1403649583-12707-1-git-send-email-mcgrof@do-not-panic.com>
From: "Luis R. Rodriguez" <mcgrof@suse.com>
cxgb4 uses request_firmware() 3 times, one for firmware, one for
optional configuration files and another for ethtools flash. Since the
configuration update is optional on devices that don't have a
configuration file update it means we'd wait unnecessarily for the
extra udev timeout, which by default is 60 seconds. Avoid this
extra delay.
This was found with the following SmPL patch.
@ firmware_not_critical @
expression cf;
expression config_file;
expression dev;
int ret;
identifier l;
statement S;
@@
- ret = request_firmware(&cf, config_file, dev);
+ ret = request_firmware_direct(&cf, config_file, dev);
if (ret < 0) {
... when != goto l;
when != return ret;
when any
} else {
...
release_firmware(cf);
...
}
Cc: Philip Oswald <poswald@suse.com>
Cc: Santosh Rastapur <santosh@chelsio.com>
Cc: Jeffrey Cheung <jcheung@suse.com>
Cc: David Chang <dchang@suse.com>
Cc: Casey Leedom <leedom@chelsio.com>
Cc: Hariprasad Shenai <hariprasad@chelsio.com>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: cocci@systeme.lip6.fr
Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
---
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index 02a0ebf..bd57177 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -4999,7 +4999,7 @@ static int adap_init0_config(struct adapter *adapter, int reset)
goto bye;
}
- ret = request_firmware(&cf, fw_config_file, adapter->pdev_dev);
+ ret = request_firmware_direct(&cf, fw_config_file, adapter->pdev_dev);
if (ret < 0) {
config_name = "On FLASH";
mtype = FW_MEMTYPE_CF_FLASH;
--
2.0.0
next prev parent reply other threads:[~2014-06-24 22:40 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 ` Luis R. Rodriguez [this message]
2014-06-24 22:54 ` [PATCH 2/3] cxgb4: make configuration load use request_firmware_direct() Casey Leedom
2014-06-25 1:50 ` Luis R. Rodriguez
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=1403649583-12707-3-git-send-email-mcgrof@do-not-panic.com \
--to=mcgrof@do-not-panic.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@suse.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).