Index: uspace/drv/bus/pci/pciintel/pci.c
===================================================================
--- uspace/drv/bus/pci/pciintel/pci.c	(revision 8a363ab3476276b762e5312db32618ad424dd71e)
+++ uspace/drv/bus/pci/pciintel/pci.c	(revision 1d53a789691a8d36f70cf677fcc8d6c083e0e705)
@@ -225,6 +225,5 @@
 	fibril_mutex_lock(&bus->conf_mutex);
 	
-	uint32_t conf_addr;
-	conf_addr = CONF_ADDR(fun->bus, fun->dev, fun->fn, reg);
+	const uint32_t conf_addr = CONF_ADDR(fun->bus, fun->dev, fun->fn, reg);
 	void *addr = bus->conf_data_port + (reg & 3);
 	
@@ -311,24 +310,78 @@
 void pci_fun_create_match_ids(pci_fun_t *fun)
 {
-	char *match_id_str;
+#define ID_MAX_STR_LEN 50 /* Max is 47, align to something nice. */
+
 	int rc;
-	
-	asprintf(&match_id_str, "pci/ven=%04x&dev=%04x",
+	char match_id_str[ID_MAX_STR_LEN];
+
+	/* Vendor ID & Device ID, length(incl \0) 22 */
+	rc = snprintf(match_id_str, ID_MAX_STR_LEN, "pci/ven=%04x&dev=%04x",
 	    fun->vendor_id, fun->device_id);
-
-	if (match_id_str == NULL) {
-		ddf_msg(LVL_ERROR, "Out of memory creating match ID.");
-		return;
+	if (rc < 0) {
+		ddf_msg(LVL_ERROR, "Failed creating match ID str: %s",
+		    str_error(rc));
 	}
 
 	rc = ddf_fun_add_match_id(fun->fnode, match_id_str, 90);
 	if (rc != EOK) {
-		ddf_msg(LVL_ERROR, "Failed adding match ID: %s",
+		ddf_msg(LVL_ERROR, "Failed adding match ID: %s", str_error(rc));
+	}
+
+	/* Class, subclass, prog IF, revision, length(incl \0) 47 */
+	rc = snprintf(match_id_str, ID_MAX_STR_LEN,
+	    "pci/class=%02x&subclass=%02x&progif=%02x&revision=%02x",
+	    fun->class_code, fun->subclass_code, fun->prog_if, fun->revision);
+	if (rc < 0) {
+		ddf_msg(LVL_ERROR, "Failed creating match ID str: %s",
 		    str_error(rc));
 	}
-	
-	free(match_id_str);
-	
-	/* TODO add more ids (with subsys ids, using class id etc.) */
+
+	rc = ddf_fun_add_match_id(fun->fnode, match_id_str, 70);
+	if (rc != EOK) {
+		ddf_msg(LVL_ERROR, "Failed adding match ID: %s", str_error(rc));
+	}
+
+	/* Class, subclass, prog IF, length(incl \0) 35 */
+	rc = snprintf(match_id_str, ID_MAX_STR_LEN,
+	    "pci/class=%02x&subclass=%02x&progif=%02x",
+	    fun->class_code, fun->subclass_code, fun->prog_if);
+	if (rc < 0) {
+		ddf_msg(LVL_ERROR, "Failed creating match ID str: %s",
+		    str_error(rc));
+	}
+
+	rc = ddf_fun_add_match_id(fun->fnode, match_id_str, 60);
+	if (rc != EOK) {
+		ddf_msg(LVL_ERROR, "Failed adding match ID: %s", str_error(rc));
+	}
+
+	/* Class, subclass, length(incl \0) 25 */
+	rc = snprintf(match_id_str, ID_MAX_STR_LEN,
+	    "pci/class=%02x&subclass=%02x",
+	    fun->class_code, fun->subclass_code);
+	if (rc < 0) {
+		ddf_msg(LVL_ERROR, "Failed creating match ID str: %s",
+		    str_error(rc));
+	}
+
+	rc = ddf_fun_add_match_id(fun->fnode, match_id_str, 50);
+	if (rc != EOK) {
+		ddf_msg(LVL_ERROR, "Failed adding match ID: %s", str_error(rc));
+	}
+
+	/* Class, length(incl \0) 13 */
+	rc = snprintf(match_id_str, ID_MAX_STR_LEN, "pci/class=%02x",
+	    fun->class_code);
+	if (rc < 0) {
+		ddf_msg(LVL_ERROR, "Failed creating match ID str: %s",
+		    str_error(rc));
+	}
+
+	rc = ddf_fun_add_match_id(fun->fnode, match_id_str, 40);
+	if (rc != EOK) {
+		ddf_msg(LVL_ERROR, "Failed adding match ID: %s", str_error(rc));
+	}
+
+	/* TODO add subsys ids, but those exist only in header type 0 */
 }
 
@@ -481,8 +534,4 @@
 		for (fnum = 0; multi && fnum < 8; fnum++) {
 			pci_fun_init(fun, bus_num, dnum, fnum);
-			fun->vendor_id = pci_conf_read_16(fun,
-			    PCI_VENDOR_ID);
-			fun->device_id = pci_conf_read_16(fun,
-			    PCI_DEVICE_ID);
 			if (fun->vendor_id == 0xffff) {
 				/*
@@ -691,4 +740,10 @@
 	fun->dev = dev;
 	fun->fn = fn;
+	fun->vendor_id = pci_conf_read_16(fun, PCI_VENDOR_ID);
+	fun->device_id = pci_conf_read_16(fun, PCI_DEVICE_ID);
+	fun->class_code = pci_conf_read_8(fun, PCI_BASE_CLASS);
+	fun->subclass_code = pci_conf_read_8(fun, PCI_SUB_CLASS);
+	fun->prog_if = pci_conf_read_8(fun, PCI_PROG_IF);
+	fun->revision = pci_conf_read_8(fun, PCI_REVISION_ID);
 }
 
Index: uspace/drv/bus/pci/pciintel/pci.h
===================================================================
--- uspace/drv/bus/pci/pciintel/pci.h	(revision 8a363ab3476276b762e5312db32618ad424dd71e)
+++ uspace/drv/bus/pci/pciintel/pci.h	(revision 1d53a789691a8d36f70cf677fcc8d6c083e0e705)
@@ -60,4 +60,8 @@
 	int vendor_id;
 	int device_id;
+	uint8_t class_code;
+	uint8_t subclass_code;
+	uint8_t prog_if;
+	uint8_t revision;
 	hw_resource_list_t hw_resources;
 } pci_fun_t;
