forked from luck/tmp_suning_uos_patched
s390/zcrypt: improve special ap message cmd handling
There exist very few ap messages which need to have the 'special' flag enabled. This flag tells the firmware layer to do some pre- and maybe postprocessing. However, it may happen that this special flag is enabled but the firmware is unable to deal with this kind of message and thus returns with reply code 0x41. For example older firmware may not know the newest messages triggered by the zcrypt device driver and thus react with reject and the named reply code. Unfortunately this reply code is not known to the zcrypt error routines and thus default behavior is to switch the ap queue offline. This patch now makes the ap error routine aware of the reply code and so userspace is informed about the bad processing result but the queue is not switched to offline state any more. Signed-off-by: Harald Freudenberger <freude@linux.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
parent
159491f3b5
commit
be53479101
|
@ -150,8 +150,8 @@ struct ica_xcRB {
|
|||
* @cprb_len: CPRB header length [0x0020]
|
||||
* @cprb_ver_id: CPRB version id. [0x04]
|
||||
* @pad_000: Alignment pad bytes
|
||||
* @flags: Admin cmd [0x80] or functional cmd [0x00]
|
||||
* @func_id: Function id / subtype [0x5434]
|
||||
* @flags: Admin bit [0x80], Special bit [0x20]
|
||||
* @func_id: Function id / subtype [0x5434] "T4"
|
||||
* @source_id: Source id [originator id]
|
||||
* @target_id: Target id [usage/ctrl domain id]
|
||||
* @ret_code: Return code
|
||||
|
|
|
@ -51,6 +51,7 @@ struct error_hdr {
|
|||
#define REP82_ERROR_FORMAT_FIELD 0x29
|
||||
#define REP82_ERROR_INVALID_COMMAND 0x30
|
||||
#define REP82_ERROR_MALFORMED_MSG 0x40
|
||||
#define REP82_ERROR_INVALID_SPECIAL_CMD 0x41
|
||||
#define REP82_ERROR_INVALID_DOMAIN_PRECHECK 0x42
|
||||
#define REP82_ERROR_RESERVED_FIELDO 0x50 /* old value */
|
||||
#define REP82_ERROR_WORD_ALIGNMENT 0x60
|
||||
|
@ -89,6 +90,7 @@ static inline int convert_error(struct zcrypt_queue *zq,
|
|||
case REP88_ERROR_MESSAGE_MALFORMD:
|
||||
case REP82_ERROR_INVALID_DOMAIN_PRECHECK:
|
||||
case REP82_ERROR_INVALID_DOMAIN_PENDING:
|
||||
case REP82_ERROR_INVALID_SPECIAL_CMD:
|
||||
// REP88_ERROR_INVALID_KEY // '82' CEX2A
|
||||
// REP88_ERROR_OPERAND // '84' CEX2A
|
||||
// REP88_ERROR_OPERAND_EVEN_MOD // '85' CEX2A
|
||||
|
|
Loading…
Reference in New Issue
Block a user