Skip to content

Commit

Permalink
[CRYPTO] geode: Fix not inplace encryption
Browse files Browse the repository at this point in the history
Currently the Geode AES module fails to encrypt or decrypt if
the coherent bits are not set what is currently the case if the
encryption does not occur inplace. However, the encryption works
on my Geode machine _only_ if the coherent bits are always set.

Signed-off-by: Sebastian Siewior <sebastian@breakpoint.cc>
Acked-by: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
Sebastian Siewior authored and Herbert Xu committed Nov 11, 2007
1 parent 6e800af commit 2e21630
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/crypto/geode-aes.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,7 @@ geode_aes_crypt(struct geode_aes_op *op)
* we don't need to worry
*/

if (op->src == op->dst)
flags |= (AES_CTRL_DCA | AES_CTRL_SCA);
flags |= (AES_CTRL_DCA | AES_CTRL_SCA);

if (op->dir == AES_DIR_ENCRYPT)
flags |= AES_CTRL_ENCRYPT;
Expand Down

0 comments on commit 2e21630

Please sign in to comment.