]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: picoxcell - fix possible status FIFO overflow
authorJamie Iles <jamie@jamieiles.com>
Sun, 27 Mar 2011 02:48:29 +0000 (10:48 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sun, 27 Mar 2011 02:48:29 +0000 (10:48 +0800)
commit2ae47057974e9697cc42e3f6221fd93bcb54c0a0
tree1b1306360019360b23b60c56b86a38a55284ea07
parent0e4ca1cbb6c5887511a4fcd25dd8cf1f9c4dd61e
crypto: picoxcell - fix possible status FIFO overflow

The SPAcc's have 2 equally sized FIFO's - a command FIFO and a status
FIFO.  The command FIFO takes the requests that are to be performed and
the status FIFO reports the results.  It is possible to get into the
situation where there are more free spaces in the command FIFO than the
status FIFO if we don't empty the status FIFO quickly enough resulting
in a possible overflow of the status FIFO.  This can result in incorrect
status being reported in the status FIFO.

Make sure that when we are submitting requests the number of requests
that have been dispatched but not yet popped from the status FIFO does
not exceed the size of a single FIFO.

Signed-off-by: Jamie Iles <jamie@jamieiles.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/picoxcell_crypto.c