diff options
author | Kory Maincent <kory.maincent@bootlin.com> | 2023-11-22 14:52:43 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-11-24 18:09:19 -0800 |
commit | a066f906ba396ab00d4af19fc5fad42b2605582a (patch) | |
tree | 25b6d3f513e489e3f62a097f93a301dd8fb0019a /lib | |
parent | b85ea95d086471afb4ad062012a4d73cd328fa86 (diff) | |
download | linux-a066f906ba396ab00d4af19fc5fad42b2605582a.tar.gz linux-a066f906ba396ab00d4af19fc5fad42b2605582a.tar.bz2 linux-a066f906ba396ab00d4af19fc5fad42b2605582a.zip |
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 <mcgrof@kernel.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/20231122-feature_firmware_error_code-v3-1-04ec753afb71@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/test_firmware.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/test_firmware.c b/lib/test_firmware.c index add4699fc6cd..9cfdcd6d21db 100644 --- a/lib/test_firmware.c +++ b/lib/test_firmware.c @@ -1132,6 +1132,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 void upload_err_inject_error(struct test_firmware_upload *tst, |