X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=drivers%2Fs390%2Fcrypto%2Fap_bus.c;h=c7d1355237b668d9342320366b544de205643187;hb=920841d8d1d61bc12b43f95a579a5374f6d98f81;hp=ad60afe5dd11cbccc3927347018f94eec8b120f7;hpb=40b20c257a13c5a526ac540bc5e43d0fdf29792a;p=powerpc.git diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c index ad60afe5dd..c7d1355237 100644 --- a/drivers/s390/crypto/ap_bus.c +++ b/drivers/s390/crypto/ap_bus.c @@ -465,7 +465,7 @@ static int ap_device_probe(struct device *dev) * Flush all requests from the request/pending queue of an AP device. * @ap_dev: pointer to the AP device. */ -static inline void __ap_flush_queue(struct ap_device *ap_dev) +static void __ap_flush_queue(struct ap_device *ap_dev) { struct ap_message *ap_msg, *next; @@ -587,7 +587,7 @@ static struct bus_attribute *const ap_bus_attrs[] = { /** * Pick one of the 16 ap domains. */ -static inline int ap_select_domain(void) +static int ap_select_domain(void) { int queue_depth, device_type, count, max_count, best_domain; int rc, i, j; @@ -825,7 +825,7 @@ static inline void ap_schedule_poll_timer(void) * required, bit 2^1 is set if the poll timer needs to get armed * Returns 0 if the device is still present, -ENODEV if not. */ -static inline int ap_poll_read(struct ap_device *ap_dev, unsigned long *flags) +static int ap_poll_read(struct ap_device *ap_dev, unsigned long *flags) { struct ap_queue_status status; struct ap_message *ap_msg; @@ -872,7 +872,7 @@ static inline int ap_poll_read(struct ap_device *ap_dev, unsigned long *flags) * required, bit 2^1 is set if the poll timer needs to get armed * Returns 0 if the device is still present, -ENODEV if not. */ -static inline int ap_poll_write(struct ap_device *ap_dev, unsigned long *flags) +static int ap_poll_write(struct ap_device *ap_dev, unsigned long *flags) { struct ap_queue_status status; struct ap_message *ap_msg; @@ -1129,7 +1129,15 @@ static void ap_poll_thread_stop(void) mutex_unlock(&ap_poll_thread_mutex); } -static void ap_reset(void) +static void ap_reset_domain(void) +{ + int i; + + for (i = 0; i < AP_DEVICES; i++) + ap_reset_queue(AP_MKQID(i, ap_domain_index)); +} + +static void ap_reset_all(void) { int i, j; @@ -1139,7 +1147,7 @@ static void ap_reset(void) } static struct reset_call ap_reset_call = { - .fn = ap_reset, + .fn = ap_reset_all, }; /** @@ -1229,10 +1237,12 @@ void ap_module_exit(void) int i; struct device *dev; + ap_reset_domain(); ap_poll_thread_stop(); del_timer_sync(&ap_config_timer); del_timer_sync(&ap_poll_timer); destroy_workqueue(ap_work_queue); + tasklet_kill(&ap_tasklet); s390_root_dev_unregister(ap_root_device); while ((dev = bus_find_device(&ap_bus_type, NULL, NULL, __ap_match_all)))