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