From nobody Mon Mar 21 15:54:54 2022 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 649181A19422; Mon, 21 Mar 2022 15:54:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KMfML2Ms9z4yFF; Mon, 21 Mar 2022 15:54:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1647878094; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s7F+v1jaraRxP+Xwnyg/hERtVcyb9hy379WevHMEx70=; b=n7RN9ciyJ8x9crkhkV70MJgWRXpol12TKcM3ynyYK4huy2hJSy7no1akcGWDtgfa3LJjij s9+8E7zFEa67bBTJkWn1TO8//mtcclgR3P3M3wtg6j2jjwv/CpIY32uOuHdV8ImtOg6r2I LpXpjN7jpE+KiLkCu5pxCBEYNGP1iHt+FSCgHtuUn/34bFn51mM682jac04veY0uM+Oukv rJBv7BQdoJtVdoChAeOdaMnw4rxNmGaSWHUftHp8eDBUUDHHO7tS60lli/+gn2r8QwQnXW YVRTIaY4B/MB7X+nZNejeavJI6vOBIaGsYHEZh7314tQtv/LiNml/SzQF0GFxg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3152D1DB74; Mon, 21 Mar 2022 15:54:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 22LFssvd017603; Mon, 21 Mar 2022 15:54:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22LFssQM017602; Mon, 21 Mar 2022 15:54:54 GMT (envelope-from git) Date: Mon, 21 Mar 2022 15:54:54 GMT Message-Id: <202203211554.22LFssQM017602@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 8518513d2436 - stable/12 - Stop the VESA driver from whining loudly in the dmesg during boot on systems that use EFI instead of BIOS. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 8518513d2436386bb16dac9f344679c2a9b75634 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1647878094; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s7F+v1jaraRxP+Xwnyg/hERtVcyb9hy379WevHMEx70=; b=ZcZJHG7JBENdFmFwSuwRrUkXodsaVhfNd8s8m1FVVUJpGDViEcPAXNbZW9HnWq/Oxn1W4n x9eYM84XV+bAn2mVTIsdo0dcP68vJHpt8c7av5ocHHmq3FS6k1sChjlaw2do6hhvx3SX8t 9mwgP4CtYfSgmPzu5ptroWWDHdM0vKRi3GlbitE7sARq7v1MylgFk7awrmB4ajEvC5H1Tu ICtg/P5lAr80fnudn5mCZvOxe6C8hK+mm5RKiVOwfNXSqw92utDnTQXAM2tj9v+2xpnl99 U4mJJ7WAmJoANOKaual9gsMxe9PgL/BvI2givY8xiszN3c+GSGlmynaciS61Tg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1647878094; a=rsa-sha256; cv=none; b=J2LPq5lXyfm8/Wanj3PCqF2ehO4kJv76pEzAEs6KrwdUIUvYYe4DLHNONixaCE4pqBaQP0 ODcFmhSi8y0i41iUq3y7ItE//Qe7U7Rh5jpnOsebyH4hkmaXy62+EC3ZkNCe4xeE0stCSD aALKxixoha0w3XS1iZDpH3hDEI3hkW+65fTkkYlDMjaYtZ20KXp823qyd82Dvn/B0e+O5h fGu8BARAsS9yyLOu6ouQmzTPi9xAXAUVBmvEFCaKRUxzUN7X3FpxJ684Ij3RlHyaquk35a r1WprzC8gY0Fva70IghEx/CezFsZPleusHXxUHTtevmXtL01U9AC80cmrcpNrA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=8518513d2436386bb16dac9f344679c2a9b75634 commit 8518513d2436386bb16dac9f344679c2a9b75634 Author: Scott Long AuthorDate: 2019-11-13 15:31:31 +0000 Commit: Ed Maste 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,