Index: uspace/drv/nic/virtio-net/virtio-net.c
===================================================================
--- uspace/drv/nic/virtio-net/virtio-net.c	(revision cbcb34c71731e8f7f40ddb81bb612f2296305afc)
+++ uspace/drv/nic/virtio-net/virtio-net.c	(revision eda41a9e0e7610502846190f37d909f994d6a1e5)
@@ -75,51 +75,11 @@
 	virtio_net_cfg_t *netcfg = virtio_net->virtio_dev.device_cfg;
 
-	/*
-	 * Perform device initialization as described in section 3.1.1 of the
-	 * specification.
-	 */
+	/* Reset the device and negotiate the feature bits */
+	rc = virtio_device_setup_start(vdev,
+	    VIRTIO_NET_F_MAC | VIRTIO_NET_F_CTRL_VQ);
+	if (rc != EOK)
+		goto fail;
 
-	/* 1. Reset the device */
-	uint8_t status = VIRTIO_DEV_STATUS_RESET;
-	pio_write_8(&cfg->device_status, status);
-
-	/* 2. Acknowledge we found the device */
-	status |= VIRTIO_DEV_STATUS_ACKNOWLEDGE;
-	pio_write_8(&cfg->device_status, status);
-
-	/* 3. We know how to drive the device */
-	status |= VIRTIO_DEV_STATUS_DRIVER;
-	pio_write_8(&cfg->device_status, status);
-
-	/* 4. Read the offered feature flags */
-	pio_write_32(&cfg->device_feature_select, VIRTIO_NET_F_SELECT_PAGE_0);
-	uint32_t features = pio_read_32(&cfg->device_feature);
-
-	ddf_msg(LVL_NOTE, "offered features %x", features);
-	features &= (1U << VIRTIO_NET_F_MAC) | (1U << VIRTIO_NET_F_CTRL_VQ);
-
-	if (!features) {
-		rc = ENOTSUP;
-		goto fail;
-	}
-
-	/* 4. Write the accepted feature flags */
-	pio_write_32(&cfg->driver_feature_select, VIRTIO_NET_F_SELECT_PAGE_0);
-	pio_write_32(&cfg->driver_feature, features);
-
-	ddf_msg(LVL_NOTE, "accepted features %x", features);
-
-	/* 5. Set FEATURES_OK */
-	status |= VIRTIO_DEV_STATUS_FEATURES_OK;
-	pio_write_8(&cfg->device_status, status);
-
-	/* 6. Test if the device supports our feature subset */ 
-	status = pio_read_8(&cfg->device_status);
-	if (!(status & VIRTIO_DEV_STATUS_FEATURES_OK)) {
-		rc = ENOTSUP;
-		goto fail;
-	}
-
-	/* 7. Perform device-specific setup */
+	/* Perform device-specific setup */
 
 	/*
@@ -164,14 +124,12 @@
 	    nic_addr.address[3], nic_addr.address[4], nic_addr.address[5]);
 
-	/* 8. Go live */
-	status |= VIRTIO_DEV_STATUS_DRIVER_OK;
-	pio_write_8(&cfg->device_status, status);
+	/* Go live */
+	virtio_device_setup_finalize(vdev);
 
 	return EOK;
 
 fail:
-	status |= VIRTIO_DEV_STATUS_FAILED;
-	pio_write_8(&cfg->device_status, status);
-	virtio_pci_dev_cleanup(&virtio_net->virtio_dev);
+	virtio_device_setup_fail(vdev);
+	virtio_pci_dev_cleanup(vdev);
 	return rc;
 }
Index: uspace/drv/nic/virtio-net/virtio-net.h
===================================================================
--- uspace/drv/nic/virtio-net/virtio-net.h	(revision cbcb34c71731e8f7f40ddb81bb612f2296305afc)
+++ uspace/drv/nic/virtio-net/virtio-net.h	(revision eda41a9e0e7610502846190f37d909f994d6a1e5)
@@ -32,14 +32,12 @@
 #include <virtio-pci.h>
 
-#define VIRTIO_NET_F_SELECT_PAGE_0	0
-
 /** Device handles packets with partial checksum. */
-#define VIRTIO_NET_F_CSUM		0
+#define VIRTIO_NET_F_CSUM		(1U << 0)
 /** Driver handles packets with partial checksum. */
-#define VIRTIO_NET_F_GUEST_CSUM		2
+#define VIRTIO_NET_F_GUEST_CSUM		(1U << 2)
 /** Device has given MAC address. */
-#define VIRTIO_NET_F_MAC		5
+#define VIRTIO_NET_F_MAC		(1U << 5)
 /** Control channel is available */
-#define VIRTIO_NET_F_CTRL_VQ		17
+#define VIRTIO_NET_F_CTRL_VQ		(1U << 17)
 
 typedef struct {
