Index: uspace/drv/nic/e1k/e1k.c
===================================================================
--- uspace/drv/nic/e1k/e1k.c	(revision fc6abbe64a96e30234c9851b406ccecb9f607b09)
+++ uspace/drv/nic/e1k/e1k.c	(revision 869d936cb8b287d8cabb51f763c83d6a439adba8)
@@ -42,9 +42,7 @@
 #include <align.h>
 #include <byteorder.h>
-#include <sysinfo.h>
-#include <ipc/irc.h>
-#include <ipc/ns.h>
+#include <irc.h>
+#include <as.h>
 #include <ddi.h>
-#include <as.h>
 #include <ddf/log.h>
 #include <ddf/interrupt.h>
@@ -1758,5 +1756,5 @@
 	e1000_enable_interrupts(e1000);
 	
-	nic_enable_interrupt(nic, e1000->irq);
+	irc_enable_interrupt(e1000->irq);
 	
 	e1000_clear_rx_ring(e1000);
@@ -1796,5 +1794,5 @@
 	e1000_disable_rx(e1000);
 	
-	nic_disable_interrupt(nic, e1000->irq);
+	irc_disable_interrupt(e1000->irq);
 	e1000_disable_interrupts(e1000);
 	
@@ -2153,8 +2151,4 @@
 	if (rc != EOK)
 		goto err_fun_create;
-	
-	rc = nic_connect_to_services(nic);
-	if (rc != EOK)
-		goto err_irq;
 	
 	rc = e1000_initialize_rx_structure(nic);
@@ -2379,7 +2373,13 @@
 int main(void)
 {
-	int rc = nic_driver_init(NAME);
-	if (rc != EOK)
-		return rc;
+	printf("%s: HelenOS E1000 network adapter driver\n", NAME);
+	
+	if (irc_init() != EOK) {
+		printf("%s: Failed connecting IRC service\n", NAME);
+		return 1;
+	}
+	
+	if (nic_driver_init(NAME) != EOK)
+		return 1;
 	
 	nic_driver_implement(&e1000_driver_ops, &e1000_dev_ops,
@@ -2387,5 +2387,4 @@
 	
 	ddf_log_init(NAME);
-	ddf_msg(LVL_NOTE, "HelenOS E1000 driver started");
 	return ddf_driver_main(&e1000_driver);
 }
Index: uspace/drv/nic/ne2k/ne2k.c
===================================================================
--- uspace/drv/nic/ne2k/ne2k.c	(revision fc6abbe64a96e30234c9851b406ccecb9f607b09)
+++ uspace/drv/nic/ne2k/ne2k.c	(revision 869d936cb8b287d8cabb51f763c83d6a439adba8)
@@ -43,4 +43,5 @@
 #include <stdio.h>
 #include <errno.h>
+#include <irc.h>
 #include <stdlib.h>
 #include <str_error.h>
@@ -260,5 +261,5 @@
 		}
 
-		nic_enable_interrupt(nic_data, ne2k->irq);
+		irc_enable_interrupt(ne2k->irq);
 	}
 	return EOK;
@@ -269,5 +270,5 @@
 	ne2k_t *ne2k = (ne2k_t *) nic_get_specific(nic_data);
 
-	nic_disable_interrupt(nic_data, ne2k->irq);
+	irc_disable_interrupt(ne2k->irq);
 	ne2k->receive_configuration = RCR_AB | RCR_AM;
 	ne2k_down(ne2k);
@@ -396,10 +397,4 @@
 	}
 	
