Lines Matching full:service

32 adf_service_add(struct service_hndl *service)  in adf_service_add()  argument
35 list_add(&service->list, &service_table); in adf_service_add()
40 adf_service_register(struct service_hndl *service) in adf_service_register() argument
42 memset(service->init_status, 0, sizeof(service->init_status)); in adf_service_register()
43 memset(service->start_status, 0, sizeof(service->start_status)); in adf_service_register()
44 adf_service_add(service); in adf_service_register()
49 adf_service_remove(struct service_hndl *service) in adf_service_remove() argument
52 list_del(&service->list); in adf_service_remove()
57 adf_service_unregister(struct service_hndl *service) in adf_service_unregister() argument
61 for (i = 0; i < ARRAY_SIZE(service->init_status); i++) { in adf_service_unregister()
62 if (service->init_status[i] || service->start_status[i]) { in adf_service_unregister()
63 pr_err("QAT: Could not remove active service [%d]\n", in adf_service_unregister()
68 adf_service_remove(service); in adf_service_unregister()
186 struct service_hndl *service; in adf_error_notifier() local
191 service = list_entry(list_itr, struct service_hndl, list); in adf_error_notifier()
192 if (service->event_hld(accel_dev, ADF_EVENT_ERROR)) in adf_error_notifier()
195 service->name); in adf_error_notifier()
264 struct service_hndl *service; in adf_dev_init() local
370 service = list_entry(list_itr, struct service_hndl, list); in adf_dev_init()
371 if (service->event_hld(accel_dev, ADF_EVENT_INIT)) { in adf_dev_init()
373 "Failed to initialise service %s\n", in adf_dev_init()
374 service->name); in adf_dev_init()
377 set_bit(accel_dev->accel_id, service->init_status); in adf_dev_init()
401 * adf_dev_start() - Start acceleration service for the given accel device
414 struct service_hndl *service; in adf_dev_start() local
463 service = list_entry(list_itr, struct service_hndl, list); in adf_dev_start()
464 if (service->event_hld(accel_dev, ADF_EVENT_START)) { in adf_dev_start()
466 "Failed to start service %s\n", in adf_dev_start()
467 service->name); in adf_dev_start()
470 set_bit(accel_dev->accel_id, service->start_status); in adf_dev_start()
496 * adf_dev_stop() - Stop acceleration service for the given accel device
508 struct service_hndl *service; in adf_dev_stop() local
537 service = list_entry(list_itr, struct service_hndl, list); in adf_dev_stop()
538 if (!test_bit(accel_dev->accel_id, service->start_status)) in adf_dev_stop()
540 clear_bit(accel_dev->accel_id, service->start_status); in adf_dev_stop()
570 struct service_hndl *service; in adf_dev_shutdown() local
602 service = list_entry(list_itr, struct service_hndl, list); in adf_dev_shutdown()
603 if (!test_bit(accel_dev->accel_id, service->init_status)) in adf_dev_shutdown()
605 if (service->event_hld(accel_dev, ADF_EVENT_SHUTDOWN)) in adf_dev_shutdown()
607 "Failed to shutdown service %s\n", in adf_dev_shutdown()
608 service->name); in adf_dev_shutdown()
610 clear_bit(accel_dev->accel_id, service->init_status); in adf_dev_shutdown()
648 * adf_dev_reset() - Reset acceleration service for the given accel device
666 struct service_hndl *service; in adf_dev_restarting_notify() local
671 service = list_entry(list_itr, struct service_hndl, list); in adf_dev_restarting_notify()
672 if (service->event_hld(accel_dev, ADF_EVENT_RESTARTING)) in adf_dev_restarting_notify()
674 "Failed to restart service %s.\n", in adf_dev_restarting_notify()
675 service->name); in adf_dev_restarting_notify()
707 struct service_hndl *service; in adf_dev_stop_notify_sync() local
712 service = list_entry(list_itr, struct service_hndl, list); in adf_dev_stop_notify_sync()
713 if (service->event_hld(accel_dev, ADF_EVENT_STOP)) in adf_dev_stop_notify_sync()
715 "Failed to restart service %s.\n", in adf_dev_stop_notify_sync()
716 service->name); in adf_dev_stop_notify_sync()
738 struct service_hndl *service; in adf_dev_restarted_notify() local
743 service = list_entry(list_itr, struct service_hndl, list); in adf_dev_restarted_notify()
744 if (service->event_hld(accel_dev, ADF_EVENT_RESTARTED)) in adf_dev_restarted_notify()
746 "Failed to restart service %s.\n", in adf_dev_restarted_notify()
747 service->name); in adf_dev_restarted_notify()