From nobody Fri Dec 27 03:03:23 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1504556065655674.0910075443823; Mon, 4 Sep 2017 13:14:25 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 67E1E21E95E13; Mon, 4 Sep 2017 13:11:27 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 72B7A21E7492F for ; Mon, 4 Sep 2017 13:11:26 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3DC6D6DDF0; Mon, 4 Sep 2017 20:14:14 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-2.rdu2.redhat.com [10.10.120.2]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6054C66D4C; Mon, 4 Sep 2017 20:14:13 +0000 (UTC) X-Original-To: edk2-devel@lists.01.org DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 3DC6D6DDF0 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=lersek@redhat.com From: Laszlo Ersek To: edk2-devel-01 Date: Mon, 4 Sep 2017 22:14:03 +0200 Message-Id: <20170904201403.6445-6-lersek@redhat.com> In-Reply-To: <20170904201403.6445-1-lersek@redhat.com> References: <20170904201403.6445-1-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Mon, 04 Sep 2017 20:14:14 +0000 (UTC) Subject: [edk2] [PATCH 5/5] OvmfPkg/SataControllerDxe: log informative message at DEBUG_INFO level X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jordan Justen MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" When a UEFI_DRIVER attempts to open a protocol interface with BY_DRIVER attribute that it already has open with BY_DRIVER attribute, OpenProtocol() returns EFI_ALREADY_STARTED. This is not an error. The UEFI-2.7 spec currently says, > EFI_ALREADY_STARTED -- Attributes is BY_DRIVER and there is an item on > the open list with an attribute of BY_DRIVER > whose agent handle is the same as AgentHandle. (In fact it is so much an expected condition that recent USWG Mantis ticket will codify its additional edk2-specific behavior, namely to output the protocol interface at once.) Downgrade the log mask for this one condition to DEBUG_INFO, in SataControllerStart(). This will match the log mask of the other two informative messages in this function, "SataControllerStart START", and "SataControllerStart END status =3D %r" (at which point Status can only be EFI_SUCCESS). Cc: Jordan Justen Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek --- OvmfPkg/SataControllerDxe/SataController.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/OvmfPkg/SataControllerDxe/SataController.c b/OvmfPkg/SataContr= ollerDxe/SataController.c index 1f84ad034e5b..2a5c3ba9f1b2 100644 --- a/OvmfPkg/SataControllerDxe/SataController.c +++ b/OvmfPkg/SataControllerDxe/SataController.c @@ -388,6 +388,7 @@ SataControllerStart ( IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath ) { + UINTN BailLogMask; EFI_STATUS Status; EFI_PCI_IO_PROTOCOL *PciIo; UINT64 OriginalPciAttributes; @@ -398,6 +399,7 @@ SataControllerStart ( =20 DEBUG ((EFI_D_INFO, "SataControllerStart START\n")); =20 + BailLogMask =3D DEBUG_ERROR; SataPrivateData =3D NULL; =20 // @@ -412,6 +414,14 @@ SataControllerStart ( EFI_OPEN_PROTOCOL_BY_DRIVER ); if (EFI_ERROR (Status)) { + if (Status =3D=3D EFI_ALREADY_STARTED) { + // + // This is an expected condition for OpenProtocol() / BY_DRIVER, in a + // DriverBindingStart() member function; degrade the log mask to + // DEBUG_INFO. + // + BailLogMask =3D DEBUG_INFO; + } goto Bail; } =20 @@ -542,7 +552,8 @@ ClosePciIo: ); =20 Bail: - DEBUG ((EFI_D_ERROR, "SataControllerStart error return status =3D %r\n",= Status)); + DEBUG ((BailLogMask, "SataControllerStart error return status =3D %r\n", + Status)); return Status; } =20 --=20 2.14.1.3.gb7cf6e02401b _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel