aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/crypto/zcrypt_error.h
diff options
context:
space:
mode:
authorHolger Dengler <hd@linux.vnet.ibm.com>2012-09-10 21:34:26 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2012-09-26 15:45:17 +0200
commitdabecb2933f7ae901c88cb10c71ab38ca7dfc38f (patch)
tree04d0094b077eddcf47c3c692dfc0eeda2de727d6 /drivers/s390/crypto/zcrypt_error.h
parents390/vmlogrdr: change return value from -ENOSYS to -EOPNOTSUPP (diff)
downloadlinux-dev-dabecb2933f7ae901c88cb10c71ab38ca7dfc38f.tar.xz
linux-dev-dabecb2933f7ae901c88cb10c71ab38ca7dfc38f.zip
s390/zcryt: Handle AP configuration changes
Detect external AP bus configuration changes and request an AP device rescan. Signed-off-by: Holger Dengler <hd@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/crypto/zcrypt_error.h')
-rw-r--r--drivers/s390/crypto/zcrypt_error.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/s390/crypto/zcrypt_error.h b/drivers/s390/crypto/zcrypt_error.h
index 0965e2626d18..0079b6617211 100644
--- a/drivers/s390/crypto/zcrypt_error.h
+++ b/drivers/s390/crypto/zcrypt_error.h
@@ -26,6 +26,8 @@
#ifndef _ZCRYPT_ERROR_H_
#define _ZCRYPT_ERROR_H_
+#include <linux/atomic.h>
+#include "zcrypt_debug.h"
#include "zcrypt_api.h"
/**
@@ -108,16 +110,27 @@ static inline int convert_error(struct zcrypt_device *zdev,
* and then repeat the request.
*/
WARN_ON(1);
+ atomic_set(&zcrypt_rescan_req, 1);
zdev->online = 0;
+ ZCRYPT_DBF_DEV(DBF_ERR, zdev, "dev%04xo%drc%d",
+ zdev->ap_dev->qid,
+ zdev->online, ehdr->reply_code);
return -EAGAIN;
case REP82_ERROR_TRANSPORT_FAIL:
case REP82_ERROR_MACHINE_FAILURE:
// REP88_ERROR_MODULE_FAILURE // '10' CEX2A
/* If a card fails disable it and repeat the request. */
+ atomic_set(&zcrypt_rescan_req, 1);
zdev->online = 0;
+ ZCRYPT_DBF_DEV(DBF_ERR, zdev, "dev%04xo%drc%d",
+ zdev->ap_dev->qid,
+ zdev->online, ehdr->reply_code);
return -EAGAIN;
default:
zdev->online = 0;
+ ZCRYPT_DBF_DEV(DBF_ERR, zdev, "dev%04xo%drc%d",
+ zdev->ap_dev->qid,
+ zdev->online, ehdr->reply_code);
return -EAGAIN; /* repeat the request on a different device. */
}
}