Changeset e5424e9 in mainline for uspace/drv/nic/rtl8139/driver.c


Ignore:
Timestamp:
2014-07-18T08:50:36Z (10 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ebc9c2c
Parents:
869d936
Message:

Defer connecting IRC service until actually needed. This allows the driver to be loaded even in its absence.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/nic/rtl8139/driver.c

    r869d936 re5424e9  
    956956        rtl8139->int_mask = RTL_DEFAULT_INTERRUPTS;
    957957        rtl8139_hw_int_enable(rtl8139);
    958         irc_enable_interrupt(rtl8139->irq);
     958
     959        int rc = irc_enable_interrupt(rtl8139->irq);
     960        if (rc != EOK) {
     961                rtl8139_on_stopped(nic_data);
     962                return rc;
     963        }
    959964
    960965        ddf_msg(LVL_DEBUG, "Device activated, interrupt %d registered", rtl8139->irq);
     
    21702175        printf("%s: HelenOS RTL8139 network adapter driver\n", NAME);
    21712176
    2172         if (irc_init() != EOK) {
    2173                 printf("%s: Failed connecting IRC service\n", NAME);
    2174                 return 1;
    2175         }
    2176 
    21772177        int rc = nic_driver_init(NAME);
    21782178        if (rc != EOK)
Note: See TracChangeset for help on using the changeset viewer.