<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<font size="+3"><font size="+2">Hi,<br>
<br>
AES_REG_IV() registers should be read back at the end of
encryption or decryption operations and the values returned to
the caller.<br>
<br>
Add the code and helper to do just that.<br>
<br>
diff --git a/drivers/crypto/omap-aes.c
b/drivers/crypto/omap-aes.c
<br>
index 49bd56f..744885b
100644
<br>
---
a/drivers/crypto/omap-aes.c
<br>
+++
b/drivers/crypto/omap-aes.c
<br>
@@ -97,6 +97,13 @@ static void omap_aes_write_n(struct
omap_aes_dev *dd, u32 offset,<br>
omap_aes_write(dd, offset,
*value);
<br>
}
<br>
<br>
+static void omap_aes_read_n(struct omap_aes_dev *dd, u32
offset, <br>
+ u32 *value, int
count) <br>
+{
<br>
+ for (; count--; value++, offset +=
4)
<br>
+ *value = omap_aes_read(dd,
offset);
<br>
+}
<br>
+
<br>
static int omap_aes_hw_init(struct omap_aes_dev
*dd)
<br>
{
<br>
int
err;
<br>
@@ -389,6 +396,9 @@ static void omap_aes_finish_req(struct
omap_aes_dev *dd, int err)<br>
<br>
pr_debug("err: %d\n",
err);
<br>
<br>
+ if ((dd->flags & (FLAGS_CBC | FLAGS_CTR))
&&
dd->req->info)
<br>
+ omap_aes_read_n(dd, AES_REG_IV(dd, 0),
dd->req->info,
4); <br>
+
<br>
crypto_finalize_cipher_request(dd->engine, req,
err); <br>
<br>
<br>
<br>
<br>
</font></font>
</body>
</html>