Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Aug 2017 09:22:10 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r321856 - head/sys/dev/ichwd
Message-ID:  <201708010922.v719MAFl044779@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Tue Aug  1 09:22:10 2017
New Revision: 321856
URL: https://svnweb.freebsd.org/changeset/base/321856

Log:
  Add explicit check for PCI bus to r321720.
  
  Reported by:	jhb
  MFC after:	6 days

Modified:
  head/sys/dev/ichwd/ichwd.c

Modified: head/sys/dev/ichwd/ichwd.c
==============================================================================
--- head/sys/dev/ichwd/ichwd.c	Tue Aug  1 09:07:26 2017	(r321855)
+++ head/sys/dev/ichwd/ichwd.c	Tue Aug  1 09:22:10 2017	(r321856)
@@ -536,11 +536,14 @@ static device_t
 ichwd_find_ich_lpc_bridge(device_t isa, struct ichwd_device **id_p)
 {
 	struct ichwd_device *id;
-	device_t isab;
+	device_t isab, pci;
 	uint16_t devid;
 
 	/* Check whether parent ISA bridge looks familiar. */
 	isab = device_get_parent(isa);
+	pci = device_get_parent(isab);
+	if (pci == NULL || device_get_devclass(pci) != devclass_find("pci"))
+		return (NULL);
 	if (pci_get_vendor(isab) != VENDORID_INTEL)
 		return (NULL);
 	devid = pci_get_device(isab);



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