Skip to content

Commit da56583

Browse files
hfreudeAlexander Gordeev
authored andcommitted
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: ed6776c ("s390/crypto: remove retry loop with sleep from PAES pkey invocation") Signed-off-by: Harald Freudenberger <[email protected]> Reviewed-by: Ingo Franzki <[email protected]> Reviewed-by: Holger Dengler <[email protected]> Signed-off-by: Alexander Gordeev <[email protected]>
1 parent c0e983b commit da56583

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/s390/crypto/zcrypt_ccamisc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ int cca_sec2protkey(u16 cardnr, u16 domain,
658658
(int)prepcblk->ccp_rtcode,
659659
(int)prepcblk->ccp_rscode);
660660
if (prepcblk->ccp_rtcode == 8 && prepcblk->ccp_rscode == 2290)
661-
rc = -EAGAIN;
661+
rc = -EBUSY;
662662
else
663663
rc = -EIO;
664664
goto out;
@@ -1263,7 +1263,7 @@ int cca_cipher2protkey(u16 cardnr, u16 domain, const u8 *ckey,
12631263
(int)prepcblk->ccp_rtcode,
12641264
(int)prepcblk->ccp_rscode);
12651265
if (prepcblk->ccp_rtcode == 8 && prepcblk->ccp_rscode == 2290)
1266-
rc = -EAGAIN;
1266+
rc = -EBUSY;
12671267
else
12681268
rc = -EIO;
12691269
goto out;
@@ -1426,7 +1426,7 @@ int cca_ecc2protkey(u16 cardnr, u16 domain, const u8 *key,
14261426
(int)prepcblk->ccp_rtcode,
14271427
(int)prepcblk->ccp_rscode);
14281428
if (prepcblk->ccp_rtcode == 8 && prepcblk->ccp_rscode == 2290)
1429-
rc = -EAGAIN;
1429+
rc = -EBUSY;
14301430
else
14311431
rc = -EIO;
14321432
goto out;

0 commit comments

Comments
 (0)