Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/devman/client_conn.c

    r8300c72 rfafb8e5  
    11/*
    2  * Copyright (c) 2025 Jiri Svoboda
    32 * Copyright (c) 2010 Lenka Trochtova
     3 * Copyright (c) 2013 Jiri Svoboda
    44 * All rights reserved.
    55 *
     
    479479}
    480480
    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 
    516481/** Find handle for the function instance identified by its service ID. */
    517482static void devman_fun_sid_to_handle(ipc_call_t *icall)
     
    825790                        devman_fun_offline(&call);
    826791                        break;
    827                 case DEVMAN_FUN_QUIESCE:
    828                         devman_fun_quiesce(&call);
    829                         break;
    830792                case DEVMAN_FUN_SID_TO_HANDLE:
    831793                        devman_fun_sid_to_handle(&call);
Note: See TracChangeset for help on using the changeset viewer.