Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Ralph Wuerthner and committed by
Martin Schwidefsky
13e742ba 028cf917

+12 -2
+12 -2
drivers/s390/crypto/ap_bus.c
··· 1129 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 1142 int i, j; 1135 1143 ··· 1147 1139 } 1148 1140 1149 1141 static struct reset_call ap_reset_call = { 1150 - .fn = ap_reset, 1142 + .fn = ap_reset_all, 1151 1143 }; 1152 1144 1153 1145 /** ··· 1237 1229 int i; 1238 1230 struct device *dev; 1239 1231 1232 + ap_reset_domain(); 1240 1233 ap_poll_thread_stop(); 1241 1234 del_timer_sync(&ap_config_timer); 1242 1235 del_timer_sync(&ap_poll_timer); 1243 1236 destroy_workqueue(ap_work_queue); 1237 + tasklet_kill(&ap_tasklet); 1244 1238 s390_root_dev_unregister(ap_root_device); 1245 1239 while ((dev = bus_find_device(&ap_bus_type, NULL, NULL, 1246 1240 __ap_match_all)))