Changeset be942bc in mainline
- Timestamp:
- 2010-12-21T11:43:44Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b0a76d5
- Parents:
- 78ffb70
- Location:
- uspace
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/ns8250/ns8250.c
r78ffb70 rbe942bc 342 342 printf(NAME ": failed to connect to the parent driver of the " 343 343 "device %s.\n", dev->name); 344 ret = EPARTY; /* FIXME: use another EC */344 ret = dev->parent_phone; 345 345 goto failed; 346 346 } 347 347 348 348 /* Get hw resources. */ 349 if (!get_hw_resources(dev->parent_phone, &hw_resources)) { 349 ret = get_hw_resources(dev->parent_phone, &hw_resources); 350 if (ret != EOK) { 350 351 printf(NAME ": failed to get hw resources for the device " 351 352 "%s.\n", dev->name); 352 ret = EPARTY; /* FIXME: use another EC */353 353 goto failed; 354 354 } … … 374 374 printf(NAME ": i/o range assigned to the device " 375 375 "%s is too small.\n", dev->name); 376 ret = E PARTY; /* FIXME: use another EC */376 ret = ELIMIT; 377 377 goto failed; 378 378 } … … 390 390 printf(NAME ": missing hw resource(s) for the device %s.\n", 391 391 dev->name); 392 ret = E PARTY; /* FIXME: use another EC */392 ret = ENOENT; 393 393 goto failed; 394 394 } -
uspace/drv/pciintel/pci.c
r78ffb70 rbe942bc 452 452 static int pci_add_device(device_t *dev) 453 453 { 454 int rc; 455 454 456 printf(NAME ": pci_add_device\n"); 455 457 … … 466 468 "parent's driver.\n"); 467 469 delete_pci_bus_data(bus_data); 468 return EPARTY; /* FIXME: use another EC */470 return dev->parent_phone; 469 471 } 470 472 471 473 hw_resource_list_t hw_resources; 472 474 473 if (!get_hw_resources(dev->parent_phone, &hw_resources)) { 475 rc = get_hw_resources(dev->parent_phone, &hw_resources); 476 if (rc != EOK) { 474 477 printf(NAME ": pci_add_device failed to get hw resources for " 475 478 "the device.\n"); 476 479 delete_pci_bus_data(bus_data); 477 480 ipc_hangup(dev->parent_phone); 478 return EPARTY; /* FIXME: use another EC */481 return rc; 479 482 } 480 483 -
uspace/lib/c/generic/device/hw_res.c
r78ffb70 rbe942bc 38 38 #include <malloc.h> 39 39 40 boolget_hw_resources(int dev_phone, hw_resource_list_t *hw_resources)40 int get_hw_resources(int dev_phone, hw_resource_list_t *hw_resources) 41 41 { 42 42 sysarg_t count = 0; 43 43 int rc = async_req_1_1(dev_phone, DEV_IFACE_ID(HW_RES_DEV_IFACE), GET_RESOURCE_LIST, &count); 44 44 hw_resources->count = count; 45 if (EOK != rc) { 46 return false; 47 } 45 if (rc != EOK) 46 return rc; 48 47 49 48 size_t size = count * sizeof(hw_resource_t); 50 49 hw_resources->resources = (hw_resource_t *)malloc(size); 51 if (NULL == hw_resources->resources) { 52 return false; 53 } 50 if (!hw_resources->resources) 51 return ENOMEM; 54 52 55 53 rc = async_data_read_start(dev_phone, hw_resources->resources, size); 56 if ( EOK != rc) {54 if (rc != EOK) { 57 55 free(hw_resources->resources); 58 56 hw_resources->resources = NULL; 59 return false;57 return rc; 60 58 } 61 59 62 return true;60 return EOK; 63 61 } 64 62 -
uspace/lib/c/include/device/hw_res.h
r78ffb70 rbe942bc 95 95 96 96 97 bool get_hw_resources(int dev_phone, hw_resource_list_t *hw_resources); 98 99 bool enable_interrupt(int dev_phone); 97 extern int get_hw_resources(int, hw_resource_list_t *); 98 extern bool enable_interrupt(int); 100 99 101 100 -
uspace/srv/net/tl/tcp/tcp.c
r78ffb70 rbe942bc 2085 2085 if (!fibril) { 2086 2086 free(operation_timeout); 2087 return EPARTY; /* FIXME: use another EC */ 2088 } 2087 return ENOMEM; 2088 } 2089 2089 2090 // fibril_mutex_lock(&socket_data->operation.mutex); 2090 2091 /* Start the timeout fibril */
Note:
See TracChangeset
for help on using the changeset viewer.