From 2fce7cd9807c03f2f247caa2c31e90e5734b7d9a Mon Sep 17 00:00:00 2001 From: Ralph Wuerthner Date: Fri, 8 Dec 2006 15:54:07 +0100 Subject: [PATCH] --- yaml --- r: 43863 b: refs/heads/master c: 85eca8503997cf3a869b159954f703530c865299 h: refs/heads/master i: 43861: 34cce67fff0b72ed7227f962eb54b1bc61b26a8d 43859: 05bc4759826821cc8a52720752391a8a51dfa408 43855: d0a67c4cb07a6a313a218ec830d266d76081a813 v: v3 --- [refs] | 2 +- trunk/drivers/s390/crypto/ap_bus.c | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index bdb6d6c51b44..e2f1f42198d6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c16375329c2ab4667df873394c4be7a61d163c62 +refs/heads/master: 85eca8503997cf3a869b159954f703530c865299 diff --git a/trunk/drivers/s390/crypto/ap_bus.c b/trunk/drivers/s390/crypto/ap_bus.c index e4dc947e74e9..ad60afe5dd11 100644 --- a/trunk/drivers/s390/crypto/ap_bus.c +++ b/trunk/drivers/s390/crypto/ap_bus.c @@ -33,6 +33,7 @@ #include #include #include +#include #include "ap_bus.h" @@ -1128,6 +1129,19 @@ static void ap_poll_thread_stop(void) mutex_unlock(&ap_poll_thread_mutex); } +static void ap_reset(void) +{ + int i, j; + + for (i = 0; i < AP_DOMAINS; i++) + for (j = 0; j < AP_DEVICES; j++) + ap_reset_queue(AP_MKQID(j, i)); +} + +static struct reset_call ap_reset_call = { + .fn = ap_reset, +}; + /** * The module initialization code. */ @@ -1144,6 +1158,7 @@ int __init ap_module_init(void) printk(KERN_WARNING "AP instructions not installed.\n"); return -ENODEV; } + register_reset_call(&ap_reset_call); /* Create /sys/bus/ap. */ rc = bus_register(&ap_bus_type); @@ -1197,6 +1212,7 @@ int __init ap_module_init(void) bus_remove_file(&ap_bus_type, ap_bus_attrs[i]); bus_unregister(&ap_bus_type); out: + unregister_reset_call(&ap_reset_call); return rc; } @@ -1227,6 +1243,7 @@ void ap_module_exit(void) for (i = 0; ap_bus_attrs[i]; i++) bus_remove_file(&ap_bus_type, ap_bus_attrs[i]); bus_unregister(&ap_bus_type); + unregister_reset_call(&ap_reset_call); } #ifndef CONFIG_ZCRYPT_MONOLITHIC