Changeset 3094804b in mainline for uspace/drv/pciintel/pci.c


Ignore:
Timestamp:
2011-04-03T19:34:11Z (14 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c4e0b47, df40775
Parents:
0cec844 (diff), baa9d5d (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:

Another fix for APIC interrupt enable hangup (i8259 too)

Refactoring

File:
1 edited

Legend:

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

    r0cec844 r3094804b  
    107107        }
    108108
    109         size_t i;
    110         for (i = 0; i < dev_data->hw_resources.count; i++) {
    111                 if (dev_data->hw_resources.resources[i].type == INTERRUPT) {
    112                         int irq = dev_data->hw_resources.resources[i].res.interrupt.irq;
    113                         int rc = async_req_1_0(irc_phone, IRC_ENABLE_INTERRUPT, irq);
     109        size_t i = 0;
     110        hw_resource_list_t *res = &dev_data->hw_resources;
     111        for (; i < res->count; i++) {
     112                if (res->resources[i].type == INTERRUPT) {
     113                        const int irq = res->resources[i].res.interrupt.irq;
     114                        const int rc =
     115                            async_req_1_0(irc_phone, IRC_ENABLE_INTERRUPT, irq);
    114116                        if (rc != EOK) {
    115117                                async_hangup(irc_phone);
Note: See TracChangeset for help on using the changeset viewer.