• Kim Phillips's avatar
    crypto: talitos - Perform auth check in h/w if on sec 2.1 and above · fe5720e2
    Kim Phillips authored
    SEC version 2.1 and above adds the capability to do the IPSec ICV
    memcmp in h/w. Results of the cmp are written back in the descriptor
    header, along with the done status.  A new callback is added that
    checks these ICCR bits instead of performing the memcmp on the core,
    and is enabled by h/w capability.
    Signed-off-by: default avatarKim Phillips <kim.phillips@freescale.com>
    
    After testing on different parts, another condition was added
    before using h/w auth check because different
    SEC revisions require different handling.
    
    The SEC 3.0 allows a more flexible link table where
    the auth data can span separate link table entries.
    The SEC 2.4/2.1 does not support this case.
    So a test was added in the decrypt routine
    for a fragmented case; the h/w auth check is disallowed for
    revisions not having the extent in the link table;
    in this case the hw auth check is done by software.
    
    A portion of a previous change for SEC 3.0 link table handling
    was removed since it became dead code with the hw auth check supported.
    
    This seems to be the best compromise for using hw auth check
    on supporting SEC revisions; it keeps the link table logic
    simpler for the fragmented cases.
    Signed-off-by: default avatarLee Nipper <lee.nipper@freescale.com>
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    fe5720e2
talitos.c 45.5 KB