From: Thorsten Blum <thorsten.blum@linux.dev>
To: Lothar Rubusch <l.rubusch@gmail.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
Nicolas Ferre <nicolas.ferre@microchip.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Claudiu Beznea <claudiu.beznea@tuxon.dev>,
stable@vger.kernel.org, linux-crypto@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] crypto: atmel-sha204a - Fix OTP sysfs read and error handling
Date: Sun, 15 Feb 2026 22:48:07 +0100 [thread overview]
Message-ID: <2E9C85C9-AD05-4BB3-A945-5ADECCB5C7E4@linux.dev> (raw)
In-Reply-To: <CAFXKEHbCrp57ruvCF2TXXcnoJF93Z5bdUd7Nt5WtM9_abtc66w@mail.gmail.com>
On 15. Feb 2026, at 22:09, Lothar Rubusch wrote:
> I tried to verify your patch on hardware today, unfortunately it did
> not work for me.
>
> My setup works with current atsha204a module in the below described way. When
> trying to dump the OTP zone on exactly the same hardware with a patched module,
> it only prints '0' and nothing more, see below.
>
> [...]
Hi Lothar,
thank you for your feedback. I made a small mistake in the return value
where I forgot to add the previous length 'len'. Sorry about that!
Unfortunately, I don't have the hardware right now to test this - could
you try if it works with the following change?
Thanks,
Thorsten
diff --git a/drivers/crypto/atmel-sha204a.c b/drivers/crypto/atmel-sha204a.c
index 793c8d739a0a..431672517dba 100644
--- a/drivers/crypto/atmel-sha204a.c
+++ b/drivers/crypto/atmel-sha204a.c
@@ -134,7 +134,7 @@ static ssize_t otp_show(struct device *dev,
for (i = 0; i < OTP_ZONE_SIZE; i++)
len += sysfs_emit_at(buf, len, "%02X", otp[i]);
- return sysfs_emit_at(buf, len, "\n");
+ return len + sysfs_emit_at(buf, len, "\n");
}
static DEVICE_ATTR_RO(otp);
next prev parent reply other threads:[~2026-02-15 21:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-15 12:41 [PATCH] crypto: atmel-sha204a - Fix OTP sysfs read and error handling Thorsten Blum
2026-02-15 21:09 ` Lothar Rubusch
2026-02-15 21:48 ` Thorsten Blum [this message]
2026-02-16 6:14 ` Lothar Rubusch
2026-02-16 7:53 ` Thorsten Blum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2E9C85C9-AD05-4BB3-A945-5ADECCB5C7E4@linux.dev \
--to=thorsten.blum@linux.dev \
--cc=alexandre.belloni@bootlin.com \
--cc=claudiu.beznea@tuxon.dev \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=l.rubusch@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nicolas.ferre@microchip.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox