Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Dec 2018 08:53:27 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r342569 - stable/11/sys/dev/ichwd
Message-ID:  <201812280853.wBS8rRkF012036@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Fri Dec 28 08:53:26 2018
New Revision: 342569
URL: https://svnweb.freebsd.org/changeset/base/342569

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

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

Modified: stable/11/sys/dev/ichwd/ichwd.c
==============================================================================
--- stable/11/sys/dev/ichwd/ichwd.c	Fri Dec 28 08:52:50 2018	(r342568)
+++ stable/11/sys/dev/ichwd/ichwd.c	Fri Dec 28 08:53:26 2018	(r342569)
@@ -633,6 +633,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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812280853.wBS8rRkF012036>