s390/zcrypt: use explicit return code for flushed requests
If a AP device is removed while messages are still pending, the requests are cancelled by calling the message receive function with an error pointer for the reply. The message type receive handler recognize this and create a fake hardware error TYPE82_RSP_CODE / REP82_ERROR_MACHINE_FAILURE. The message with the hardware error then causes a printk and a return code of -EAGAIN. Replace the intricate scheme with an explicit return code for this sitation and avoid the error message. Reviewd-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
@@ -187,6 +187,7 @@ struct ap_message {
|
||||
unsigned long long psmid; /* Message id. */
|
||||
void *message; /* Pointer to message buffer. */
|
||||
size_t length; /* Message length. */
|
||||
int rc; /* Return code for this message */
|
||||
|
||||
void *private; /* ap driver private pointer. */
|
||||
unsigned int special:1; /* Used for special commands. */
|
||||
@@ -219,6 +220,7 @@ static inline void ap_init_message(struct ap_message *ap_msg)
|
||||
{
|
||||
ap_msg->psmid = 0;
|
||||
ap_msg->length = 0;
|
||||
ap_msg->rc = 0;
|
||||
ap_msg->special = 0;
|
||||
ap_msg->receive = NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user