Changeset 2480e19 in mainline
- Timestamp:
- 2010-04-08T14:04:48Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d1fc8f0
- Parents:
- 89ce401a
- Location:
- uspace
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/init/init.c
r89ce401a r2480e19 313 313 getterm("term/vc5", "/app/bdsh"); 314 314 getterm("term/vc6", "/app/klog"); 315 316 usleep(1000000); 315 getterm("term/vc7", "/srv/devman"); 316 317 //usleep(1000000); 317 318 //spawn("/srv/dd"); 318 319 srv_start("/srv/devman"); 319 320 320 321 321 return 0; -
uspace/lib/libdrv/generic/driver.c
r89ce401a r2480e19 103 103 static void driver_add_device(ipc_callid_t iid, ipc_call_t *icall) 104 104 { 105 printf("%s: driver_add_device\n", driver->name);106 107 105 // TODO device state - the driver may detect the device is not actually present 108 106 // (old non PnP devices) or is not working properly. … … 128 126 static void driver_connection_devman(ipc_callid_t iid, ipc_call_t *icall) 129 127 { 130 printf("%s: driver_connection_devman \n", driver->name);131 132 128 /* Accept connection */ 133 129 ipc_answer_0(iid, EOK); … … 174 170 // TODO open the device (introduce some callbacks for opening and closing devices registered by the driver) 175 171 176 printf("%s: driver_connection_gen: accepting connection.\n", driver->name);177 172 ipc_answer_0(iid, EOK); 178 173 … … 180 175 ipc_callid_t callid; 181 176 ipc_call_t call; 182 183 printf("%s: driver_connection_gen: waiting for call.\n", driver->name);184 177 callid = async_get_call(&call); 185 178 ipcarg_t method = IPC_GET_METHOD(call); … … 236 229 static void driver_connection_driver(ipc_callid_t iid, ipc_call_t *icall) 237 230 { 238 printf("%s: driver_connection_driver\n", driver->name);239 231 driver_connection_gen(iid, icall, true); 240 232 } … … 242 234 static void driver_connection_client(ipc_callid_t iid, ipc_call_t *icall) 243 235 { 244 printf("%s: driver_connection_client\n", driver->name);245 236 driver_connection_gen(iid, icall, false); 246 237 } … … 275 266 bool child_device_register(device_t *child, device_t *parent) 276 267 { 277 printf("%s: child_device_register\n", driver->name);268 // printf("%s: child_device_register\n", driver->name); 278 269 279 270 assert(NULL != child->name); -
uspace/srv/devman/devman.c
r89ce401a r2480e19 341 341 driver_t * find_best_match_driver(driver_list_t *drivers_list, node_t *node) 342 342 { 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); 344 344 driver_t *best_drv = NULL, *drv = NULL; 345 345 int best_score = 0, score = 0; … … 371 371 void attach_driver(node_t *node, driver_t *drv) 372 372 { 373 printf(NAME ": attach_driver %s to device %s\n", drv->name, node->pathname); 374 373 375 fibril_mutex_lock(&drv->driver_mutex); 374 376 … … 524 526 bool assign_driver(node_t *node, driver_list_t *drivers_list) 525 527 { 526 printf(NAME ": assign_driver\n");528 //printf(NAME ": assign_driver\n"); 527 529 528 530 // find the driver which is the most suitable for handling this device … … 620 622 bool insert_dev_node(dev_tree_t *tree, node_t *node, char *dev_name, node_t *parent) 621 623 { 622 printf(NAME ": insert_dev_node\n");624 // printf(NAME ": insert_dev_node\n"); 623 625 624 626 assert(NULL != node && NULL != tree && NULL != dev_name); … … 709 711 return dev; 710 712 } 713 714 link = link->next; 711 715 } 712 716 -
uspace/srv/devman/main.c
r89ce401a r2480e19 142 142 } 143 143 144 ipc_answer_0(callid, EOK); 145 144 146 match_id->score = IPC_GET_ARG1(call); 145 147 … … 147 149 if (EOK != rc) { 148 150 delete_match_id(match_id); 151 printf(NAME ": devman_receive_match_id - failed to receive match id string.\n"); 149 152 return rc; 150 153 } … … 157 160 158 161 static int devman_receive_match_ids(ipcarg_t match_count, match_id_list_t *match_ids) 159 { 162 { 160 163 int ret = EOK; 161 164 size_t i; … … 170 173 static void devman_add_child(ipc_callid_t callid, ipc_call_t *call, driver_t *driver) 171 174 { 172 printf(NAME ": devman_add_child\n");175 // printf(NAME ": devman_add_child\n"); 173 176 174 177 device_handle_t parent_handle = IPC_GET_ARG1(*call); … … 188 191 return; 189 192 } 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); 191 194 192 195 node_t *node = create_dev_node(); … … 196 199 return; 197 200 } 201 202 printf(NAME ": devman_add_child %s\n", node->pathname); 198 203 199 204 devman_receive_match_ids(match_count, &node->match_ids); … … 261 266 262 267 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); 264 269 265 270 node_t *dev = find_dev_node(&device_tree, handle); … … 297 302 return; 298 303 } 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); 300 306 ipc_forward_fast(iid, driver->phone, method, dev->handle, 0, IPC_FF_NONE); 301 307 } -
uspace/srv/drivers/pciintel/pci.c
r89ce401a r2480e19 156 156 match_id = create_match_id(); 157 157 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); 159 159 match_id->score = 90; 160 160 add_match_id(&dev->match_ids, match_id); … … 198 198 199 199 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); 201 201 202 202 create_pci_match_ids(dev); … … 208 208 continue; 209 209 } 210 211 //printf(NAME ": new device %s was successfully registered by device manager.\n", dev->name); 210 212 211 213 if (header_type == PCI_HEADER_TYPE_BRIDGE || header_type == PCI_HEADER_TYPE_CARDBUS ) {
Note:
See TracChangeset
for help on using the changeset viewer.