aboutsummaryrefslogtreecommitdiff
path: root/drivers/base/firmware_loader/sysfs_upload.c
diff options
context:
space:
mode:
authorKory Maincent <[email protected]>2023-11-22 14:52:43 +0100
committerJakub Kicinski <[email protected]>2023-11-24 18:09:19 -0800
commita066f906ba396ab00d4af19fc5fad42b2605582a (patch)
tree25b6d3f513e489e3f62a097f93a301dd8fb0019a /drivers/base/firmware_loader/sysfs_upload.c
parentb85ea95d086471afb4ad062012a4d73cd328fa86 (diff)
firmware_loader: Expand Firmware upload error codes with firmware invalid error
No error code are available to signal an invalid firmware content. Drivers that can check the firmware content validity can not return this specific failure to the user-space Expand the firmware error code with an additional code: - "firmware invalid" code which can be used when the provided firmware is invalid Sync lib/test_firmware.c file accordingly. Acked-by: Luis Chamberlain <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Kory Maincent <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://lore.kernel.org/r/20231122-feature_firmware_error_code-v3-1-04ec753afb71@bootlin.com Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'drivers/base/firmware_loader/sysfs_upload.c')
-rw-r--r--drivers/base/firmware_loader/sysfs_upload.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/base/firmware_loader/sysfs_upload.c b/drivers/base/firmware_loader/sysfs_upload.c
index a0af8f5f13d8..829270067d16 100644
--- a/drivers/base/firmware_loader/sysfs_upload.c
+++ b/drivers/base/firmware_loader/sysfs_upload.c
@@ -27,6 +27,7 @@ static const char * const fw_upload_err_str[] = {
[FW_UPLOAD_ERR_INVALID_SIZE] = "invalid-file-size",
[FW_UPLOAD_ERR_RW_ERROR] = "read-write-error",
[FW_UPLOAD_ERR_WEAROUT] = "flash-wearout",
+ [FW_UPLOAD_ERR_FW_INVALID] = "firmware-invalid",
};
static const char *fw_upload_progress(struct device *dev,