Changes in uspace/srv/hw/netif/ne2000/ne2000.c [fe8dfa6:57d129e] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hw/netif/ne2000/ne2000.c
rfe8dfa6 r57d129e 43 43 #include <malloc.h> 44 44 #include <sysinfo.h> 45 #include <ipc/ipc.h>46 45 #include <ipc/services.h> 46 #include <ipc/ns.h> 47 47 #include <ipc/irc.h> 48 48 #include <net/modules.h> … … 75 75 #define IRQ_GET_TSR(call) ((int) IPC_GET_ARG3(call)) 76 76 77 static int irc_service = 0;77 static bool irc_service = false; 78 78 static int irc_phone = -1; 79 79 … … 316 316 ne2k_cmds[5].addr = ne2k->port + DP_TSR; 317 317 318 int rc = ipc_register_irq(ne2k->irq, device->device_id,318 int rc = register_irq(ne2k->irq, device->device_id, 319 319 device->device_id, &ne2k_code); 320 320 if (rc != EOK) … … 323 323 rc = ne2k_up(ne2k); 324 324 if (rc != EOK) { 325 ipc_unregister_irq(ne2k->irq, device->device_id);325 unregister_irq(ne2k->irq, device->device_id); 326 326 return rc; 327 327 } … … 342 342 343 343 ne2k_down(ne2k); 344 ipc_unregister_irq(ne2k->irq, device->device_id);344 unregister_irq(ne2k->irq, device->device_id); 345 345 change_state(device, NETIF_STOPPED); 346 346 } … … 383 383 sysarg_t i8259; 384 384 385 if ((sysinfo_get_value("apic", &apic) == EOK) && (apic)) 386 irc_service = SERVICE_APIC; 387 else if ((sysinfo_get_value("i8259", &i8259) == EOK) && (i8259)) 388 irc_service = SERVICE_I8259; 385 if (((sysinfo_get_value("apic", &apic) == EOK) && (apic)) 386 || ((sysinfo_get_value("i8259", &i8259) == EOK) && (i8259))) 387 irc_service = true; 389 388 390 389 if (irc_service) { 391 while (irc_phone < 0) { 392 irc_phone = ipc_connect_me_to_blocking(PHONE_NS, irc_service, 393 0, 0); 394 } 390 while (irc_phone < 0) 391 irc_phone = service_connect_blocking(SERVICE_IRC, 0, 0); 395 392 } 396 393 397 394 async_set_interrupt_received(irq_handler); 398 395 399 sysarg_t phonehash; 400 return ipc_connect_to_me(PHONE_NS, SERVICE_NE2000, 0, 0, &phonehash); 396 return async_connect_to_me(PHONE_NS, SERVICE_NE2000, 0, 0, NULL); 401 397 } 402 398
Note:
See TracChangeset
for help on using the changeset viewer.