]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ENGR00234401: CAAM: Fix incorrect invalidate call for output ring
authorSteve Cornelius <steve.cornelius@freescale.com>
Tue, 20 Nov 2012 23:21:26 +0000 (16:21 -0700)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:35:45 +0000 (08:35 +0200)
commit81b4a0ec01f98ede900998363860bb66dfc6d2b5
treeb74b7450b7868885622654ab8d06e158aa4cb08a
parent1d1601a22ea44eb02b6f3adcc6c347f783a28d43
ENGR00234401: CAAM: Fix incorrect invalidate call for output ring

The job ring driver exhibited a hang condition in the top of
caam_jr_dequeue() where a BUG_ON statement looks for a condition
where the output ring is said to have valid entries by the ring logic,
but the ring entries apparently have NULL descriptor pointers.

In the initial ARM port of this driver, the cache flush call
of the output ring content occured before the output ring read index
register read occurred, exposing a condition where the driver sensed valid
output entries, yet the entries written by the ring hardware were not
invalidated, and therefore were not visible to the processor, appearing
as false NULL entries.

This patch relocates the invalidate call to immediately follow the
check of the output read index, where it is required.

Signed-off-by: Vicki Milhoan <vicki.milhoan@freescale.com>
Signed-off-by: Steve Cornelius <steve.cornelius@freescale.com>
Signed-off-by: Terry Lv <r65388@freescale.com>
drivers/crypto/caam/jr.c