Changeset 8300c72 in mainline for uspace/srv/devman/client_conn.c
- Timestamp:
- 2025-03-03T22:58:05Z (13 hours ago)
- Branches:
- master
- Children:
- 77a0119
- Parents:
- f35749e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/devman/client_conn.c
rf35749e r8300c72 1 1 /* 2 * Copyright (c) 2025 Jiri Svoboda 2 3 * Copyright (c) 2010 Lenka Trochtova 3 * Copyright (c) 2013 Jiri Svoboda4 4 * All rights reserved. 5 5 * … … 479 479 } 480 480 481 /** Quiesce function. 482 * 483 * Send a request to quiesce a function to the responsible driver. 484 */ 485 static void devman_fun_quiesce(ipc_call_t *icall) 486 { 487 fun_node_t *fun; 488 dev_node_t *child; 489 errno_t rc; 490 491 fun = find_fun_node(&device_tree, ipc_get_arg1(icall)); 492 if (fun == NULL) { 493 async_answer_0(icall, ENOENT); 494 return; 495 } 496 497 fibril_rwlock_read_lock(&device_tree.rwlock); 498 499 /* Check function state */ 500 if (fun->state == FUN_REMOVED) { 501 fibril_rwlock_read_unlock(&device_tree.rwlock); 502 async_answer_0(icall, ENOENT); 503 return; 504 } 505 506 child = fun->child; 507 dev_add_ref(child); 508 fibril_rwlock_read_unlock(&device_tree.rwlock); 509 510 rc = driver_dev_quiesce(&device_tree, child); 511 fun_del_ref(fun); 512 513 async_answer_0(icall, rc); 514 } 515 481 516 /** Find handle for the function instance identified by its service ID. */ 482 517 static void devman_fun_sid_to_handle(ipc_call_t *icall) … … 790 825 devman_fun_offline(&call); 791 826 break; 827 case DEVMAN_FUN_QUIESCE: 828 devman_fun_quiesce(&call); 829 break; 792 830 case DEVMAN_FUN_SID_TO_HANDLE: 793 831 devman_fun_sid_to_handle(&call);
Note:
See TracChangeset
for help on using the changeset viewer.