Lines Matching full:service

14 static void adf_service_add(struct service_hndl *service)  in adf_service_add()  argument
17 list_add(&service->list, &service_table); in adf_service_add()
21 int adf_service_register(struct service_hndl *service) in adf_service_register() argument
23 memset(service->init_status, 0, sizeof(service->init_status)); in adf_service_register()
24 memset(service->start_status, 0, sizeof(service->start_status)); in adf_service_register()
25 adf_service_add(service); in adf_service_register()
29 static void adf_service_remove(struct service_hndl *service) in adf_service_remove() argument
32 list_del(&service->list); in adf_service_remove()
36 int adf_service_unregister(struct service_hndl *service) in adf_service_unregister() argument
40 for (i = 0; i < ARRAY_SIZE(service->init_status); i++) { in adf_service_unregister()
41 if (service->init_status[i] || service->start_status[i]) { in adf_service_unregister()
42 pr_err("QAT: Could not remove active service\n"); in adf_service_unregister()
46 adf_service_remove(service); in adf_service_unregister()
61 struct service_hndl *service; in adf_dev_init() local
125 service = list_entry(list_itr, struct service_hndl, list); in adf_dev_init()
126 if (service->event_hld(accel_dev, ADF_EVENT_INIT)) { in adf_dev_init()
128 "Failed to initialise service %s\n", in adf_dev_init()
129 service->name); in adf_dev_init()
132 set_bit(accel_dev->accel_id, service->init_status); in adf_dev_init()
140 * adf_dev_start() - Start acceleration service for the given accel device
152 struct service_hndl *service; in adf_dev_start() local
173 service = list_entry(list_itr, struct service_hndl, list); in adf_dev_start()
174 if (service->event_hld(accel_dev, ADF_EVENT_START)) { in adf_dev_start()
176 "Failed to start service %s\n", in adf_dev_start()
177 service->name); in adf_dev_start()
180 set_bit(accel_dev->accel_id, service->start_status); in adf_dev_start()
199 * adf_dev_stop() - Stop acceleration service for the given accel device
210 struct service_hndl *service; in adf_dev_stop() local
228 service = list_entry(list_itr, struct service_hndl, list); in adf_dev_stop()
229 if (!test_bit(accel_dev->accel_id, service->start_status)) in adf_dev_stop()
231 ret = service->event_hld(accel_dev, ADF_EVENT_STOP); in adf_dev_stop()
233 clear_bit(accel_dev->accel_id, service->start_status); in adf_dev_stop()
236 clear_bit(accel_dev->accel_id, service->start_status); in adf_dev_stop()
262 struct service_hndl *service; in adf_dev_shutdown() local
286 service = list_entry(list_itr, struct service_hndl, list); in adf_dev_shutdown()
287 if (!test_bit(accel_dev->accel_id, service->init_status)) in adf_dev_shutdown()
289 if (service->event_hld(accel_dev, ADF_EVENT_SHUTDOWN)) in adf_dev_shutdown()
291 "Failed to shutdown service %s\n", in adf_dev_shutdown()
292 service->name); in adf_dev_shutdown()
294 clear_bit(accel_dev->accel_id, service->init_status); in adf_dev_shutdown()
321 struct service_hndl *service; in adf_dev_restarting_notify() local
325 service = list_entry(list_itr, struct service_hndl, list); in adf_dev_restarting_notify()
326 if (service->event_hld(accel_dev, ADF_EVENT_RESTARTING)) in adf_dev_restarting_notify()
328 "Failed to restart service %s.\n", in adf_dev_restarting_notify()
329 service->name); in adf_dev_restarting_notify()
336 struct service_hndl *service; in adf_dev_restarted_notify() local
340 service = list_entry(list_itr, struct service_hndl, list); in adf_dev_restarted_notify()
341 if (service->event_hld(accel_dev, ADF_EVENT_RESTARTED)) in adf_dev_restarted_notify()
343 "Failed to restart service %s.\n", in adf_dev_restarted_notify()
344 service->name); in adf_dev_restarted_notify()