diff options
author | Ralph Wuerthner <rwuerthn@de.ibm.com> | 2006-12-15 11:18:17 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2006-12-15 11:18:17 -0500 |
commit | 13e742babda8cda7df55b8d1ca67d46b4f8dea84 (patch) | |
tree | faa616855985444b2241af1a1e3aa68ebe97c8d5 /drivers/s390 | |
parent | 028cf917b258b11286437a1b96e64030f94fd46d (diff) |
[S390] zcrypt: module unload fixes.
Add code to reset all queues for a domain and add missing tasklet_kill
call to ap bus module exit code.
Signed-off-by: Ralph Wuerthner <rwuerthn@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/crypto/ap_bus.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c index ad60afe5dd11..81b5899f4010 100644 --- a/drivers/s390/crypto/ap_bus.c +++ b/drivers/s390/crypto/ap_bus.c | |||
@@ -1129,7 +1129,15 @@ static void ap_poll_thread_stop(void) | |||
1129 | mutex_unlock(&ap_poll_thread_mutex); | 1129 | mutex_unlock(&ap_poll_thread_mutex); |
1130 | } | 1130 | } |
1131 | 1131 | ||
1132 | static void ap_reset(void) | 1132 | static void ap_reset_domain(void) |
1133 | { | ||
1134 | int i; | ||
1135 | |||
1136 | for (i = 0; i < AP_DEVICES; i++) | ||
1137 | ap_reset_queue(AP_MKQID(i, ap_domain_index)); | ||
1138 | } | ||
1139 | |||
1140 | static void ap_reset_all(void) | ||
1133 | { | 1141 | { |
1134 | int i, j; | 1142 | int i, j; |
1135 | 1143 | ||
@@ -1139,7 +1147,7 @@ static void ap_reset(void) | |||
1139 | } | 1147 | } |
1140 | 1148 | ||
1141 | static struct reset_call ap_reset_call = { | 1149 | static struct reset_call ap_reset_call = { |
1142 | .fn = ap_reset, | 1150 | .fn = ap_reset_all, |
1143 | }; | 1151 | }; |
1144 | 1152 | ||
1145 | /** | 1153 | /** |
@@ -1229,10 +1237,12 @@ void ap_module_exit(void) | |||
1229 | int i; | 1237 | int i; |
1230 | struct device *dev; | 1238 | struct device *dev; |
1231 | 1239 | ||
1240 | ap_reset_domain(); | ||
1232 | ap_poll_thread_stop(); | 1241 | ap_poll_thread_stop(); |
1233 | del_timer_sync(&ap_config_timer); | 1242 | del_timer_sync(&ap_config_timer); |
1234 | del_timer_sync(&ap_poll_timer); | 1243 | del_timer_sync(&ap_poll_timer); |
1235 | destroy_workqueue(ap_work_queue); | 1244 | destroy_workqueue(ap_work_queue); |
1245 | tasklet_kill(&ap_tasklet); | ||
1236 | s390_root_dev_unregister(ap_root_device); | 1246 | s390_root_dev_unregister(ap_root_device); |
1237 | while ((dev = bus_find_device(&ap_bus_type, NULL, NULL, | 1247 | while ((dev = bus_find_device(&ap_bus_type, NULL, NULL, |
1238 | __ap_match_all))) | 1248 | __ap_match_all))) |