mxs-dcp: Failed to register sha1 hash

2015-11-26 Thread Fabio Estevam
Hi,

On kernel 4.1.13 and also on 4.4.0-rc2-next-20151126 I see the
following error on mx28:

[2.245453] mxs-dcp 80028000.dcp: Failed to register sha1 hash!
[2.253928] mxs-dcp: probe of 80028000.dcp failed with error -22

Does anyone have any idea how to fix this?

Thanks,

Fabio Estevam
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: mxs-dcp: Failed to register sha1 hash

2015-11-26 Thread Stephan Mueller
Am Donnerstag, 26. November 2015, 13:14:12 schrieb Fabio Estevam:

Hi Fabio,

> Hi,
> 
> On kernel 4.1.13 and also on 4.4.0-rc2-next-20151126 I see the
> following error on mx28:
> 
> [2.245453] mxs-dcp 80028000.dcp: Failed to register sha1 hash!
> [2.253928] mxs-dcp: probe of 80028000.dcp failed with error -22
> 
> Does anyone have any idea how to fix this?

Briefly looking into drivers/crypto/mxs-dcp.c, it is an ahash and does not 
contain halg.statesize in the algo definitions. Thus it looks very much like 
the same issue that I see with ghash.


-- 
Ciao
Stephan
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: mxs-dcp: Failed to register sha1 hash

2015-11-26 Thread Fabio Estevam
Hi Stephan,

On Thu, Nov 26, 2015 at 1:25 PM, Stephan Mueller  wrote:

> Briefly looking into drivers/crypto/mxs-dcp.c, it is an ahash and does not
> contain halg.statesize in the algo definitions. Thus it looks very much like
> the same issue that I see with ghash.

Thanks for your suggestion!

You are right: this makes the error goes away:

--- a/drivers/crypto/mxs-dcp.c
+++ b/drivers/crypto/mxs-dcp.c
@@ -836,6 +836,7 @@ static struct ahash_alg dcp_sha1_alg = {
.digest = dcp_sha_digest,
.halg   = {
.digestsize = SHA1_DIGEST_SIZE,
+   .statesize  = sizeof(struct sha1_state),
.base   = {
.cra_name   = "sha1",
.cra_driver_name= "sha1-dcp",
@@ -860,6 +861,7 @@ static struct ahash_alg dcp_sha256_alg = {
.digest = dcp_sha_digest,
.halg   = {
.digestsize = SHA256_DIGEST_SIZE,
+   .statesize  = sizeof(struct sha256_state),
.base   = {
.cra_name   = "sha256",
.cra_driver_name= "sha256-dcp",


Will submit it as a formal patch.

Thanks!
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html