Add FW_UPLOAD_ERR_DUPLICATE to allow drivers to inform the firmware_loader
framework that the update is not required. This can be the case if the
user provided firmware matches the current running firmware.
Sync lib/test_firmware.c accordingly.
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
drivers/base/firmware_loader/sysfs_upload.c | 1 +
include/linux/firmware.h | 2 ++
lib/test_firmware.c | 1 +
3 files changed, 4 insertions(+)
diff --git a/drivers/base/firmware_loader/sysfs_upload.c b/drivers/base/firmware_loader/sysfs_upload.c
index 829270067d1632f92656859fb9143e3fa9635670..0a583a1b3f4fde563257566426d523fbf839b13f 100644
--- a/drivers/base/firmware_loader/sysfs_upload.c
+++ b/drivers/base/firmware_loader/sysfs_upload.c
@@ -28,6 +28,7 @@ static const char * const fw_upload_err_str[] = {
[FW_UPLOAD_ERR_RW_ERROR] = "read-write-error",
[FW_UPLOAD_ERR_WEAROUT] = "flash-wearout",
[FW_UPLOAD_ERR_FW_INVALID] = "firmware-invalid",
+ [FW_UPLOAD_ERR_DUPLICATE] = "firmware-duplicate",
};
static const char *fw_upload_progress(struct device *dev,
diff --git a/include/linux/firmware.h b/include/linux/firmware.h
index aae1b85ffc10e20e9c3c9b6009d26b83efd8cb24..fe7797be4c08cd62cdad9617b8f70095d5e0af2f 100644
--- a/include/linux/firmware.h
+++ b/include/linux/firmware.h
@@ -29,6 +29,7 @@ struct firmware {
* @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_DUPLICATE: firmware is already up to date (duplicate)
* @FW_UPLOAD_ERR_MAX: Maximum error code marker
*/
enum fw_upload_err {
@@ -41,6 +42,7 @@ enum fw_upload_err {
FW_UPLOAD_ERR_RW_ERROR,
FW_UPLOAD_ERR_WEAROUT,
FW_UPLOAD_ERR_FW_INVALID,
+ FW_UPLOAD_ERR_DUPLICATE,
FW_UPLOAD_ERR_MAX
};
diff --git a/lib/test_firmware.c b/lib/test_firmware.c
index 211222e63328f970228920f5662ee80cc7f51215..603c3a4b385c849944a695849a1894693234b5eb 100644
--- a/lib/test_firmware.c
+++ b/lib/test_firmware.c
@@ -1133,6 +1133,7 @@ static const char * const fw_upload_err_str[] = {
[FW_UPLOAD_ERR_RW_ERROR] = "read-write-error",
[FW_UPLOAD_ERR_WEAROUT] = "flash-wearout",
[FW_UPLOAD_ERR_FW_INVALID] = "firmware-invalid",
+ [FW_UPLOAD_ERR_DUPLICATE] = "firmware-duplicate",
};
static void upload_err_inject_error(struct test_firmware_upload *tst,
--
2.39.5
On Thu, Aug 21, 2025 at 07:26:36PM +0200, Marco Felsch wrote:
> Add FW_UPLOAD_ERR_DUPLICATE to allow drivers to inform the firmware_loader
> framework that the update is not required. This can be the case if the
> user provided firmware matches the current running firmware.
>
> Sync lib/test_firmware.c accordingly.
>
> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Reviewed-by: Russ Weight <russ.weight@linux.dev>
> ---
> drivers/base/firmware_loader/sysfs_upload.c | 1 +
> include/linux/firmware.h | 2 ++
> lib/test_firmware.c | 1 +
> 3 files changed, 4 insertions(+)
>
> diff --git a/drivers/base/firmware_loader/sysfs_upload.c b/drivers/base/firmware_loader/sysfs_upload.c
> index 829270067d1632f92656859fb9143e3fa9635670..0a583a1b3f4fde563257566426d523fbf839b13f 100644
> --- a/drivers/base/firmware_loader/sysfs_upload.c
> +++ b/drivers/base/firmware_loader/sysfs_upload.c
> @@ -28,6 +28,7 @@ static const char * const fw_upload_err_str[] = {
> [FW_UPLOAD_ERR_RW_ERROR] = "read-write-error",
> [FW_UPLOAD_ERR_WEAROUT] = "flash-wearout",
> [FW_UPLOAD_ERR_FW_INVALID] = "firmware-invalid",
> + [FW_UPLOAD_ERR_DUPLICATE] = "firmware-duplicate",
> };
>
> static const char *fw_upload_progress(struct device *dev,
> diff --git a/include/linux/firmware.h b/include/linux/firmware.h
> index aae1b85ffc10e20e9c3c9b6009d26b83efd8cb24..fe7797be4c08cd62cdad9617b8f70095d5e0af2f 100644
> --- a/include/linux/firmware.h
> +++ b/include/linux/firmware.h
> @@ -29,6 +29,7 @@ struct firmware {
> * @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_DUPLICATE: firmware is already up to date (duplicate)
> * @FW_UPLOAD_ERR_MAX: Maximum error code marker
> */
> enum fw_upload_err {
> @@ -41,6 +42,7 @@ enum fw_upload_err {
> FW_UPLOAD_ERR_RW_ERROR,
> FW_UPLOAD_ERR_WEAROUT,
> FW_UPLOAD_ERR_FW_INVALID,
> + FW_UPLOAD_ERR_DUPLICATE,
> FW_UPLOAD_ERR_MAX
> };
>
> diff --git a/lib/test_firmware.c b/lib/test_firmware.c
> index 211222e63328f970228920f5662ee80cc7f51215..603c3a4b385c849944a695849a1894693234b5eb 100644
> --- a/lib/test_firmware.c
> +++ b/lib/test_firmware.c
> @@ -1133,6 +1133,7 @@ static const char * const fw_upload_err_str[] = {
> [FW_UPLOAD_ERR_RW_ERROR] = "read-write-error",
> [FW_UPLOAD_ERR_WEAROUT] = "flash-wearout",
> [FW_UPLOAD_ERR_FW_INVALID] = "firmware-invalid",
> + [FW_UPLOAD_ERR_DUPLICATE] = "firmware-duplicate",
> };
>
> static void upload_err_inject_error(struct test_firmware_upload *tst,
>
> --
> 2.39.5
>
On Wed, Aug 27, 2025 at 03:29:33PM -0600, Russ Weight wrote: > > On Thu, Aug 21, 2025 at 07:26:36PM +0200, Marco Felsch wrote: > > Add FW_UPLOAD_ERR_DUPLICATE to allow drivers to inform the firmware_loader > > framework that the update is not required. This can be the case if the > > user provided firmware matches the current running firmware. > > > > Sync lib/test_firmware.c accordingly. > > > > Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> > > Reviewed-by: Russ Weight <russ.weight@linux.dev> Does this mean I should merge this through input tree? Thanks. -- Dmitry
Hi all, On 25-09-20, Dmitry Torokhov wrote: > On Wed, Aug 27, 2025 at 03:29:33PM -0600, Russ Weight wrote: > > > > On Thu, Aug 21, 2025 at 07:26:36PM +0200, Marco Felsch wrote: > > > Add FW_UPLOAD_ERR_DUPLICATE to allow drivers to inform the firmware_loader > > > framework that the update is not required. This can be the case if the > > > user provided firmware matches the current running firmware. > > > > > > Sync lib/test_firmware.c accordingly. > > > > > > Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> > > > > Reviewed-by: Russ Weight <russ.weight@linux.dev> > > Does this mean I should merge this through input tree? may I ask how this is planned to go further? Regards, Marco > > Thanks. > > -- > Dmitry
On 25-10-16, Marco Felsch wrote: > Hi all, > > On 25-09-20, Dmitry Torokhov wrote: > > On Wed, Aug 27, 2025 at 03:29:33PM -0600, Russ Weight wrote: > > > > > > On Thu, Aug 21, 2025 at 07:26:36PM +0200, Marco Felsch wrote: > > > > Add FW_UPLOAD_ERR_DUPLICATE to allow drivers to inform the firmware_loader > > > > framework that the update is not required. This can be the case if the > > > > user provided firmware matches the current running firmware. > > > > > > > > Sync lib/test_firmware.c accordingly. > > > > > > > > Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> > > > > > > Reviewed-by: Russ Weight <russ.weight@linux.dev> > > > > Does this mean I should merge this through input tree? > > may I ask how this is planned to go further? Gentle ping. Regards, Marco > > Regards, > Marco > > > > > Thanks. > > > > -- > > Dmitry -- #gernperDu #CallMeByMyFirstName Pengutronix e.K. | | Steuerwalder Str. 21 | https://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
On Tue, Nov 11, 2025 at 12:01:10PM +0100, Marco Felsch wrote: > On 25-10-16, Marco Felsch wrote: > > Hi all, > > > > On 25-09-20, Dmitry Torokhov wrote: > > > On Wed, Aug 27, 2025 at 03:29:33PM -0600, Russ Weight wrote: > > > > > > > > On Thu, Aug 21, 2025 at 07:26:36PM +0200, Marco Felsch wrote: > > > > > Add FW_UPLOAD_ERR_DUPLICATE to allow drivers to inform the firmware_loader > > > > > framework that the update is not required. This can be the case if the > > > > > user provided firmware matches the current running firmware. > > > > > > > > > > Sync lib/test_firmware.c accordingly. > > > > > > > > > > Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> > > > > > > > > Reviewed-by: Russ Weight <russ.weight@linux.dev> > > > > > > Does this mean I should merge this through input tree? > > > > may I ask how this is planned to go further? > > Gentle ping. Marco - I would recommend adding the Reviewed-by tags that you have received and then resubmitting the patch. -- Russ > > Regards, > Marco > > > > > > Regards, > > Marco > > > > > > > > Thanks. > > > > > > -- > > > Dmitry > > -- > #gernperDu > #CallMeByMyFirstName > > Pengutronix e.K. | | > Steuerwalder Str. 21 | https://www.pengutronix.de/ | > 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
On 25-11-18, Russ Weight wrote: > On Tue, Nov 11, 2025 at 12:01:10PM +0100, Marco Felsch wrote: > > On 25-10-16, Marco Felsch wrote: > > > Hi all, > > > > > > On 25-09-20, Dmitry Torokhov wrote: > > > > On Wed, Aug 27, 2025 at 03:29:33PM -0600, Russ Weight wrote: > > > > > > > > > > On Thu, Aug 21, 2025 at 07:26:36PM +0200, Marco Felsch wrote: > > > > > > Add FW_UPLOAD_ERR_DUPLICATE to allow drivers to inform the firmware_loader > > > > > > framework that the update is not required. This can be the case if the > > > > > > user provided firmware matches the current running firmware. > > > > > > > > > > > > Sync lib/test_firmware.c accordingly. > > > > > > > > > > > > Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> > > > > > > > > > > Reviewed-by: Russ Weight <russ.weight@linux.dev> > > > > > > > > Does this mean I should merge this through input tree? > > > > > > may I ask how this is planned to go further? > > > > Gentle ping. > > Marco - I would recommend adding the Reviewed-by tags that you > have received and then resubmitting the patch. I've done this now: - https://lore.kernel.org/all/20260106-v6-10-topic-touchscreen-axiom-v4-0-9e9b69c84926@pengutronix.de/ Regards, Marco
On 25-11-18, Russ Weight wrote: > On Tue, Nov 11, 2025 at 12:01:10PM +0100, Marco Felsch wrote: > > On 25-10-16, Marco Felsch wrote: > > > Hi all, > > > > > > On 25-09-20, Dmitry Torokhov wrote: > > > > On Wed, Aug 27, 2025 at 03:29:33PM -0600, Russ Weight wrote: > > > > > > > > > > On Thu, Aug 21, 2025 at 07:26:36PM +0200, Marco Felsch wrote: > > > > > > Add FW_UPLOAD_ERR_DUPLICATE to allow drivers to inform the firmware_loader > > > > > > framework that the update is not required. This can be the case if the > > > > > > user provided firmware matches the current running firmware. > > > > > > > > > > > > Sync lib/test_firmware.c accordingly. > > > > > > > > > > > > Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> > > > > > > > > > > Reviewed-by: Russ Weight <russ.weight@linux.dev> > > > > > > > > Does this mean I should merge this through input tree? > > > > > > may I ask how this is planned to go further? > > > > Gentle ping. > > Marco - I would recommend adding the Reviewed-by tags that you > have received and then resubmitting the patch. I can do this albeit I thought this will be collected autom. by b4. Regards, Marco > -- Russ > > > > > Regards, > > Marco > > > > > > > > > > Regards, > > > Marco > > > > > > > > > > > Thanks. > > > > > > > > -- > > > > Dmitry > > > > -- > > #gernperDu > > #CallMeByMyFirstName > > > > Pengutronix e.K. | | > > Steuerwalder Str. 21 | https://www.pengutronix.de/ | > > 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | > > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 | > > -- #gernperDu #CallMeByMyFirstName Pengutronix e.K. | | Steuerwalder Str. 21 | https://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
On Wed, Nov 19, 2025 at 11:10:07AM +0100, Marco Felsch wrote: > > Marco - I would recommend adding the Reviewed-by tags that you > > have received and then resubmitting the patch. > > I can do this albeit I thought this will be collected autom. by b4. You have to run `b4 trailers -u` for it to be collected. -K
Hi Russ, On 25-11-19, Konstantin Ryabitsev wrote: > On Wed, Nov 19, 2025 at 11:10:07AM +0100, Marco Felsch wrote: > > > Marco - I would recommend adding the Reviewed-by tags that you > > > have received and then resubmitting the patch. > > > > I can do this albeit I thought this will be collected autom. by b4. > > You have to run `b4 trailers -u` for it to be collected. Is this okay to run it on your site or do I have to add and resend it? Regards, Marco > > -K > -- #gernperDu #CallMeByMyFirstName Pengutronix e.K. | | Steuerwalder Str. 21 | https://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
On Fri, Nov 21, 2025 at 03:00:52PM +0100, Marco Felsch wrote: > Hi Russ, > > On 25-11-19, Konstantin Ryabitsev wrote: > > On Wed, Nov 19, 2025 at 11:10:07AM +0100, Marco Felsch wrote: > > > > Marco - I would recommend adding the Reviewed-by tags that you > > > > have received and then resubmitting the patch. > > > > > > I can do this albeit I thought this will be collected autom. by b4. > > > > You have to run `b4 trailers -u` for it to be collected. > > Is this okay to run it on your site or do I have to add and resend it? My role is primarily code reviews - I'm not the person who would pull the patch in to a testing branch. I would recommend adding the tags and resubmitting. > > Regards, > Marco > > > > > -K > > > > -- > #gernperDu > #CallMeByMyFirstName > > Pengutronix e.K. | | > Steuerwalder Str. 21 | https://www.pengutronix.de/ | > 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
On Thu, Aug 21, 2025 at 07:26:36PM +0200, Marco Felsch wrote: > Add FW_UPLOAD_ERR_DUPLICATE to allow drivers to inform the firmware_loader > framework that the update is not required. This can be the case if the > user provided firmware matches the current running firmware. > > Sync lib/test_firmware.c accordingly. > > Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Reviewed-by: Luis Chamberlain <mcgrof@kernel.org> Luis
© 2016 - 2026 Red Hat, Inc.