diff options
Diffstat (limited to 'drivers/s390/crypto/zcrypt_pcica.c')
-rw-r--r-- | drivers/s390/crypto/zcrypt_pcica.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/s390/crypto/zcrypt_pcica.c b/drivers/s390/crypto/zcrypt_pcica.c index f2b71d8df01f..7a743f4c646c 100644 --- a/drivers/s390/crypto/zcrypt_pcica.c +++ b/drivers/s390/crypto/zcrypt_pcica.c | |||
@@ -24,6 +24,9 @@ | |||
24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #define KMSG_COMPONENT "zcrypt" | ||
28 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt | ||
29 | |||
27 | #include <linux/module.h> | 30 | #include <linux/module.h> |
28 | #include <linux/slab.h> | 31 | #include <linux/slab.h> |
29 | #include <linux/init.h> | 32 | #include <linux/init.h> |
@@ -199,6 +202,10 @@ static int convert_type84(struct zcrypt_device *zdev, | |||
199 | if (t84h->len < sizeof(*t84h) + outputdatalength) { | 202 | if (t84h->len < sizeof(*t84h) + outputdatalength) { |
200 | /* The result is too short, the PCICA card may not do that.. */ | 203 | /* The result is too short, the PCICA card may not do that.. */ |
201 | zdev->online = 0; | 204 | zdev->online = 0; |
205 | pr_err("Cryptographic device %x failed and was set offline\n", | ||
206 | zdev->ap_dev->qid); | ||
207 | ZCRYPT_DBF_DEV(DBF_ERR, zdev, "dev%04xo%drc%d", | ||
208 | zdev->ap_dev->qid, zdev->online, t84h->code); | ||
202 | return -EAGAIN; /* repeat the request on a different device. */ | 209 | return -EAGAIN; /* repeat the request on a different device. */ |
203 | } | 210 | } |
204 | BUG_ON(t84h->len > PCICA_MAX_RESPONSE_SIZE); | 211 | BUG_ON(t84h->len > PCICA_MAX_RESPONSE_SIZE); |
@@ -223,6 +230,10 @@ static int convert_response(struct zcrypt_device *zdev, | |||
223 | outputdata, outputdatalength); | 230 | outputdata, outputdatalength); |
224 | default: /* Unknown response type, this should NEVER EVER happen */ | 231 | default: /* Unknown response type, this should NEVER EVER happen */ |
225 | zdev->online = 0; | 232 | zdev->online = 0; |
233 | pr_err("Cryptographic device %x failed and was set offline\n", | ||
234 | zdev->ap_dev->qid); | ||
235 | ZCRYPT_DBF_DEV(DBF_ERR, zdev, "dev%04xo%dfail", | ||
236 | zdev->ap_dev->qid, zdev->online); | ||
226 | return -EAGAIN; /* repeat the request on a different device. */ | 237 | return -EAGAIN; /* repeat the request on a different device. */ |
227 | } | 238 | } |
228 | } | 239 | } |