git: 8518513d2436 - stable/12 - Stop the VESA driver from whining loudly in the dmesg during boot on systems that use EFI instead of BIOS.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 21 Mar 2022 15:54:54 UTC
The branch stable/12 has been updated by emaste:
URL: https://cgit.FreeBSD.org/src/commit/?id=8518513d2436386bb16dac9f344679c2a9b75634
commit 8518513d2436386bb16dac9f344679c2a9b75634
Author: Scott Long <scottl@FreeBSD.org>
AuthorDate: 2019-11-13 15:31:31 +0000
Commit: Ed Maste <emaste@FreeBSD.org>
CommitDate: 2022-03-21 15:54:35 +0000
Stop the VESA driver from whining loudly in the dmesg during boot on
systems that use EFI instead of BIOS.
(cherry picked from commit 2058e7dbde0f030105007f0f34699fdc0d8e3444)
PR: 213045
---
sys/dev/fb/vesa.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/sys/dev/fb/vesa.c b/sys/dev/fb/vesa.c
index 47f768abcc92..ac981cad34ce 100644
--- a/sys/dev/fb/vesa.c
+++ b/sys/dev/fb/vesa.c
@@ -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,