Changeset 2480e19 in mainline


Ignore:
Timestamp:
2010-04-08T14:04:48Z (15 years ago)
Author:
Lenka Trochtova <trochtova.lenka@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d1fc8f0
Parents:
89ce401a
Message:

fixed some bugs

Location:
uspace
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/init/init.c

    r89ce401a r2480e19  
    313313        getterm("term/vc5", "/app/bdsh");
    314314        getterm("term/vc6", "/app/klog");
    315 
    316         usleep(1000000);
     315        getterm("term/vc7", "/srv/devman");
     316
     317        //usleep(1000000);
    317318        //spawn("/srv/dd");
    318        
    319         srv_start("/srv/devman");       
     319               
    320320       
    321321        return 0;
  • uspace/lib/libdrv/generic/driver.c

    r89ce401a r2480e19  
    103103static void driver_add_device(ipc_callid_t iid, ipc_call_t *icall)
    104104{
    105         printf("%s: driver_add_device\n", driver->name);
    106 
    107105        // TODO device state - the driver may detect the device is not actually present
    108106        // (old non PnP devices) or is not working properly.
     
    128126static void driver_connection_devman(ipc_callid_t iid, ipc_call_t *icall)
    129127{
    130         printf("%s: driver_connection_devman \n", driver->name);
    131 
    132128        /* Accept connection */
    133129        ipc_answer_0(iid, EOK);
     
    174170        // TODO open the device (introduce some callbacks for opening and closing devices registered by the driver)
    175171       
    176         printf("%s: driver_connection_gen: accepting connection.\n", driver->name);
    177172        ipc_answer_0(iid, EOK);
    178173
     
    180175                ipc_callid_t callid;
    181176                ipc_call_t call;
    182 
    183                 printf("%s: driver_connection_gen: waiting for call.\n", driver->name);
    184177                callid = async_get_call(&call);
    185178                ipcarg_t method = IPC_GET_METHOD(call);
     
    236229static void driver_connection_driver(ipc_callid_t iid, ipc_call_t *icall)
    237230{
    238         printf("%s: driver_connection_driver\n", driver->name);
    239231        driver_connection_gen(iid, icall, true);
    240232}
     
    242234static void driver_connection_client(ipc_callid_t iid, ipc_call_t *icall)
    243235{
    244         printf("%s: driver_connection_client\n", driver->name);
    245236        driver_connection_gen(iid, icall, false);
    246237}
     
    275266bool child_device_register(device_t *child, device_t *parent)
    276267{
    277         printf("%s: child_device_register\n", driver->name);
     268        // printf("%s: child_device_register\n", driver->name);
    278269
    279270        assert(NULL != child->name);
  • uspace/srv/devman/devman.c

    r89ce401a r2480e19  
    341341driver_t * find_best_match_driver(driver_list_t *drivers_list, node_t *node)
    342342{
    343         printf(NAME ": find_best_match_driver for device '%s' \n", node->pathname);
     343        //printf(NAME ": find_best_match_driver for device '%s' \n", node->pathname);
    344344        driver_t *best_drv = NULL, *drv = NULL;
    345345        int best_score = 0, score = 0;
     
    371371void attach_driver(node_t *node, driver_t *drv)
    372372{
     373        printf(NAME ": attach_driver %s to device %s\n", drv->name, node->pathname);
     374       
    373375        fibril_mutex_lock(&drv->driver_mutex);
    374376       
     
    524526bool assign_driver(node_t *node, driver_list_t *drivers_list)
    525527{
    526         printf(NAME ": assign_driver\n");
     528        //printf(NAME ": assign_driver\n");
    527529       
    528530        // find the driver which is the most suitable for handling this device
     
    620622bool insert_dev_node(dev_tree_t *tree, node_t *node, char *dev_name, node_t *parent)
    621623{
    622         printf(NAME ": insert_dev_node\n");
     624        // printf(NAME ": insert_dev_node\n");
    623625       
    624626        assert(NULL != node && NULL != tree && NULL != dev_name);
     
    709711                        return dev;                     
    710712                }
     713               
     714                link = link->next;
    711715        }       
    712716       
  • uspace/srv/devman/main.c

    r89ce401a r2480e19  
    142142        }
    143143       
     144        ipc_answer_0(callid, EOK);
     145       
    144146        match_id->score = IPC_GET_ARG1(call);
    145147       
     
    147149        if (EOK != rc) {
    148150                delete_match_id(match_id);
     151                printf(NAME ": devman_receive_match_id - failed to receive match id string.\n");
    149152                return rc;
    150153        }
     
    157160
    158161static int devman_receive_match_ids(ipcarg_t match_count, match_id_list_t *match_ids)
    159 {
     162{       
    160163        int ret = EOK;
    161164        size_t i;
     
    170173static void devman_add_child(ipc_callid_t callid, ipc_call_t *call, driver_t *driver)
    171174{
    172         printf(NAME ": devman_add_child\n");
     175        // printf(NAME ": devman_add_child\n");
    173176       
    174177        device_handle_t parent_handle = IPC_GET_ARG1(*call);
     
    188191                return;
    189192        }
    190         printf(NAME ": newly added child device's name is '%s'.\n", dev_name);
     193        // printf(NAME ": newly added child device's name is '%s'.\n", dev_name);
    191194       
    192195        node_t *node = create_dev_node();
     
    196199                return;
    197200        }       
     201       
     202        printf(NAME ": devman_add_child %s\n", node->pathname);
    198203       
    199204        devman_receive_match_ids(match_count, &node->match_ids);
     
    261266       
    262267        device_handle_t handle = IPC_GET_ARG2(*icall);
    263         printf(NAME ": devman_forward - trying to forward connection to device with handle %x.\n", handle);
     268        // printf(NAME ": devman_forward - trying to forward connection to device with handle %x.\n", handle);
    264269       
    265270        node_t *dev = find_dev_node(&device_tree, handle);
     
    297302                return;
    298303        }
    299         printf(NAME ": devman_forward: forward to driver %s with phone %d.\n", driver->name, driver->phone);
     304        printf(NAME ": devman_forward: forward connection to device %s to driver %s with phone %d.\n",
     305                dev->pathname, driver->name, driver->phone);
    300306        ipc_forward_fast(iid, driver->phone, method, dev->handle, 0, IPC_FF_NONE);     
    301307}
  • uspace/srv/drivers/pciintel/pci.c

    r89ce401a r2480e19  
    156156        match_id = create_match_id();
    157157        if (NULL != match_id) {
    158                 asprintf(&match_id->id, "pci/ven=%04x,dev=%04x", dev_data->vendor_id, dev_data->device_id);
     158                asprintf(&match_id->id, "pci/ven=%04x&dev=%04x", dev_data->vendor_id, dev_data->device_id);
    159159                match_id->score = 90;
    160160                add_match_id(&dev->match_ids, match_id);
     
    198198                       
    199199                        create_pci_dev_name(dev);
    200                         printf(NAME ": adding new device name %s.\n", dev->name);
     200                        printf(NAME ": adding new child device %s.\n", dev->name);
    201201                       
    202202                        create_pci_match_ids(dev);
     
    208208                                continue;
    209209                        }
     210                       
     211                        //printf(NAME ": new device %s was successfully registered by device manager.\n", dev->name);
    210212                       
    211213                        if (header_type == PCI_HEADER_TYPE_BRIDGE || header_type == PCI_HEADER_TYPE_CARDBUS ) {
Note: See TracChangeset for help on using the changeset viewer.