Changeset 1a5b252 in mainline for uspace/lib/drv/include/ddf/driver.h


Ignore:
Timestamp:
2011-08-21T11:54:15Z (13 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8cc4ddb
Parents:
e64df9a
Message:

DDF support for function offlining and onlining. This allows
(anticipated) hot removal — support needs to be added in individual
drivers, currently there is support in test1 and partially in rootvirt.
Surprise removal is not supported. TODO: synchronization.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/include/ddf/driver.h

    re64df9a r1a5b252  
    132132typedef struct driver_ops {
    133133        /** Callback method for passing a new device to the device driver */
    134         int (*add_device)(ddf_dev_t *dev);
    135         /* TODO: add other generic driver operations */
     134        int (*add_device)(ddf_dev_t *);
     135        /** Ask driver to remove a device */
     136        int (*dev_remove)(ddf_dev_t *);
     137        /** Ask driver to online a specific function */
     138        int (*fun_online)(ddf_fun_t *);
     139        /** Ask driver to offline a specific function */
     140        int (*fun_offline)(ddf_fun_t *);
    136141} driver_ops_t;
    137142
     
    150155extern int ddf_fun_bind(ddf_fun_t *);
    151156extern int ddf_fun_unbind(ddf_fun_t *);
     157extern int ddf_fun_online(ddf_fun_t *);
     158extern int ddf_fun_offline(ddf_fun_t *);
    152159extern int ddf_fun_add_match_id(ddf_fun_t *, const char *, int);
    153160
Note: See TracChangeset for help on using the changeset viewer.