• Dan Douglass's avatar
    crypto: mxs-dcp - Implement sha import/export · ea9e7568
    Dan Douglass authored
    The mxs-dcp driver fails to probe if sha1/sha256 are supported:
    
    [    2.455404] mxs-dcp 80028000.dcp: Failed to register sha1 hash!
    [    2.464042] mxs-dcp: probe of 80028000.dcp failed with error -22
    
    This happens because since commit 8996eafd ("crypto: ahash - ensure
    statesize is non-zero") import/export is mandatory and ahash_prepare_alg
    fails on statesize == 0.
    
    A set of dummy import/export functions were implemented in commit
    9190b6fd ("crypto: mxs-dcp - Add empty hash export and import") but
    statesize is still zero and the driver fails to probe. That change was
    apparently part of some unrelated refactoring.
    
    Fix by actually implementing import/export.
    Signed-off-by: default avatarDan Douglass <dan.douglass@nxp.com>
    Signed-off-by: default avatarLeonard Crestez <leonard.crestez@nxp.com>
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    ea9e7568
mxs-dcp.c 27.8 KB