[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1403649583-12707-2-git-send-email-mcgrof@do-not-panic.com>
Date: Tue, 24 Jun 2014 15:39:41 -0700
From: "Luis R. Rodriguez" <mcgrof@...not-panic.com>
To: tiwai@...e.de, chunkeey@...glemail.com, leedom@...lsio.com,
cocci@...teme.lip6.fr
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
gregkh@...uxfoundation.org, "Luis R. Rodriguez" <mcgrof@...e.com>,
Tony Olech <tony.olech@...ndigitalsystems.com>,
linux-mmc@...r.kernel.org, linux-usb@...r.kernel.org
Subject: [PATCH 1/3] mmc: vub300: use request_firmware_direct() for pseudo code
From: "Luis R. Rodriguez" <mcgrof@...e.com>
vub300 uses the request_firmware() API for downloading
pseudo code twice and if this fails its not considered fatal.
Avoid letting the request linger 60 seconds because of udev if
one of the requests fails by explicitly skipping the udev helper.
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: Tony Olech <tony.olech@...ndigitalsystems.com>
Cc: linux-mmc@...r.kernel.org
Cc: linux-usb@...r.kernel.org
Cc: Takashi Iwai <tiwai@...e.de>
Cc: cocci@...teme.lip6.fr
Signed-off-by: Luis R. Rodriguez <mcgrof@...e.com>
---
drivers/mmc/host/vub300.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/vub300.c b/drivers/mmc/host/vub300.c
index 4262296..15eeaff 100644
--- a/drivers/mmc/host/vub300.c
+++ b/drivers/mmc/host/vub300.c
@@ -1378,11 +1378,12 @@ static void download_offload_pseudocode(struct vub300_mmc_host *vub300)
snprintf(vub300->vub_name + l, sizeof(vub300->vub_name) - l, ".bin");
dev_info(&vub300->udev->dev, "requesting offload firmware %s\n",
vub300->vub_name);
- retval = request_firmware(&fw, vub300->vub_name, &card->dev);
+ retval = request_firmware_direct(&fw, vub300->vub_name, &card->dev);
if (retval < 0) {
strncpy(vub300->vub_name, "vub_default.bin",
sizeof(vub300->vub_name));
- retval = request_firmware(&fw, vub300->vub_name, &card->dev);
+ retval = request_firmware_direct(&fw, vub300->vub_name,
+ &card->dev);
if (retval < 0) {
strncpy(vub300->vub_name,
"no SDIO offload firmware found",
--
2.0.0
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists