2021-05-21 01:52:12

by Pali Rohár

[permalink] [raw]
Subject: [PATCH v4 mvebu 0/4] firmware: turris-mox-rwtm: fixups

These 4 patches are just fixups. Per Andrew's request I have split them
from V3 series, so they can be applied to stable.

Marek Behún (2):
firmware: turris-mox-rwtm: fix reply status decoding function
firmware: turris-mox-rwtm: report failures better

Pali Rohár (2):
firmware: turris-mox-rwtm: fail probing when firmware does not support
hwrng
firmware: turris-mox-rwtm: show message about HWRNG registration

drivers/firmware/turris-mox-rwtm.c | 55 +++++++++++++++++++++++++-----
1 file changed, 47 insertions(+), 8 deletions(-)

--
2.20.1


2021-05-21 01:52:21

by Pali Rohár

[permalink] [raw]
Subject: [PATCH v4 mvebu 2/4] firmware: turris-mox-rwtm: report failures better

From: Marek Behún <[email protected]>

Report a notice level message if a command is not supported by the rWTM
firmware.

This should not be an error, merely a notice, because the firmware can
be used on boards that do not have manufacturing information burned.

Signed-off-by: Marek Behún <[email protected]>
Reviewed-by: Pali Rohár <[email protected]>
Fixes: 389711b37493 ("firmware: Add Turris Mox rWTM firmware driver")
---
drivers/firmware/turris-mox-rwtm.c | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/drivers/firmware/turris-mox-rwtm.c b/drivers/firmware/turris-mox-rwtm.c
index f85acdb3130c..d7e3489e4bf2 100644
--- a/drivers/firmware/turris-mox-rwtm.c
+++ b/drivers/firmware/turris-mox-rwtm.c
@@ -204,11 +204,14 @@ static int mox_get_board_info(struct mox_rwtm *rwtm)
return ret;

ret = mox_get_status(MBOX_CMD_BOARD_INFO, reply->retval);
- if (ret < 0 && ret != -ENODATA) {
- return ret;
- } else if (ret == -ENODATA) {
+ if (ret == -ENODATA) {
dev_warn(rwtm->dev,
"Board does not have manufacturing information burned!\n");
+ } else if (ret == -ENOSYS) {
+ dev_notice(rwtm->dev,
+ "Firmware does not support the BOARD_INFO command\n");
+ } else if (ret < 0) {
+ return ret;
} else {
rwtm->serial_number = reply->status[1];
rwtm->serial_number <<= 32;
@@ -237,10 +240,13 @@ static int mox_get_board_info(struct mox_rwtm *rwtm)
return ret;

ret = mox_get_status(MBOX_CMD_ECDSA_PUB_KEY, reply->retval);
- if (ret < 0 && ret != -ENODATA) {
- return ret;
- } else if (ret == -ENODATA) {
+ if (ret == -ENODATA) {
dev_warn(rwtm->dev, "Board has no public key burned!\n");
+ } else if (ret == -ENOSYS) {
+ dev_notice(rwtm->dev,
+ "Firmware does not support the ECDSA_PUB_KEY command\n");
+ } else if (ret < 0) {
+ return ret;
} else {
u32 *s = reply->status;

--
2.20.1

2021-05-21 09:05:36

by Andrew Lunn

[permalink] [raw]
Subject: Re: [PATCH v4 mvebu 2/4] firmware: turris-mox-rwtm: report failures better

On Thu, May 20, 2021 at 01:35:18PM +0200, Pali Roh?r wrote:
> From: Marek Beh?n <[email protected]>
>
> Report a notice level message if a command is not supported by the rWTM
> firmware.
>
> This should not be an error, merely a notice, because the firmware can
> be used on boards that do not have manufacturing information burned.
>
> Signed-off-by: Marek Beh?n <[email protected]>
> Reviewed-by: Pali Roh?r <[email protected]>
> Fixes: 389711b37493 ("firmware: Add Turris Mox rWTM firmware driver")

Reviewed-by: Andrew Lunn <[email protected]>

Andrew

2021-06-17 16:06:22

by Gregory CLEMENT

[permalink] [raw]
Subject: Re: [PATCH v4 mvebu 0/4] firmware: turris-mox-rwtm: fixups

Hello,

Series applied on mvebu/fixes

Thanks,

Gregory

> These 4 patches are just fixups. Per Andrew's request I have split them
> from V3 series, so they can be applied to stable.
>
> Marek Behún (2):
> firmware: turris-mox-rwtm: fix reply status decoding function
> firmware: turris-mox-rwtm: report failures better
>
> Pali Rohár (2):
> firmware: turris-mox-rwtm: fail probing when firmware does not support
> hwrng
> firmware: turris-mox-rwtm: show message about HWRNG registration
>
> drivers/firmware/turris-mox-rwtm.c | 55 +++++++++++++++++++++++++-----
> 1 file changed, 47 insertions(+), 8 deletions(-)
>
> --
> 2.20.1
>

--
Gregory Clement, Bootlin
Embedded Linux and Kernel engineering
http://bootlin.com

2021-07-07 18:56:08

by Pali Rohár

[permalink] [raw]
Subject: Re: [PATCH v4 mvebu 0/4] firmware: turris-mox-rwtm: fixups

Hello Gregory!

I see that you put this patch into mvebu/fixes branch and tagged it for
5.13 kernel:
https://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu.git/tag/?h=mvebu-fixes-5.13-1

But it looks like it was not merged into 5.13. Are you going to re-send
all pending patches to 5.14?

On Thursday 17 June 2021 15:06:51 Gregory CLEMENT wrote:
> Hello,
>
> Series applied on mvebu/fixes
>
> Thanks,
>
> Gregory
>
> > These 4 patches are just fixups. Per Andrew's request I have split them
> > from V3 series, so they can be applied to stable.
> >
> > Marek Behún (2):
> > firmware: turris-mox-rwtm: fix reply status decoding function
> > firmware: turris-mox-rwtm: report failures better
> >
> > Pali Rohár (2):
> > firmware: turris-mox-rwtm: fail probing when firmware does not support
> > hwrng
> > firmware: turris-mox-rwtm: show message about HWRNG registration
> >
> > drivers/firmware/turris-mox-rwtm.c | 55 +++++++++++++++++++++++++-----
> > 1 file changed, 47 insertions(+), 8 deletions(-)
> >
> > --
> > 2.20.1
> >
>
> --
> Gregory Clement, Bootlin
> Embedded Linux and Kernel engineering
> http://bootlin.com

2021-07-23 12:50:08

by Pali Rohár

[permalink] [raw]
Subject: Re: [PATCH v4 mvebu 0/4] firmware: turris-mox-rwtm: fixups

On Friday 23 July 2021 14:45:56 Gregory CLEMENT wrote:
> Hello Pali,
>
> > Hello Gregory!
> >
> > I see that you put this patch into mvebu/fixes branch and tagged it for
> > 5.13 kernel:
> > https://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu.git/tag/?h=mvebu-fixes-5.13-1
> >
> > But it looks like it was not merged into 5.13. Are you going to re-send
> > all pending patches to 5.14?
>
> They have been merged in 5.14 during merged windows and they are now
> also in 5.13.4. So I think everything is OK now.
>
> Gregory

Yes! I already figured out. So everything is fine now.

>
> >
> > On Thursday 17 June 2021 15:06:51 Gregory CLEMENT wrote:
> >> Hello,
> >>
> >> Series applied on mvebu/fixes
> >>
> >> Thanks,
> >>
> >> Gregory
> >>
> >> > These 4 patches are just fixups. Per Andrew's request I have split them
> >> > from V3 series, so they can be applied to stable.
> >> >
> >> > Marek Behún (2):
> >> > firmware: turris-mox-rwtm: fix reply status decoding function
> >> > firmware: turris-mox-rwtm: report failures better
> >> >
> >> > Pali Rohár (2):
> >> > firmware: turris-mox-rwtm: fail probing when firmware does not support
> >> > hwrng
> >> > firmware: turris-mox-rwtm: show message about HWRNG registration
> >> >
> >> > drivers/firmware/turris-mox-rwtm.c | 55 +++++++++++++++++++++++++-----
> >> > 1 file changed, 47 insertions(+), 8 deletions(-)
> >> >
> >> > --
> >> > 2.20.1
> >> >
> >>
> >> --
> >> Gregory Clement, Bootlin
> >> Embedded Linux and Kernel engineering
> >> http://bootlin.com
>
> --
> Gregory Clement, Bootlin
> Embedded Linux and Kernel engineering
> http://bootlin.com

2021-07-23 12:57:42

by Gregory CLEMENT

[permalink] [raw]
Subject: Re: [PATCH v4 mvebu 0/4] firmware: turris-mox-rwtm: fixups

Hello Pali,

> Hello Gregory!
>
> I see that you put this patch into mvebu/fixes branch and tagged it for
> 5.13 kernel:
> https://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu.git/tag/?h=mvebu-fixes-5.13-1
>
> But it looks like it was not merged into 5.13. Are you going to re-send
> all pending patches to 5.14?

They have been merged in 5.14 during merged windows and they are now
also in 5.13.4. So I think everything is OK now.

Gregory

>
> On Thursday 17 June 2021 15:06:51 Gregory CLEMENT wrote:
>> Hello,
>>
>> Series applied on mvebu/fixes
>>
>> Thanks,
>>
>> Gregory
>>
>> > These 4 patches are just fixups. Per Andrew's request I have split them
>> > from V3 series, so they can be applied to stable.
>> >
>> > Marek Behún (2):
>> > firmware: turris-mox-rwtm: fix reply status decoding function
>> > firmware: turris-mox-rwtm: report failures better
>> >
>> > Pali Rohár (2):
>> > firmware: turris-mox-rwtm: fail probing when firmware does not support
>> > hwrng
>> > firmware: turris-mox-rwtm: show message about HWRNG registration
>> >
>> > drivers/firmware/turris-mox-rwtm.c | 55 +++++++++++++++++++++++++-----
>> > 1 file changed, 47 insertions(+), 8 deletions(-)
>> >
>> > --
>> > 2.20.1
>> >
>>
>> --
>> Gregory Clement, Bootlin
>> Embedded Linux and Kernel engineering
>> http://bootlin.com

--
Gregory Clement, Bootlin
Embedded Linux and Kernel engineering
http://bootlin.com