mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 14:12:06 +00:00
s390/zcrypt: Use EBUSY to indicate temp unavailability
Use -EBUSY instead of -EAGAIN in zcrypt_ccamisc.c
in cases where the CCA card returns 8/2290 to indicate
a temporarily unavailability of this function.
Fixes: ed6776c96c
("s390/crypto: remove retry loop with sleep from PAES pkey invocation")
Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Reviewed-by: Ingo Franzki <ifranzki@linux.ibm.com>
Reviewed-by: Holger Dengler <dengler@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
This commit is contained in:
parent
c0e983b697
commit
da5658320b
@ -658,7 +658,7 @@ int cca_sec2protkey(u16 cardnr, u16 domain,
|
||||
(int)prepcblk->ccp_rtcode,
|
||||
(int)prepcblk->ccp_rscode);
|
||||
if (prepcblk->ccp_rtcode == 8 && prepcblk->ccp_rscode == 2290)
|
||||
rc = -EAGAIN;
|
||||
rc = -EBUSY;
|
||||
else
|
||||
rc = -EIO;
|
||||
goto out;
|
||||
@ -1263,7 +1263,7 @@ int cca_cipher2protkey(u16 cardnr, u16 domain, const u8 *ckey,
|
||||
(int)prepcblk->ccp_rtcode,
|
||||
(int)prepcblk->ccp_rscode);
|
||||
if (prepcblk->ccp_rtcode == 8 && prepcblk->ccp_rscode == 2290)
|
||||
rc = -EAGAIN;
|
||||
rc = -EBUSY;
|
||||
else
|
||||
rc = -EIO;
|
||||
goto out;
|
||||
@ -1426,7 +1426,7 @@ int cca_ecc2protkey(u16 cardnr, u16 domain, const u8 *key,
|
||||
(int)prepcblk->ccp_rtcode,
|
||||
(int)prepcblk->ccp_rscode);
|
||||
if (prepcblk->ccp_rtcode == 8 && prepcblk->ccp_rscode == 2290)
|
||||
rc = -EAGAIN;
|
||||
rc = -EBUSY;
|
||||
else
|
||||
rc = -EIO;
|
||||
goto out;
|
||||
|
Loading…
Reference in New Issue
Block a user