Changes in uspace/drv/nic/rtl8139/driver.c [d51838f:071a1ddb] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/nic/rtl8139/driver.c
rd51838f r071a1ddb 28 28 29 29 #include <assert.h> 30 #include <async.h> 30 31 #include <errno.h> 31 32 #include <align.h> 32 #include <thread.h>33 33 #include <byteorder.h> 34 34 #include <libarch/barrier.h> … … 435 435 memory_barrier(); 436 436 while(pio_read_8(io_base + CR) & CR_RST) { 437 thread_usleep(1);437 async_usleep(1); 438 438 read_barrier(); 439 439 } … … 816 816 /** Handle device interrupt 817 817 * 818 * @param iid The IPC call id819 818 * @param icall The IPC call structure 820 819 * @param dev The rtl8139 device 821 820 * 822 821 */ 823 static void rtl8139_interrupt_handler(ipc_callid_t iid, ipc_call_t *icall, 824 ddf_dev_t *dev) 822 static void rtl8139_interrupt_handler(ipc_call_t *icall, ddf_dev_t *dev) 825 823 { 826 824 assert(dev); … … 844 842 * @param nic_data The driver data 845 843 * 846 * @return IRQ capability handle if the handler was registered. 844 * @param[out] handle IRQ capability handle if the handler was registered. 845 * 847 846 * @return Negative error code otherwise. 848 847 */ 849 inline static int rtl8139_register_int_handler(nic_t *nic_data )848 inline static int rtl8139_register_int_handler(nic_t *nic_data, cap_handle_t *handle) 850 849 { 851 850 rtl8139_t *rtl8139 = nic_get_specific(nic_data); … … 858 857 rtl8139_irq_code.cmds[2].addr = rtl8139->io_addr + ISR; 859 858 rtl8139_irq_code.cmds[3].addr = rtl8139->io_addr + IMR; 860 int cap= register_interrupt_handler(nic_get_ddf_dev(nic_data),861 rtl8139->irq, rtl8139_interrupt_handler, &rtl8139_irq_code );859 int rc = register_interrupt_handler(nic_get_ddf_dev(nic_data), 860 rtl8139->irq, rtl8139_interrupt_handler, &rtl8139_irq_code, handle); 862 861 863 862 RTL8139_IRQ_STRUCT_UNLOCK(); 864 863 865 return cap;864 return rc; 866 865 } 867 866 … … 1289 1288 1290 1289 /* Register interrupt handler */ 1291 int irq_cap = rtl8139_register_int_handler(nic_data);1292 if (irq_cap < 0) {1293 rc = irq_cap;1290 int irq_cap; 1291 rc = rtl8139_register_int_handler(nic_data, &irq_cap); 1292 if (rc != EOK) { 1294 1293 goto err_pio; 1295 1294 }
Note:
See TracChangeset
for help on using the changeset viewer.