Skip to content

Commit

Permalink
s390/zcrypt: fixed domain scanning problem (again)
Browse files Browse the repository at this point in the history
Older machines with more then 16 domains need a special check before
PQAP instructions can be processed. With commit 5bc334b this
check was reverted by accident. This patch re-establishes the additional
code needed for checking the extended domains for older machines.

Signed-off-by: Ingo Tuchscherer <[email protected]>
Signed-off-by: Martin Schwidefsky <[email protected]>
  • Loading branch information
Ingo Tuchscherer authored and Martin Schwidefsky committed Feb 4, 2015
1 parent 5c75a0d commit ea96f78
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions drivers/s390/crypto/ap_bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -1060,9 +1060,13 @@ static inline int ap_test_config_card_id(unsigned int id)
*/
static inline int ap_test_config_domain(unsigned int domain)
{
if (!ap_configuration)
return 1;
return ap_test_config(ap_configuration->aqm, domain);
if (!ap_configuration) /* QCI not supported */
if (domain < 16)
return 1; /* then domains 0...15 are configured */
else
return 0;
else
return ap_test_config(ap_configuration->aqm, domain);
}

/*
Expand Down

0 comments on commit ea96f78

Please sign in to comment.