Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Nov 2019 15:31:31 +0000 (UTC)
From:      Scott Long <scottl@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r354683 - head/sys/dev/fb
Message-ID:  <201911131531.xADFVVMV041527@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: scottl
Date: Wed Nov 13 15:31:31 2019
New Revision: 354683
URL: https://svnweb.freebsd.org/changeset/base/354683

Log:
  Stop the VESA driver from whining loudly in the dmesg during boot on
  systems that use EFI instead of BIOS.

Modified:
  head/sys/dev/fb/vesa.c

Modified: head/sys/dev/fb/vesa.c
==============================================================================
--- head/sys/dev/fb/vesa.c	Wed Nov 13 14:28:07 2019	(r354682)
+++ head/sys/dev/fb/vesa.c	Wed Nov 13 15:31:31 2019	(r354683)
@@ -1935,6 +1935,12 @@ vesa_load(void)
 	if (error == 0)
 		vesa_bios_info(bootverbose);
 
+	/* Don't return ENODEV, the upper layers will whine. */
+	if (error == ENODEV) {
+		error = 0;
+		vesa_adp = NULL;
+	}
+
 	return (error);
 }
 
@@ -1943,8 +1949,12 @@ vesa_unload(void)
 {
 	int error;
 
+	/* The driver never initialized, so make it easy to unload. */
+	if (vesa_adp == NULL)
+		return (0);
+
 	/* if the adapter is currently in a VESA mode, don't unload */
-	if ((vesa_adp != NULL) && VESA_MODE(vesa_adp->va_mode))
+	if (VESA_MODE(vesa_adp->va_mode))
 		return (EBUSY);
 	/* 
 	 * FIXME: if there is at least one vty which is in a VESA mode,



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