Changeset 4b4e163 in mainline
- Timestamp:
- 2011-03-07T10:50:01Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2ab6875
- Parents:
- 4ed80ce8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/pci.c
r4ed80ce8 r4b4e163 82 82 for (i = 0; i < hw_resources.count; i++) { 83 83 hw_resource_t *res = &hw_resources.resources[i]; 84 switch (res->type) { 85 case INTERRUPT: 86 irq = res->res.interrupt.irq; 87 irq_found = true; 88 usb_log_debug2("Found interrupt: %d.\n", irq); 89 break; 90 case IO_RANGE: 91 io_address = res->res.io_range.address; 92 io_size = res->res.io_range.size; 93 usb_log_debug2("Found io: %llx %zu.\n", 94 res->res.io_range.address, res->res.io_range.size); 95 io_found = true; 96 break; 97 default: 98 break; 84 switch (res->type) 85 { 86 case INTERRUPT: 87 irq = res->res.interrupt.irq; 88 irq_found = true; 89 usb_log_debug2("Found interrupt: %d.\n", irq); 90 break; 91 92 case IO_RANGE: 93 io_address = res->res.io_range.address; 94 io_size = res->res.io_range.size; 95 usb_log_debug2("Found io: %llx %zu.\n", 96 res->res.io_range.address, res->res.io_range.size); 97 io_found = true; 98 99 default: 100 break; 99 101 } 100 102 } 101 103 102 if (!io_found) { 103 rc = ENOENT; 104 goto leave; 105 } 106 107 if (!irq_found) { 104 if (!io_found || !irq_found) { 108 105 rc = ENOENT; 109 106 goto leave; … … 133 130 { 134 131 assert(device); 135 int parent_phone = devman_parent_device_connect(device->handle,136 132 int parent_phone = 133 devman_parent_device_connect(device->handle, IPC_FLAG_BLOCKING); 137 134 if (parent_phone < 0) { 138 135 return parent_phone; … … 144 141 sysarg_t value = 0x8f00; 145 142 146 143 int rc = async_req_3_0(parent_phone, DEV_IFACE_ID(PCI_DEV_IFACE), 147 144 IPC_M_CONFIG_SPACE_WRITE_16, address, value); 148 145 async_hangup(parent_phone); 149 146 150 147 return rc; 151 148 } 152 149 /*----------------------------------------------------------------------------*/
Note:
See TracChangeset
for help on using the changeset viewer.