aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/crypto/zcrypt_error.h
diff options
context:
space:
mode:
authorHolger Dengler <hd@linux.vnet.ibm.com>2012-09-10 15:34:26 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2012-09-26 09:45:17 -0400
commitdabecb2933f7ae901c88cb10c71ab38ca7dfc38f (patch)
tree04d0094b077eddcf47c3c692dfc0eeda2de727d6 /drivers/s390/crypto/zcrypt_error.h
parent745e967a49b26725cc9f30105ff67c8fee8926d6 (diff)
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 @@
26#ifndef _ZCRYPT_ERROR_H_ 26#ifndef _ZCRYPT_ERROR_H_
27#define _ZCRYPT_ERROR_H_ 27#define _ZCRYPT_ERROR_H_
28 28
29#include <linux/atomic.h>
30#include "zcrypt_debug.h"
29#include "zcrypt_api.h" 31#include "zcrypt_api.h"
30 32
31/** 33/**
@@ -108,16 +110,27 @@ static inline int convert_error(struct zcrypt_device *zdev,
108 * and then repeat the request. 110 * and then repeat the request.
109 */ 111 */
110 WARN_ON(1); 112 WARN_ON(1);
113 atomic_set(&zcrypt_rescan_req, 1);
111 zdev->online = 0; 114 zdev->online = 0;
115 ZCRYPT_DBF_DEV(DBF_ERR, zdev, "dev%04xo%drc%d",
116 zdev->ap_dev->qid,
117 zdev->online, ehdr->reply_code);
112 return -EAGAIN; 118 return -EAGAIN;
113 case REP82_ERROR_TRANSPORT_FAIL: 119 case REP82_ERROR_TRANSPORT_FAIL:
114 case REP82_ERROR_MACHINE_FAILURE: 120 case REP82_ERROR_MACHINE_FAILURE:
115 // REP88_ERROR_MODULE_FAILURE // '10' CEX2A 121 // REP88_ERROR_MODULE_FAILURE // '10' CEX2A
116 /* If a card fails disable it and repeat the request. */ 122 /* If a card fails disable it and repeat the request. */
123 atomic_set(&zcrypt_rescan_req, 1);
117 zdev->online = 0; 124 zdev->online = 0;
125 ZCRYPT_DBF_DEV(DBF_ERR, zdev, "dev%04xo%drc%d",
126 zdev->ap_dev->qid,
127 zdev->online, ehdr->reply_code);
118 return -EAGAIN; 128 return -EAGAIN;
119 default: 129 default:
120 zdev->online = 0; 130 zdev->online = 0;
131 ZCRYPT_DBF_DEV(DBF_ERR, zdev, "dev%04xo%drc%d",
132 zdev->ap_dev->qid,
133 zdev->online, ehdr->reply_code);
121 return -EAGAIN; /* repeat the request on a different device. */ 134 return -EAGAIN; /* repeat the request on a different device. */
122 } 135 }
123} 136}