Changeset 15d0046 in mainline for uspace/drv/bus/pci/pciintel/pci.c


Ignore:
Timestamp:
2014-09-12T13:22:33Z (10 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9b20126
Parents:
8db09e4 (diff), 105d8d6 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/pci/pciintel/pci.c

    r8db09e4 r15d0046  
    5151#include <ddf/log.h>
    5252#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>
    5754#include <ops/hw_res.h>
    5855#include <device/hw_res.h>
     
    107104        pci_fun_t *dev_data = pci_fun(fnode);
    108105       
    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        
    123106        size_t i = 0;
    124107        hw_resource_list_t *res = &dev_data->hw_resources;
    125108        for (; i < res->count; i++) {
    126109                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)
    136114                                return false;
    137                         }
    138115                }
    139116        }
    140117       
    141         async_hangup(irc_sess);
    142118        return true;
    143119}
     
    284260        const uint32_t conf_addr = CONF_ADDR(fun->bus, fun->dev, fun->fn, reg);
    285261        pci_bus_t *bus = pci_bus_from_fun(fun);
    286         uint32_t val;
     262        uint32_t val = 0; // Prevent -Werror=maybe-uninitialized
    287263       
    288264        fibril_mutex_lock(&bus->conf_mutex);
Note: See TracChangeset for help on using the changeset viewer.