Commit 53775da0 authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

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: default avatarJakub Kicinski <kuba@kernel.org>
parents 3a767b48 a066f906
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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,
+2 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ struct firmware {
 * @FW_UPLOAD_ERR_INVALID_SIZE: invalid firmware image size
 * @FW_UPLOAD_ERR_RW_ERROR: read or write to HW failed, see kernel log
 * @FW_UPLOAD_ERR_WEAROUT: FLASH device is approaching wear-out, wait & retry
 * @FW_UPLOAD_ERR_FW_INVALID: invalid firmware file
 * @FW_UPLOAD_ERR_MAX: Maximum error code marker
 */
enum fw_upload_err {
@@ -38,6 +39,7 @@ enum fw_upload_err {
	FW_UPLOAD_ERR_INVALID_SIZE,
	FW_UPLOAD_ERR_RW_ERROR,
	FW_UPLOAD_ERR_WEAROUT,
	FW_UPLOAD_ERR_FW_INVALID,
	FW_UPLOAD_ERR_MAX
};

+1 −0
Original line number Diff line number Diff line
@@ -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,