Changeset dc75234 in mainline


Ignore:
Timestamp:
2011-03-03T21:30:59Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bdc8ab1
Parents:
0e2fdcf
Message:

Remove possible endless cycle

File:
1 edited

Legend:

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

    r0e2fdcf rdc75234  
    9494  sysarg_t apic;
    9595  sysarg_t i8259;
     96
    9697        int irc_phone = -1;
    9798        int irc_service = 0;
     
    103104        }
    104105
    105   if (irc_service) {
    106     while (irc_phone < 0)
    107       irc_phone = service_connect_blocking(irc_service, 0, 0);
    108   } else {
     106  if (irc_service == 0)
    109107                return false;
    110         }
     108
     109        irc_phone = service_connect_blocking(irc_service, 0, 0);
     110        if (irc_phone < 0)
     111                return false;
    111112
    112113        size_t i;
     
    114115                if (dev_data->hw_resources.resources[i].type == INTERRUPT) {
    115116                        int irq = dev_data->hw_resources.resources[i].res.interrupt.irq;
    116                         async_msg_1(irc_phone, IRC_ENABLE_INTERRUPT, irq);
     117                        int rc = async_req_1_0(irc_phone, IRC_ENABLE_INTERRUPT, irq);
     118                        if (rc != EOK) {
     119                                async_hangup(irc_phone);
     120                                return false;
     121                        }
    117122                }
    118123        }
Note: See TracChangeset for help on using the changeset viewer.