[PATCH v2 7/7] crypto: img-hash - Fix set_reqsize call

2016-08-05 Thread Will Thomas
Properly allocate enough memory to respect the fallback. Signed-off-by: Will Thomas --- drivers/crypto/img-hash.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/crypto/img-hash.c b/drivers/crypto/img-hash.c index 60410d7..a2e77b8 100644 --- a/drivers/crypto/img-hash.c +++ b/drivers

[PATCH v2 2/7] crypto: img-hash - Fix hash request context

2016-08-05 Thread Will Thomas
Move 0 length buffer to end of structure to stop overwriting fallback request data. This doesn't cause a bug itself as the buffer is never used alongside the fallback but should be changed. Signed-off-by: Will Thomas Reviewed-by: James Hartley --- drivers/crypto/img-hash.c | 4 +++- 1

[PATCH v2 0/7] crypto: img-hash - fixes and interface changes

2016-08-05 Thread Will Thomas
: img-hash - Add support for export and import crypto: img-hash - log a successful probe Will Thomas (4): crypto: img-hash - Fix null pointer exception crypto: img-hash - Fix hash request context crypto: img-hash - Reconfigure DMA Burst length crypto: img-hash - Fix set_reqsize call

[PATCH v2 4/7] crypto: img-hash - Add suspend resume hooks for img hash

2016-08-05 Thread Will Thomas
From: Govindraj Raja Current img hash claims sys and periph gate clocks and this can be gated in system suspend scenarios. Add support for Device pm ops for img hash to gate the clocks claimed by img hash. Signed-off-by: Govindraj Raja Reviewed-by: Will Thomas --- drivers/crypto/img-hash.c

[PATCH v2 1/7] crypto: img-hash - Fix null pointer exception

2016-08-05 Thread Will Thomas
Sporadic null pointer exceptions came from here. Fix them. Signed-off-by: Will Thomas Reviewed-by: James Hartley --- drivers/crypto/img-hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/img-hash.c b/drivers/crypto/img-hash.c index 68e8aa9..e5c941b 100644

[PATCH v2 3/7] crypto: img-hash - Reconfigure DMA Burst length

2016-08-05 Thread Will Thomas
Burst length of 16 drives the hash accelerator out of spec and causes stability issues in some cases. Reduce this to stop data being lost. Signed-off-by: Will Thomas Reviewed-by: James Hartley --- drivers/crypto/img-hash.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a

[PATCH v2 6/7] crypto: img-hash - log a successful probe

2016-08-05 Thread Will Thomas
From: James Hartley Currently the probe function only emits an output on success when debug is specifically enabled. It would be more useful if this happens by default. Signed-off-by: James Hartley Reviewed-by: Will Thomas --- drivers/crypto/img-hash.c | 2 +- 1 file changed, 1 insertion

[PATCH v2 5/7] crypto: img-hash - Add support for export and import

2016-08-05 Thread Will Thomas
From: James Hartley Currently the img-hash accelerator does not probe successfully due to a change in the checks made during registration with the crypto framework. This is due to import and export functions not being defined. Correct this. Signed-off-by: James Hartley Signed-off-by: Will

Re: [PATCH 2/6] crypto: img-hash - Fix hash request context

2016-07-13 Thread Will Thomas
On 12/07/16 08:43, Herbert Xu wrote: > Will Thomas wrote: >> Move 0 length buffer to end of structure to stop overwriting >> fallback request data. This doesn't cause a bug itself as the >> buffer is never used alongside the fallback but should be >> changed.

Re: [PATCH 5/6] crypto: img-hash - Add support for export and import

2016-07-13 Thread Will Thomas
Hi Herbert, I don't see any other drivers explicitly requesting a fallback driver by name. Anyways, should this be done using "sha1-generic" in the crypto_alloc_ahash call when setting up the fallback tfm? Thanks, Will On 12/07/16 08:49, Herbert Xu wrote: > Will Thomas wrot

[PATCH 1/6] crypto: img-hash - Fix null pointer exception

2016-07-11 Thread Will Thomas
Sporadic null pointer exceptions came from here. Fix them. Signed-off-by: Will Thomas Reviewed-by: James Hartley --- drivers/crypto/img-hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/img-hash.c b/drivers/crypto/img-hash.c index 68e8aa9..a5f270b 100644

[PATCH 5/6] crypto: img-hash - Add support for export and import

2016-07-11 Thread Will Thomas
From: James Hartley Currently the img-hash accelerator does not probe successfully due to a change in the checks made during registration with the crypto framework. This is due to import and export functions not being defined. Correct this. Signed-off-by: James Hartley Reviewed-by: Will Thomas

[PATCH 0/6] crypto: img-hash - fixes and interface changes

2016-07-11 Thread Will Thomas
-hash - log a successful probe Will Thomas (3): crypto: img-hash - Fix null pointer exception crypto: img-hash - Fix hash request context crypto: img-hash - Reconfigure DMA Burst length drivers/crypto/img-hash.c | 76 --- 1 file changed, 72

[PATCH 6/6] crypto: img-hash - log a successful probe

2016-07-11 Thread Will Thomas
From: James Hartley Currently the probe function only emits an output on success when debug is specifically enabled. It would be more useful if this happens by default. Signed-off-by: James Hartley Reviewed-by: Will Thomas --- drivers/crypto/img-hash.c | 2 +- 1 file changed, 1 insertion

[PATCH 2/6] crypto: img-hash - Fix hash request context

2016-07-11 Thread Will Thomas
Move 0 length buffer to end of structure to stop overwriting fallback request data. This doesn't cause a bug itself as the buffer is never used alongside the fallback but should be changed. Signed-off-by: Will Thomas Reviewed-by: James Hartley --- drivers/crypto/img-hash.c | 4 +++- 1

[PATCH 4/6] crypto: img-hash - Add suspend resume hooks for img hash

2016-07-11 Thread Will Thomas
From: Govindraj Raja Current img hash claims sys and periph gate clocks and this can be gated in system suspend scenarios. Add support for Device pm ops for img hash to gate the clocks claimed by img hash. Signed-off-by: Govindraj Raja Reviewed-by: Will Thomas --- drivers/crypto/img-hash.c

[PATCH 3/6] crypto: img-hash - Reconfigure DMA Burst length

2016-07-11 Thread Will Thomas
Burst length of 16 drives the hash accelerator out of spec and causes stability issues in some cases. Reduce this to stop data being lost. Signed-off-by: Will Thomas Reviewed-by: James Hartley --- drivers/crypto/img-hash.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a