Skip to content

Commit 53775da

Browse files
committed
Merge branch 'firmware_loader'
Kory says: ==================== This patch was initially submitted as part of a net patch series. Conor expressed interest in using it in a different subsystem. https://lore.kernel.org/netdev/20231116-feature_poe-v1-7-be48044bf249@bootlin.com/ Consequently, I extracted it from the series and submitted it separately. I first tried to send it to driver-core but it seems also not the best choice: https://lore.kernel.org/lkml/2023111720-slicer-exes-7d9f@gregkh/ ==================== Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2 parents 3a767b4 + a066f90 commit 53775da

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

drivers/base/firmware_loader/sysfs_upload.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ static const char * const fw_upload_err_str[] = {
2727
[FW_UPLOAD_ERR_INVALID_SIZE] = "invalid-file-size",
2828
[FW_UPLOAD_ERR_RW_ERROR] = "read-write-error",
2929
[FW_UPLOAD_ERR_WEAROUT] = "flash-wearout",
30+
[FW_UPLOAD_ERR_FW_INVALID] = "firmware-invalid",
3031
};
3132

3233
static const char *fw_upload_progress(struct device *dev,

include/linux/firmware.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ struct firmware {
2727
* @FW_UPLOAD_ERR_INVALID_SIZE: invalid firmware image size
2828
* @FW_UPLOAD_ERR_RW_ERROR: read or write to HW failed, see kernel log
2929
* @FW_UPLOAD_ERR_WEAROUT: FLASH device is approaching wear-out, wait & retry
30+
* @FW_UPLOAD_ERR_FW_INVALID: invalid firmware file
3031
* @FW_UPLOAD_ERR_MAX: Maximum error code marker
3132
*/
3233
enum fw_upload_err {
@@ -38,6 +39,7 @@ enum fw_upload_err {
3839
FW_UPLOAD_ERR_INVALID_SIZE,
3940
FW_UPLOAD_ERR_RW_ERROR,
4041
FW_UPLOAD_ERR_WEAROUT,
42+
FW_UPLOAD_ERR_FW_INVALID,
4143
FW_UPLOAD_ERR_MAX
4244
};
4345

lib/test_firmware.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,6 +1132,7 @@ static const char * const fw_upload_err_str[] = {
11321132
[FW_UPLOAD_ERR_INVALID_SIZE] = "invalid-file-size",
11331133
[FW_UPLOAD_ERR_RW_ERROR] = "read-write-error",
11341134
[FW_UPLOAD_ERR_WEAROUT] = "flash-wearout",
1135+
[FW_UPLOAD_ERR_FW_INVALID] = "firmware-invalid",
11351136
};
11361137

11371138
static void upload_err_inject_error(struct test_firmware_upload *tst,

0 commit comments

Comments
 (0)