Skip to content
Snippets Groups Projects
Commit b62ffd8c authored by Horia Geanta's avatar Horia Geanta Committed by Herbert Xu
Browse files

crypto: talitos - fix locating offending descriptor in error path


Commit 3e721aeb
("crypto: talitos - handle descriptor not found in error path")
tried to address the fact that CDPR (Current Descriptor Pointer Register)
is unreliable.

As it turns out, there are still issues in the function detecting the
offending descriptor:
-only 32 bits of the descriptor address are read, however the address is
36-bit - since reset_channel() initializes channels with EAE (extended
address) bit set
-reading CDPR can return zero in cur_desc; when searching the channel
fifo for this address, cur_desc == dma_desc (= 0) case might happen,
leading to an oops when trying to return desc->hdr (desc is zero)
-read channel's .tail only once; the tail is a moving target; use a
local variable for the end of search condition

Signed-off-by: default avatarLei Xu <Lei.Xu@freescale.com>
Signed-off-by: default avatarHoria Geanta <horia.geanta@freescale.com>
Tested-by: default avatarKalyani Chowdhury <Kalyani.Chowdhury@freescale.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent f13ab86a
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment