[RFC, PATCH] libertas: unify request_firmware failure

Marc Pignat marc.pignat at hevs.ch
Tue Sep 30 10:25:40 EDT 2008


Use almost the same string for all interfaces (USB, compact flash and SDIO)
when request_firmware fails.

Signed-off-by: Marc Pignat <marc.pignat at hevs.ch>
---

Hi all!

I'm tired of seeing always the same problem with firmware. Some guys are not
able to setup a working userland for hotplugging (firmware download) to work.

I understand that working with embedded system is not as simple as booting a
live distro on any x86 machine.

I really think this *dumb* patch will make our life easier. When you see
a message like "request_firmware() failed with ...", there is no need to
blame the libertas driver, that only means that your userspace is broken.



Best regards

Marc




patch against 2.6.27-rc7 (if_usb.c is untouched, it holds the original string!)

diff --git a/drivers/net/wireless/libertas/if_cs.c b/drivers/net/wireless/libertas/if_cs.c
index 8941919..53af9f5 100644
--- a/drivers/net/wireless/libertas/if_cs.c
+++ b/drivers/net/wireless/libertas/if_cs.c
@@ -553,7 +553,8 @@ static int if_cs_prog_helper(struct if_cs_card *card)
 	ret = request_firmware(&fw, "libertas_cs_helper.fw",
 		&handle_to_dev(card->p_dev));
 	if (ret) {
-		lbs_pr_err("can't load helper firmware\n");
+		lbs_pr_err("request_firmware() failed with %#x\n", ret);
+		lbs_pr_err("helper firmware libertas_cs_helper.fw not found\n");
 		ret = -ENODEV;
 		goto done;
 	}
@@ -626,7 +627,8 @@ static int if_cs_prog_real(struct if_cs_card *card)
 	ret = request_firmware(&fw, "libertas_cs.fw",
 		&handle_to_dev(card->p_dev));
 	if (ret) {
-		lbs_pr_err("can't load firmware\n");
+		lbs_pr_err("request_firmware() failed with %#x\n", ret);
+		lbs_pr_err("firmware libertas_cs.fw not found\n");
 		ret = -ENODEV;
 		goto done;
 	}
diff --git a/drivers/net/wireless/libertas/if_sdio.c b/drivers/net/wireless/libertas/if_sdio.c
index b54e2ea..734d0fa 100644
--- a/drivers/net/wireless/libertas/if_sdio.c
+++ b/drivers/net/wireless/libertas/if_sdio.c
@@ -396,7 +396,8 @@ static int if_sdio_prog_helper(struct if_sdio_card *card)
 
 	ret = request_firmware(&fw, card->helper, &card->func->dev);
 	if (ret) {
-		lbs_pr_err("can't load helper firmware\n");
+		lbs_pr_err("request_firmware() failed with %#x\n", ret);
+		lbs_pr_err("helper firmware %s not found\n", card->helper);
 		goto out;
 	}
 
@@ -512,7 +513,8 @@ static int if_sdio_prog_real(struct if_sdio_card *card)
 
 	ret = request_firmware(&fw, card->firmware, &card->func->dev);
 	if (ret) {
-		lbs_pr_err("can't load firmware\n");
+		lbs_pr_err("request_firmware() failed with %#x\n", ret);
+		lbs_pr_err("firmware %s not found\n", card->firmware);
 		goto out;
 	}
 



More information about the libertas-dev mailing list