-	rc = nic_connect_to_services(nic_data);
-	if (rc != EOK) {
-		ne2k_dev_cleanup(dev);
-		return rc;
-	}
-	
 	fun = ddf_fun_create(nic_get_ddf_dev(nic_data), fun_exposed, "port0");
 	if (fun == NULL) {
@@ -443,4 +438,11 @@
 int main(int argc, char *argv[])
 {
+	printf("%s: HelenOS NE 2000 network adapter driver\n", NAME);
+	
+	if (irc_init() != EOK) {
+		printf("%s: Failed connecting IRC service\n", NAME);
+		return 1;
+	}
+	
 	nic_driver_init(NAME);
 	nic_driver_implement(&ne2k_driver_ops, &ne2k_dev_ops, &ne2k_nic_iface);
Index: uspace/drv/nic/rtl8139/driver.c
===================================================================
--- uspace/drv/nic/rtl8139/driver.c	(revision fc6abbe64a96e30234c9851b406ccecb9f607b09)
+++ uspace/drv/nic/rtl8139/driver.c	(revision 869d936cb8b287d8cabb51f763c83d6a439adba8)
@@ -35,5 +35,4 @@
 #include <byteorder.h>
 #include <libarch/barrier.h>
-
 #include <as.h>
 #include <ddf/log.h>
@@ -42,9 +41,6 @@
 #include <nic.h>
 #include <pci_dev_iface.h>
-
-#include <ipc/irc.h>
-#include <sysinfo.h>
-#include <ipc/ns.h>
-
+#include <irc.h>
+#include <stdio.h>
 #include <str.h>
 
@@ -960,5 +956,5 @@
 	rtl8139->int_mask = RTL_DEFAULT_INTERRUPTS;
 	rtl8139_hw_int_enable(rtl8139);
-	nic_enable_interrupt(nic_data, rtl8139->irq);
+	irc_enable_interrupt(rtl8139->irq);
 
 	ddf_msg(LVL_DEBUG, "Device activated, interrupt %d registered", rtl8139->irq);
@@ -1325,10 +1321,4 @@
 		goto err_pio;
 
-	rc = nic_connect_to_services(nic_data);
-	if (rc != EOK) {
-		ddf_msg(LVL_ERROR, "Failed to connect to services (%d)", rc);
-		goto err_irq;
-	}
-
 	fun = ddf_fun_create(nic_get_ddf_dev(nic_data), fun_exposed, "port0");
 	if (fun == NULL) {
@@ -1361,6 +1351,4 @@
 	ddf_fun_destroy(fun);
 err_srv:
-	/* XXX Disconnect from services */
-err_irq:
 	unregister_interrupt_handler(dev, rtl8139->irq);
 err_pio:
@@ -2180,12 +2168,19 @@
 int main(void)
 {
+	printf("%s: HelenOS RTL8139 network adapter driver\n", NAME);
+
+	if (irc_init() != EOK) {
+		printf("%s: Failed connecting IRC service\n", NAME);
+		return 1;
+	}
+
 	int rc = nic_driver_init(NAME);
 	if (rc != EOK)
 		return rc;
-	nic_driver_implement(
-		&rtl8139_driver_ops, &rtl8139_dev_ops, &rtl8139_nic_iface);
+
+	nic_driver_implement(&rtl8139_driver_ops, &rtl8139_dev_ops,
+	    &rtl8139_nic_iface);
 
 	ddf_log_init(NAME);
-	ddf_msg(LVL_NOTE, "HelenOS RTL8139 driver started");
 	return ddf_driver_main(&rtl8139_driver);
 }
Index: uspace/lib/c/Makefile
===================================================================
--- uspace/lib/c/Makefile	(revision fc6abbe64a96e30234c9851b406ccecb9f607b09)
+++ uspace/lib/c/Makefile	(revision 869d936cb8b287d8cabb51f763c83d6a439adba8)
@@ -109,4 +109,5 @@
 	generic/iplink.c \
 	generic/iplink_srv.c \
+	generic/irc.c \
 	generic/ieee_double.c \
 	generic/power_of_ten.c \
Index: uspace/lib/c/generic/irc.c
===================================================================
--- uspace/lib/c/generic/irc.c	(revision 869d936cb8b287d8cabb51f763c83d6a439adba8)
+++ uspace/lib/c/generic/irc.c	(revision 869d936cb8b287d8cabb51f763c83d6a439adba8)
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2014 Jiri Svoboda
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libc
+ * @{
+ */
+/** @file
+ */
+
+#include <assert.h>
+#include <errno.h>
+#include <ipc/irc.h>
+#include <ipc/services.h>
+#include <irc.h>
+#include <ns.h>
+
+static async_sess_t *irc_sess;
+
+/** Enable interrupt.
+ *
+ * @param irq	IRQ number
+ */
+void irc_enable_interrupt(int irq)
+{
+	async_exch_t *exch = async_exchange_begin(irc_sess);
+	async_msg_1(exch, IRC_ENABLE_INTERRUPT, irq);
+	async_exchange_end(exch);
+}
+
+/** Disable interrupt.
+ *
+ * @param irq	IRQ number
+ */
+void irc_disable_interrupt(int irq)
+{
+	async_exch_t *exch = async_exchange_begin(irc_sess);
+	async_msg_1(exch, IRC_CLEAR_INTERRUPT, irq);
+	async_exchange_end(exch);
+}
+
+/** Connect to IRC service.
+ *
+ * @return	EOK on success, EIO on failure
+ */
+int irc_init(void)
+{
+	assert(irc_sess == NULL);
+
+	irc_sess = service_connect_blocking(EXCHANGE_SERIALIZE, SERVICE_IRC,
+	    0, 0);
+	if (irc_sess == NULL)
+		return EIO;
+
+	return EOK;
+}
+
+/** @}
+ */
Index: uspace/lib/c/include/ipc/irc.h
===================================================================
--- uspace/lib/c/include/ipc/irc.h	(revision fc6abbe64a96e30234c9851b406ccecb9f607b09)
+++ uspace/lib/c/include/ipc/irc.h	(revision 869d936cb8b287d8cabb51f763c83d6a439adba8)
@@ -33,6 +33,6 @@
  */
 
-#ifndef LIBC_IRC_H_
-#define LIBC_IRC_H_
+#ifndef LIBC_IPC_IRC_H_
+#define LIBC_IPC_IRC_H_
 
 #include <ipc/common.h>
Index: uspace/lib/c/include/irc.h
===================================================================
--- uspace/lib/c/include/irc.h	(revision 869d936cb8b287d8cabb51f763c83d6a439adba8)
+++ uspace/lib/c/include/irc.h	(revision 869d936cb8b287d8cabb51f763c83d6a439adba8)
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2014 Jiri Svoboda
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_IRC_H_
+#define LIBC_IRC_H_
+
+extern int irc_init(void);
+extern void irc_enable_interrupt(int);
+extern void irc_disable_interrupt(int);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/nic/include/nic.h
===================================================================
--- uspace/lib/nic/include/nic.h	(revision fc6abbe64a96e30234c9851b406ccecb9f607b09)
+++ uspace/lib/nic/include/nic.h	(revision 869d936cb8b287d8cabb51f763c83d6a439adba8)
@@ -216,5 +216,4 @@
 
 /* Functions called in add_device */
-extern int nic_connect_to_services(nic_t *);
 extern int nic_get_resources(nic_t *, hw_res_list_parsed_t *);
 extern void nic_set_specific(nic_t *, void *);
@@ -245,6 +244,4 @@
 extern void nic_received_frame(nic_t *, nic_frame_t *);
 extern void nic_received_frame_list(nic_t *, nic_frame_list_t *);
-extern void nic_disable_interrupt(nic_t *, int);
-extern void nic_enable_interrupt(nic_t *, int);
 extern nic_poll_mode_t nic_query_poll_mode(nic_t *, struct timeval *);
 
Index: uspace/lib/nic/include/nic_driver.h
===================================================================
--- uspace/lib/nic/include/nic_driver.h	(revision fc6abbe64a96e30234c9851b406ccecb9f607b09)
+++ uspace/lib/nic/include/nic_driver.h	(revision 869d936cb8b287d8cabb51f763c83d6a439adba8)
@@ -80,6 +80,4 @@
 	/** Client callback session */
 	async_sess_t *client_session;
-	/** Phone to APIC or i8259 */
-	async_sess_t *irc_session;
 	/** Current polling mode of the NIC */
 	nic_poll_mode_t poll_mode;
Index: uspace/lib/nic/src/nic_driver.c
===================================================================
--- uspace/lib/nic/src/nic_driver.c	(revision fc6abbe64a96e30234c9851b406ccecb9f607b09)
+++ uspace/lib/nic/src/nic_driver.c	(revision 869d936cb8b287d8cabb51f763c83d6a439adba8)
@@ -42,7 +42,4 @@
 #include <stdio.h>
 #include <str_error.h>
-#include <ipc/services.h>
-#include <ipc/ns.h>
-#include <ipc/irc.h>
 #include <sysinfo.h>
 #include <as.h>
@@ -378,31 +375,4 @@
 }
 
-
-/**
- * Enable interrupts for this driver.
- *
- * @param nic_data
- * @param irq			The IRQ number for this device
- */
-void nic_enable_interrupt(nic_t *nic_data, int irq)
-{
-	async_exch_t *exch = async_exchange_begin(nic_data->irc_session);
-	async_msg_1(exch, IRC_ENABLE_INTERRUPT, irq);
-	async_exchange_end(exch);
-}
-
-/**
- * Disable interrupts for this driver.
- *
- * @param nic_data
- * @param irq			The IRQ number for this device
- */
-void nic_disable_interrupt(nic_t *nic_data, int irq)
-{
-	async_exch_t *exch = async_exchange_begin(nic_data->irc_session);
-	async_msg_1(exch, IRC_CLEAR_INTERRUPT, irq);
-	async_exchange_end(exch);
-}
-
 /** Get the polling mode information from the device 
  *
@@ -420,34 +390,4 @@
 	return nic_data->poll_mode;
 };
-
-/**
- * Connect to IRC service. This function should be called only from
- * the add_device handler, thus no locking is required.
- *
- * @param nic_data
- *
- * @return EOK		If connection was successful.
- * @return EINVAL	If the IRC service cannot be determined.
- * @return EREFUSED	If IRC service cannot be connected.
- */
-int nic_connect_to_services(nic_t *nic_data)
-{
-	/* IRC service */
-	sysarg_t apic;
-	sysarg_t i8259;
-	services_t irc_service = -1;
-	if (((sysinfo_get_value("apic", &apic) == EOK) && (apic)) ||
-	    ((sysinfo_get_value("i8259", &i8259) == EOK) && (i8259)))
-		irc_service = SERVICE_IRC;
-	else
-		return EINVAL;
-	
-	nic_data->irc_session = service_connect_blocking(EXCHANGE_SERIALIZE,
-		irc_service, 0, 0);
-	if (nic_data->irc_session == NULL)
-		return errno;
-	
-	return EOK;
-}
 
 /** Inform the NICF about poll mode
@@ -668,5 +608,4 @@
 	nic_data->state = NIC_STATE_STOPPED;
 	nic_data->client_session = NULL;
-	nic_data->irc_session = NULL;
 	nic_data->poll_mode = NIC_POLL_IMMEDIATE;
 	nic_data->default_poll_mode = NIC_POLL_IMMEDIATE;
