Ignore:
File:
1 edited

Legend:

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

    r071a1ddb rd51838f  
    2828
    2929#include <assert.h>
    30 #include <async.h>
    3130#include <errno.h>
    3231#include <align.h>
     32#include <thread.h>
    3333#include <byteorder.h>
    3434#include <libarch/barrier.h>
     
    435435        memory_barrier();
    436436        while(pio_read_8(io_base + CR) & CR_RST) {
    437                 async_usleep(1);
     437                thread_usleep(1);
    438438                read_barrier();
    439439        }
     
    816816/** Handle device interrupt
    817817 *
     818 * @param iid    The IPC call id
    818819 * @param icall  The IPC call structure
    819820 * @param dev    The rtl8139 device
    820821 *
    821822 */
    822 static void rtl8139_interrupt_handler(ipc_call_t *icall, ddf_dev_t *dev)
     823static void rtl8139_interrupt_handler(ipc_callid_t iid, ipc_call_t *icall,
     824    ddf_dev_t *dev)
    823825{
    824826        assert(dev);
     
    842844 *  @param nic_data  The driver data
    843845 *
    844  *  @param[out] handle  IRQ capability handle if the handler was registered.
    845  *
     846 *  @return IRQ capability handle if the handler was registered.
    846847 *  @return Negative error code otherwise.
    847848 */
    848 inline static int rtl8139_register_int_handler(nic_t *nic_data, cap_handle_t *handle)
     849inline static int rtl8139_register_int_handler(nic_t *nic_data)
    849850{
    850851        rtl8139_t *rtl8139 = nic_get_specific(nic_data);
     
    857858        rtl8139_irq_code.cmds[2].addr = rtl8139->io_addr + ISR;
    858859        rtl8139_irq_code.cmds[3].addr = rtl8139->io_addr + IMR;
    859         int rc = register_interrupt_handler(nic_get_ddf_dev(nic_data),
    860             rtl8139->irq, rtl8139_interrupt_handler, &rtl8139_irq_code, handle);
     860        int cap = register_interrupt_handler(nic_get_ddf_dev(nic_data),
     861            rtl8139->irq, rtl8139_interrupt_handler, &rtl8139_irq_code);
    861862
    862863        RTL8139_IRQ_STRUCT_UNLOCK();
    863864
    864         return rc;
     865        return cap;
    865866}
    866867
     
    12881289
    12891290        /* Register interrupt handler */
    1290         int irq_cap;
    1291         rc = rtl8139_register_int_handler(nic_data, &irq_cap);
    1292         if (rc != EOK) {
     1291        int irq_cap = rtl8139_register_int_handler(nic_data);
     1292        if (irq_cap < 0) {
     1293                rc = irq_cap;
    12931294                goto err_pio;
    12941295        }
Note: See TracChangeset for help on using the changeset viewer.