svn commit: r297255 - head/sys/dev/ichwd

Alexander Motin mav at FreeBSD.org
Thu Mar 24 23:24:01 UTC 2016


Author: mav
Date: Thu Mar 24 23:24:00 2016
New Revision: 297255
URL: https://svnweb.freebsd.org/changeset/base/297255

Log:
  Unify ichwd(4) attachment messages in dmesg.
  
  MFC after:	2 weeks

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

Modified: head/sys/dev/ichwd/ichwd.c
==============================================================================
--- head/sys/dev/ichwd/ichwd.c	Thu Mar 24 22:15:51 2016	(r297254)
+++ head/sys/dev/ichwd/ichwd.c	Thu Mar 24 23:24:00 2016	(r297255)
@@ -540,9 +540,6 @@ ichwd_find_ich_lpc_bridge(struct ichwd_d
 	if (ich == NULL)
 		return (NULL);
 
-	ichwd_verbose_printf(ich, "found ICH%d or equivalent chipset: %s\n",
-	    id->ich_version, id->desc);
-
 	if (id_p)
 		*id_p = id;
 
@@ -573,8 +570,6 @@ ichwd_identify(driver_t *driver, device_
 	if (dev == NULL)
 		return;
 
-	device_set_desc_copy(dev, id_p->desc);
-
 	switch (id_p->tco_version) {
 	case 1:
 		break;
@@ -611,10 +606,16 @@ ichwd_identify(driver_t *driver, device_
 static int
 ichwd_probe(device_t dev)
 {
+	struct ichwd_device *id_p;
 
 	/* Do not claim some ISA PnP device by accident. */
 	if (isa_get_logicalid(dev) != 0)
 		return (ENXIO);
+
+	if (ichwd_find_ich_lpc_bridge(&id_p) == NULL)
+		return (ENXIO);
+
+	device_set_desc_copy(dev, id_p->desc);
 	return (0);
 }
 
@@ -677,9 +678,6 @@ ichwd_attach(device_t dev)
 	if (ichwd_clear_noreboot(sc) != 0)
 		goto fail;
 
-	ichwd_verbose_printf(dev, "%s (ICH%d or equivalent)\n",
-	    id_p->desc, sc->ich_version);
-
 	/*
 	 * Determine if we are coming up after a watchdog-induced reset.  Some
 	 * BIOSes may clear this bit at bootup, preventing us from reporting


More information about the svn-src-head mailing list