]> git.karo-electronics.de Git - linux-beck.git/commitdiff
greybus: firmware: log the name of the firmware being requested
authorGreg Kroah-Hartman <gregkh@google.com>
Wed, 20 Jan 2016 17:27:05 +0000 (09:27 -0800)
committerGreg Kroah-Hartman <gregkh@google.com>
Thu, 21 Jan 2016 19:39:05 +0000 (11:39 -0800)
People are getting confused as to what the firmware file name is for
their module, so log it to make it easier to find modules with "blank"
vid/pid values and let people know what to name their firmware files.

Because we are now logging this, turn the debug message after the
firmware request into an error message if something fails.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Reviewed-by: Michael Scott <michael.scott@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/firmware.c

index 408c7e2c0b08020af6faf7944e56d9a46b763e72..6d8fd0ecbc1f1d3da095d31813de086912a6ded1 100644 (file)
@@ -88,10 +88,19 @@ static int download_firmware(struct gb_firmware *firmware, u8 stage)
                 intf->ddbl1_manufacturer_id, intf->ddbl1_product_id,
                 firmware->vendor_id, firmware->product_id, stage);
 
+       // FIXME:
+       // Turn to dev_dbg later after everyone has valid bootloaders with good
+       // ids, but leave this as dev_info for now to make it easier to track
+       // down "empty" vid/pid modules.
+       dev_info(&connection->bundle->dev, "Firmware file '%s' requested\n",
+                firmware_name);
+
        rc = request_firmware(&firmware->fw, firmware_name,
                &connection->bundle->dev);
-       dev_dbg(&connection->bundle->dev, "Searched for TFTF %s: %d\n",
-               firmware_name, rc);
+       if (rc)
+               dev_err(&connection->bundle->dev,
+                       "Firware request for %s has failed : %d",
+                       firmware_name, rc);
        return rc;
 }