mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 20:32:04 +09:00
crypto: tegra-aes: call INIT_COMPLETION before setting the transfer
Change-Id: I368a9bf8aa1c311532e54d18a813b556576b8da1 Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
This commit is contained in:
committed by
Colin Cross
parent
269ae7240f
commit
1c10dcd996
@@ -309,6 +309,7 @@ static int aes_start_crypt(struct tegra_aes_dev *dd, u32 in_addr, u32 out_addr,
|
||||
aes_writel(dd, value, SECURE_INPUT_SELECT);
|
||||
|
||||
aes_writel(dd, out_addr, SECURE_DEST_ADDR);
|
||||
INIT_COMPLETION(dd->op_complete);
|
||||
|
||||
for (i = 0; i < qlen - 1; i++) {
|
||||
do {
|
||||
@@ -320,7 +321,6 @@ static int aes_start_crypt(struct tegra_aes_dev *dd, u32 in_addr, u32 out_addr,
|
||||
aes_writel(dd, cmdq[i], ICMDQUE_WR);
|
||||
}
|
||||
|
||||
INIT_COMPLETION(dd->op_complete);
|
||||
ret = wait_for_completion_timeout(&dd->op_complete, msecs_to_jiffies(150));
|
||||
if (ret == 0) {
|
||||
dev_err(dd->dev, "timed out (0x%x)\n",
|
||||
|
||||
Reference in New Issue
Block a user