Changes in uspace/drv/nic/rtl8139/driver.c [e55d2c1:60744cb] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/nic/rtl8139/driver.c
re55d2c1 r60744cb 42 42 #include <stdio.h> 43 43 #include <str.h> 44 #include <pcapdump_iface.h>45 44 46 45 #include "defs.h" … … 820 819 * 821 820 * @param icall The IPC call structure 822 * @param dev The rtl8139 device 823 * 824 */ 825 static void rtl8139_interrupt_handler(ipc_call_t *icall, ddf_dev_t *dev) 826 { 827 assert(dev); 828 assert(icall); 829 821 * @param arg Argument (nic_t *) 822 * 823 */ 824 static void rtl8139_interrupt_handler(ipc_call_t *icall, void *arg) 825 { 830 826 uint16_t isr = (uint16_t) ipc_get_arg2(icall); 831 nic_t *nic_data = nic_get_from_ddf_dev(dev);827 nic_t *nic_data = (nic_t *)arg; 832 828 rtl8139_t *rtl8139 = nic_get_specific(nic_data); 833 829 … … 862 858 rtl8139_irq_code.cmds[3].addr = rtl8139->io_addr + IMR; 863 859 errno_t rc = register_interrupt_handler(nic_get_ddf_dev(nic_data), 864 rtl8139->irq, rtl8139_interrupt_handler, &rtl8139_irq_code, handle); 860 rtl8139->irq, rtl8139_interrupt_handler, (void *)nic_data, 861 &rtl8139_irq_code, handle); 865 862 866 863 RTL8139_IRQ_STRUCT_UNLOCK(); … … 1308 1305 goto err_fun_create; 1309 1306 } 1310 1311 rc = nic_fun_add_to_cats(fun); 1307 rc = ddf_fun_add_to_category(fun, DEVICE_CATEGORY_NIC); 1312 1308 if (rc != EOK) { 1313 ddf_msg(LVL_ERROR, "Failed adding function to categories"); 1314 ddf_fun_unbind(fun); 1315 return rc; 1309 ddf_msg(LVL_ERROR, "Failed adding function to category"); 1310 goto err_fun_bind; 1316 1311 } 1317 1312 … … 1321 1316 return EOK; 1322 1317 1323 //err_fun_bind:1324 //ddf_fun_unbind(fun);1318 err_fun_bind: 1319 ddf_fun_unbind(fun); 1325 1320 err_fun_create: 1326 1321 ddf_fun_destroy(fun);
Note:
See TracChangeset
for help on using the changeset viewer.