Skip to content
  • Steve Cornelius's avatar
    ENGR00234401: CAAM: Fix incorrect invalidate call for output ring · 1e6e7f2b
    Steve Cornelius authored
    
    
    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: default avatarVicki Milhoan <vicki.milhoan@freescale.com>
    Signed-off-by: default avatarSteve Cornelius <steve.cornelius@freescale.com>
    Signed-off-by: default avatarTerry Lv <r65388@freescale.com>
    1e6e7f2b