Changes in uspace/drv/bus/pci/pciintel/pci.c [ebc9c2c:99e8fb7b] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/pci/pciintel/pci.c
rebc9c2c r99e8fb7b 51 51 #include <ddf/log.h> 52 52 #include <ipc/dev_iface.h> 53 #include <irc.h> 53 #include <ipc/irc.h> 54 #include <ns.h> 55 #include <ipc/services.h> 56 #include <sysinfo.h> 54 57 #include <ops/hw_res.h> 55 58 #include <device/hw_res.h> … … 104 107 pci_fun_t *dev_data = pci_fun(fnode); 105 108 109 sysarg_t apic; 110 sysarg_t i8259; 111 112 async_sess_t *irc_sess = NULL; 113 114 if (((sysinfo_get_value("apic", &apic) == EOK) && (apic)) 115 || ((sysinfo_get_value("i8259", &i8259) == EOK) && (i8259))) { 116 irc_sess = service_connect_blocking(EXCHANGE_SERIALIZE, 117 SERVICE_IRC, 0, 0); 118 } 119 120 if (!irc_sess) 121 return false; 122 106 123 size_t i = 0; 107 124 hw_resource_list_t *res = &dev_data->hw_resources; 108 125 for (; i < res->count; i++) { 109 126 if (res->resources[i].type == INTERRUPT) { 110 int rc = irc_enable_interrupt( 111 res->resources[i].res.interrupt.irq); 112 113 if (rc != EOK) 127 const int irq = res->resources[i].res.interrupt.irq; 128 129 async_exch_t *exch = async_exchange_begin(irc_sess); 130 const int rc = 131 async_req_1_0(exch, IRC_ENABLE_INTERRUPT, irq); 132 async_exchange_end(exch); 133 134 if (rc != EOK) { 135 async_hangup(irc_sess); 114 136 return false; 137 } 115 138 } 116 139 } 117 140 141 async_hangup(irc_sess); 118 142 return true; 119 143 } … … 260 284 const uint32_t conf_addr = CONF_ADDR(fun->bus, fun->dev, fun->fn, reg); 261 285 pci_bus_t *bus = pci_bus_from_fun(fun); 262 uint32_t val = 0; // Prevent -Werror=maybe-uninitialized286 uint32_t val; 263 287 264 288 fibril_mutex_lock(&bus->conf_mutex);
Note:
See TracChangeset
for help on using the changeset viewer.