Changeset d5ba17f in mainline


Ignore:
Timestamp:
2011-11-18T15:32:24Z (12 years ago)
Author:
Frantisek Princ <frantisek.princ@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
528e5b3
Parents:
b12ca16 (diff), 0c0f823b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge with mainline

Location:
uspace
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/isa/isa.c

    rb12ca16 rd5ba17f  
    108108static ddf_dev_ops_t isa_fun_ops;
    109109
    110 static int isa_add_device(ddf_dev_t *dev);
     110static int isa_dev_add(ddf_dev_t *dev);
    111111static int isa_dev_remove(ddf_dev_t *dev);
    112112static int isa_fun_online(ddf_fun_t *fun);
     
    115115/** The isa device driver's standard operations */
    116116static driver_ops_t isa_ops = {
    117         .add_device = &isa_add_device,
     117        .dev_add = &isa_dev_add,
    118118        .dev_remove = &isa_dev_remove,
    119119        .fun_online = &isa_fun_online,
     
    494494}
    495495
    496 static int isa_add_device(ddf_dev_t *dev)
     496static int isa_dev_add(ddf_dev_t *dev)
    497497{
    498498        isa_bus_t *isa;
    499499
    500         ddf_msg(LVL_DEBUG, "isa_add_device, device handle = %d",
     500        ddf_msg(LVL_DEBUG, "isa_dev_add, device handle = %d",
    501501            (int) dev->handle);
    502502
  • uspace/drv/bus/pci/pciintel/pci.c

    rb12ca16 rd5ba17f  
    205205};
    206206
    207 static int pci_add_device(ddf_dev_t *);
     207static int pci_dev_add(ddf_dev_t *);
    208208static int pci_fun_online(ddf_fun_t *);
    209209static int pci_fun_offline(ddf_fun_t *);
     
    211211/** PCI bus driver standard operations */
    212212static driver_ops_t pci_ops = {
    213         .add_device = &pci_add_device,
     213        .dev_add = &pci_dev_add,
    214214        .fun_online = &pci_fun_online,
    215215        .fun_offline = &pci_fun_offline,
     
    610610}
    611611
    612 static int pci_add_device(ddf_dev_t *dnode)
     612static int pci_dev_add(ddf_dev_t *dnode)
    613613{
    614614        pci_bus_t *bus = NULL;
     
    617617        int rc;
    618618       
    619         ddf_msg(LVL_DEBUG, "pci_add_device");
     619        ddf_msg(LVL_DEBUG, "pci_dev_add");
    620620        dnode->parent_sess = NULL;
    621621       
    622622        bus = ddf_dev_data_alloc(dnode, sizeof(pci_bus_t));
    623623        if (bus == NULL) {
    624                 ddf_msg(LVL_ERROR, "pci_add_device allocation failed.");
     624                ddf_msg(LVL_ERROR, "pci_dev_add allocation failed.");
    625625                rc = ENOMEM;
    626626                goto fail;
     
    634634            dnode->handle, IPC_FLAG_BLOCKING);
    635635        if (!dnode->parent_sess) {
    636                 ddf_msg(LVL_ERROR, "pci_add_device failed to connect to the "
     636                ddf_msg(LVL_ERROR, "pci_dev_add failed to connect to the "
    637637                    "parent driver.");
    638638                rc = ENOENT;
     
    644644        rc = hw_res_get_resource_list(dnode->parent_sess, &hw_resources);
    645645        if (rc != EOK) {
    646                 ddf_msg(LVL_ERROR, "pci_add_device failed to get hw resources "
     646                ddf_msg(LVL_ERROR, "pci_dev_add failed to get hw resources "
    647647                    "for the device.");
    648648                goto fail;
  • uspace/drv/bus/usb/ehci/main.c

    rb12ca16 rd5ba17f  
    4646#include "ehci.h"
    4747
    48 static int ehci_add_device(ddf_dev_t *device);
     48static int ehci_dev_add(ddf_dev_t *device);
    4949/*----------------------------------------------------------------------------*/
    5050static driver_ops_t ehci_driver_ops = {
    51         .add_device = ehci_add_device,
     51        .dev_add = ehci_dev_add,
    5252};
    5353/*----------------------------------------------------------------------------*/
     
    6666 * @return Error code.
    6767 */
    68 static int ehci_add_device(ddf_dev_t *device)
     68static int ehci_dev_add(ddf_dev_t *device)
    6969{
    7070        assert(device);
  • uspace/drv/bus/usb/ohci/main.c

    rb12ca16 rd5ba17f  
    4848 * @return Error code.
    4949 */
    50 static int ohci_add_device(ddf_dev_t *device)
     50static int ohci_dev_add(ddf_dev_t *device)
    5151{
    52         usb_log_debug("ohci_add_device() called\n");
     52        usb_log_debug("ohci_dev_add() called\n");
    5353        assert(device);
    5454
     
    6565/*----------------------------------------------------------------------------*/
    6666static driver_ops_t ohci_driver_ops = {
    67         .add_device = ohci_add_device,
     67        .dev_add = ohci_dev_add,
    6868};
    6969/*----------------------------------------------------------------------------*/
  • uspace/drv/bus/usb/uhci/main.c

    rb12ca16 rd5ba17f  
    4343#define NAME "uhci"
    4444
    45 static int uhci_add_device(ddf_dev_t *device);
     45static int uhci_dev_add(ddf_dev_t *device);
    4646/*----------------------------------------------------------------------------*/
    4747static driver_ops_t uhci_driver_ops = {
    48         .add_device = uhci_add_device,
     48        .dev_add = uhci_dev_add,
    4949};
    5050/*----------------------------------------------------------------------------*/
     
    5959 * @return Error code.
    6060 */
    61 int uhci_add_device(ddf_dev_t *device)
     61int uhci_dev_add(ddf_dev_t *device)
    6262{
    63         usb_log_debug2("uhci_add_device() called\n");
     63        usb_log_debug2("uhci_dev_add() called\n");
    6464        assert(device);
    6565
  • uspace/drv/bus/usb/uhcirh/main.c

    rb12ca16 rd5ba17f  
    5151    uintptr_t *io_reg_address, size_t *io_reg_size);
    5252
    53 static int uhci_rh_add_device(ddf_dev_t *device);
     53static int uhci_rh_dev_add(ddf_dev_t *device);
    5454
    5555static driver_ops_t uhci_rh_driver_ops = {
    56         .add_device = uhci_rh_add_device,
     56        .dev_add = uhci_rh_dev_add,
    5757};
    5858
     
    8282 * @return Error code.
    8383 */
    84 static int uhci_rh_add_device(ddf_dev_t *device)
     84static int uhci_rh_dev_add(ddf_dev_t *device)
    8585{
    8686        if (!device)
    8787                return EINVAL;
    8888
    89         usb_log_debug2("uhci_rh_add_device(handle=%" PRIun ")\n",
     89        usb_log_debug2("uhci_rh_dev_add(handle=%" PRIun ")\n",
    9090            device->handle);
    9191
  • uspace/drv/bus/usb/vhc/main.c

    rb12ca16 rd5ba17f  
    5858};
    5959
    60 static int vhc_add_device(ddf_dev_t *dev)
     60static int vhc_dev_add(ddf_dev_t *dev)
    6161{
    6262        static int vhc_count = 0;
     
    131131
    132132static driver_ops_t vhc_driver_ops = {
    133         .add_device = vhc_add_device,
     133        .dev_add = vhc_dev_add,
    134134};
    135135
  • uspace/drv/char/ns8250/ns8250.c

    rb12ca16 rd5ba17f  
    223223};
    224224
    225 static int ns8250_add_device(ddf_dev_t *dev);
     225static int ns8250_dev_add(ddf_dev_t *dev);
    226226static int ns8250_dev_remove(ddf_dev_t *dev);
    227227
    228228/** The serial port device driver's standard operations. */
    229229static driver_ops_t ns8250_ops = {
    230         .add_device = &ns8250_add_device,
     230        .dev_add = &ns8250_dev_add,
    231231        .dev_remove = &ns8250_dev_remove
    232232};
     
    717717}
    718718
    719 /** The add_device callback method of the serial port driver.
     719/** The dev_add callback method of the serial port driver.
    720720 *
    721721 * Probe and initialize the newly added device.
     
    723723 * @param dev           The serial port device.
    724724 */
    725 static int ns8250_add_device(ddf_dev_t *dev)
     725static int ns8250_dev_add(ddf_dev_t *dev)
    726726{
    727727        ns8250_t *ns = NULL;
     
    730730        int rc;
    731731       
    732         ddf_msg(LVL_DEBUG, "ns8250_add_device %s (handle = %d)",
     732        ddf_msg(LVL_DEBUG, "ns8250_dev_add %s (handle = %d)",
    733733            dev->name, (int) dev->handle);
    734734       
  • uspace/drv/infrastructure/root/root.c

    rb12ca16 rd5ba17f  
    6666#define VIRTUAL_FUN_MATCH_SCORE 100
    6767
    68 static int root_add_device(ddf_dev_t *dev);
     68static int root_dev_add(ddf_dev_t *dev);
    6969static int root_fun_online(ddf_fun_t *fun);
    7070static int root_fun_offline(ddf_fun_t *fun);
     
    7272/** The root device driver's standard operations. */
    7373static driver_ops_t root_ops = {
    74         .add_device = &root_add_device,
     74        .dev_add = &root_dev_add,
    7575        .fun_online = &root_fun_online,
    7676        .fun_offline = &root_fun_offline
     
    198198 *                      of HW and pseudo devices).
    199199 */
    200 static int root_add_device(ddf_dev_t *dev)
    201 {
    202         ddf_msg(LVL_DEBUG, "root_add_device, device handle=%" PRIun,
     200static int root_dev_add(ddf_dev_t *dev)
     201{
     202        ddf_msg(LVL_DEBUG, "root_dev_add, device handle=%" PRIun,
    203203            dev->handle);
    204204
  • uspace/drv/infrastructure/rootmac/rootmac.c

    rb12ca16 rd5ba17f  
    125125 *
    126126 */
    127 static int rootmac_add_device(ddf_dev_t *dev)
     127static int rootmac_dev_add(ddf_dev_t *dev)
    128128{
    129129        /* Register functions */
     
    136136/** The root device driver's standard operations. */
    137137static driver_ops_t rootmac_ops = {
    138         .add_device = &rootmac_add_device
     138        .dev_add = &rootmac_dev_add
    139139};
    140140
  • uspace/drv/infrastructure/rootpc/rootpc.c

    rb12ca16 rd5ba17f  
    6363} rootpc_fun_t;
    6464
    65 static int rootpc_add_device(ddf_dev_t *dev);
     65static int rootpc_dev_add(ddf_dev_t *dev);
    6666static void root_pc_init(void);
    6767
    6868/** The root device driver's standard operations. */
    6969static driver_ops_t rootpc_ops = {
    70         .add_device = &rootpc_add_device
     70        .dev_add = &rootpc_dev_add
    7171};
    7272
     
    175175 * @return              Zero on success, negative error number otherwise.
    176176 */
    177 static int rootpc_add_device(ddf_dev_t *dev)
    178 {
    179         ddf_msg(LVL_DEBUG, "rootpc_add_device, device handle = %d",
     177static int rootpc_dev_add(ddf_dev_t *dev)
     178{
     179        ddf_msg(LVL_DEBUG, "rootpc_dev_add, device handle = %d",
    180180            (int)dev->handle);
    181181       
  • uspace/drv/infrastructure/rootvirt/rootvirt.c

    rb12ca16 rd5ba17f  
    6262};
    6363
    64 static int rootvirt_add_device(ddf_dev_t *dev);
     64static int rootvirt_dev_add(ddf_dev_t *dev);
    6565static int rootvirt_dev_remove(ddf_dev_t *dev);
    6666static int rootvirt_fun_online(ddf_fun_t *fun);
     
    6868
    6969static driver_ops_t rootvirt_ops = {
    70         .add_device = &rootvirt_add_device,
     70        .dev_add = &rootvirt_dev_add,
    7171        .dev_remove = &rootvirt_dev_remove,
    7272        .fun_online = &rootvirt_fun_online,
     
    172172
    173173
    174 static int rootvirt_add_device(ddf_dev_t *dev)
     174static int rootvirt_dev_add(ddf_dev_t *dev)
    175175{
    176176        rootvirt_t *rootvirt;
     
    183183        }
    184184
    185         ddf_msg(LVL_DEBUG, "add_device(handle=%d)", (int)dev->handle);
     185        ddf_msg(LVL_DEBUG, "dev_add(handle=%d)", (int)dev->handle);
    186186
    187187        rootvirt = ddf_dev_data_alloc(dev, sizeof(rootvirt_t));
  • uspace/drv/nic/lo/lo.c

    rb12ca16 rd5ba17f  
    7979}
    8080
    81 static int lo_add_device(ddf_dev_t *dev)
     81static int lo_dev_add(ddf_dev_t *dev)
    8282{
    8383        nic_t *nic_data = nic_create_and_bind(dev);
     
    118118
    119119static driver_ops_t lo_driver_ops = {
    120         .add_device = lo_add_device,
     120        .dev_add = lo_dev_add,
    121121};
    122122
  • uspace/drv/nic/ne2k/ne2k.c

    rb12ca16 rd5ba17f  
    336336}
    337337
    338 static int ne2k_add_device(ddf_dev_t *dev)
     338static int ne2k_dev_add(ddf_dev_t *dev)
    339339{
    340340        /* Allocate driver data for the device. */
     
    391391
    392392static driver_ops_t ne2k_driver_ops = {
    393         .add_device = ne2k_add_device
     393        .dev_add = ne2k_dev_add
    394394};
    395395
  • uspace/drv/test/test1/test1.c

    rb12ca16 rd5ba17f  
    4040#include "test1.h"
    4141
    42 static int test1_add_device(ddf_dev_t *dev);
     42static int test1_dev_add(ddf_dev_t *dev);
    4343static int test1_dev_remove(ddf_dev_t *dev);
    4444static int test1_dev_gone(ddf_dev_t *dev);
     
    4747
    4848static driver_ops_t driver_ops = {
    49         .add_device = &test1_add_device,
     49        .dev_add = &test1_dev_add,
    5050        .dev_remove = &test1_dev_remove,
    5151        .dev_gone = &test1_dev_gone,
     
    141141 * @return Error code reporting success of the operation.
    142142 */
    143 static int test1_add_device(ddf_dev_t *dev)
     143static int test1_dev_add(ddf_dev_t *dev)
    144144{
    145145        ddf_fun_t *fun_a;
     
    147147        int rc;
    148148
    149         ddf_msg(LVL_DEBUG, "add_device(name=\"%s\", handle=%d)",
     149        ddf_msg(LVL_DEBUG, "dev_add(name=\"%s\", handle=%d)",
    150150            dev->name, (int) dev->handle);
    151151
  • uspace/drv/test/test2/test2.c

    rb12ca16 rd5ba17f  
    4040#define NAME "test2"
    4141
    42 static int test2_add_device(ddf_dev_t *dev);
     42static int test2_dev_add(ddf_dev_t *dev);
    4343static int test2_dev_remove(ddf_dev_t *dev);
    4444static int test2_dev_gone(ddf_dev_t *dev);
     
    4747
    4848static driver_ops_t driver_ops = {
    49         .add_device = &test2_add_device,
     49        .dev_add = &test2_dev_add,
    5050        .dev_remove = &test2_dev_remove,
    5151        .dev_gone = &test2_dev_gone,
     
    193193}
    194194
    195 static int test2_add_device(ddf_dev_t *dev)
     195static int test2_dev_add(ddf_dev_t *dev)
    196196{
    197197        test2_t *test2;
    198198
    199         ddf_msg(LVL_DEBUG, "test2_add_device(name=\"%s\", handle=%d)",
     199        ddf_msg(LVL_DEBUG, "test2_dev_add(name=\"%s\", handle=%d)",
    200200            dev->name, (int) dev->handle);
    201201
  • uspace/drv/test/test3/test3.c

    rb12ca16 rd5ba17f  
    4141#define NUM_FUNCS 20
    4242
    43 static int test3_add_device(ddf_dev_t *dev);
     43static int test3_dev_add(ddf_dev_t *dev);
    4444static int test3_dev_remove(ddf_dev_t *dev);
    4545static int test3_fun_online(ddf_fun_t *fun);
     
    4747
    4848static driver_ops_t driver_ops = {
    49         .add_device = &test3_add_device,
     49        .dev_add = &test3_dev_add,
    5050        .dev_remove = &test3_dev_remove,
    5151        .fun_online = &test3_fun_online,
     
    127127}
    128128
    129 static int test3_add_device(ddf_dev_t *dev)
     129static int test3_dev_add(ddf_dev_t *dev)
    130130{
    131131        int rc = EOK;
    132132        test3_t *test3;
    133133
    134         ddf_msg(LVL_DEBUG, "add_device(name=\"%s\", handle=%d)",
     134        ddf_msg(LVL_DEBUG, "dev_add(name=\"%s\", handle=%d)",
    135135            dev->name, (int) dev->handle);
    136136
  • uspace/lib/drv/generic/driver.c

    rb12ca16 rd5ba17f  
    288288        (void) parent_fun_handle;
    289289       
    290         res = driver->driver_ops->add_device(dev);
     290        res = driver->driver_ops->dev_add(dev);
    291291       
    292292        if (res != EOK) {
  • uspace/lib/drv/include/ddf/driver.h

    rb12ca16 rd5ba17f  
    136136typedef struct driver_ops {
    137137        /** Callback method for passing a new device to the device driver */
    138         int (*add_device)(ddf_dev_t *);
    139         /**
    140          * Notification that the device was succesfully added.
    141          * The driver can do any blocking operation without
    142          * blocking the device manager.
    143          */
    144         void (*device_added)(ddf_dev_t *dev);
     138        int (*dev_add)(ddf_dev_t *);
    145139        /** Ask driver to remove a device */
    146140        int (*dev_remove)(ddf_dev_t *);
     
    151145        /** Ask driver to offline a specific function */
    152146        int (*fun_offline)(ddf_fun_t *);
     147
     148        /**
     149         * Notification that the device was succesfully added.
     150         * The driver can do any blocking operation without
     151         * blocking the device manager.
     152         *
     153         * XXX REMOVE THIS
     154         */
     155        void (*device_added)(ddf_dev_t *dev);
    153156} driver_ops_t;
    154157
  • uspace/lib/usbdev/src/devdrv.c

    rb12ca16 rd5ba17f  
    4646
    4747static driver_ops_t generic_driver_ops = {
    48         .add_device = generic_device_add,
     48        .dev_add = generic_device_add,
    4949        .dev_remove = generic_device_remove,
    5050        .dev_gone = generic_device_gone,
Note: See TracChangeset for help on using the changeset viewer.