svn commit: r342568 - stable/12/sys/dev/ichwd

Andriy Gapon avg at FreeBSD.org
Fri Dec 28 08:52:51 UTC 2018


Author: avg
Date: Fri Dec 28 08:52:50 2018
New Revision: 342568
URL: https://svnweb.freebsd.org/changeset/base/342568

Log:
  MFC r342193: ichwd: add a few assertions about tco_version

Modified:
  stable/12/sys/dev/ichwd/ichwd.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/ichwd/ichwd.c
==============================================================================
--- stable/12/sys/dev/ichwd/ichwd.c	Fri Dec 28 08:50:27 2018	(r342567)
+++ stable/12/sys/dev/ichwd/ichwd.c	Fri Dec 28 08:52:50 2018	(r342568)
@@ -635,6 +635,13 @@ ichwd_identify(driver_t *driver, device_t parent)
 			return;
 	}
 
+	KASSERT(id_p->tco_version >= 1,
+	    ("unexpected TCO version %d", id_p->tco_version));
+	KASSERT(id_p->tco_version != 4 || smb != NULL,
+	    ("could not find PCI SMBus device for TCOv4"));
+	KASSERT(id_p->tco_version >= 4 || ich != NULL,
+	    ("could not find PCI LPC bridge device for TCOv1-3"));
+
 	/* good, add child to bus */
 	if ((dev = device_find_child(parent, driver->name, 0)) == NULL)
 		dev = BUS_ADD_CHILD(parent, 0, driver->name, 0);


More information about the svn-src-stable mailing list