From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web10.14189.1683855370298053228 for ; Thu, 11 May 2023 18:36:10 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=WKzlpXnY; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: hao.a.wu@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1683855370; x=1715391370; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=+mZjre7t4sgqMEUH90dEmROm6XhF61iN+WOSnNQuyPE=; b=WKzlpXnYKiDxy4mynhZY5jCJBNwGf50KEvW2uU87k7j14ug61BYKtkVs RTzWFmHXRUkH+auwT6O8L4bRAwIqBbEGQDjP2CJ68554hZKFmDi6Un/ol uxDNQGC1udfEy/xYM4HL/TV8Wuw5Em4BFyD12b1qwx/w47PnpoHRl4sLS A2Qwi/vK6uYWyLuAF/jTjEfNmOni0Nf5d8a0ESk7PUdbomzrYVSnh1ArX kcvm5FoxSo5cxWYT33lFluKZm1rP8dXKnbDZ5f8WZ2PtKrhRZa1ibh1Ju I4ZPfLhThuqbWnnF3V9U+s/pvXpY7kY/GvkCeIHQBbsv1eGbI0ZEcuLkr w==; X-IronPort-AV: E=McAfee;i="6600,9927,10707"; a="331040951" X-IronPort-AV: E=Sophos;i="5.99,268,1677571200"; d="scan'208";a="331040951" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2023 18:35:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10707"; a="946422833" X-IronPort-AV: E=Sophos;i="5.99,269,1677571200"; d="scan'208";a="946422833" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmsmga006.fm.intel.com with ESMTP; 11 May 2023 18:35:46 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Thu, 11 May 2023 18:35:46 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Thu, 11 May 2023 18:35:46 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23 via Frontend Transport; Thu, 11 May 2023 18:35:46 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.174) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.23; Thu, 11 May 2023 18:35:45 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NxQiSNC/dQTpQJepMk8oIxfv8ZxPFiGciRY+NeHhszUQJpTgftXixndCh1QJbusBfF40G5fLmZSpAmY1QwtknMg1xOZRuhIe3LotnUxwGqa5sbFtEH19KzLfwhXKbTGnBLyUAO5g7gOGv39KypumlNnvMhf78icOha6F1+1n1OD+71r6kLo6shnN62ju4g909CnJOHNdfOc/9Du4uzR73U/cFJIeaYoNKhICOb0OoPrBCRaEcAxV/Ji7fscWhClJB1RfBY0RFYmcahTZPmZFCa4a71gyQhxjeu5ZNSIgemTTpDyl70VTAcFq7nLa6OoorLUEPdLpTiXpJfGuwrVeoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bR+s/Lt1VnpVCRI6Pm6dDLXiBU00Omcnp+6uxnLxeqs=; b=CLxhIu3dMaNj4eP/3gQJdyrkbp67PJrDGes/3lNTIGfatLVni8U6RIwOH4umq8jY43UjXVEUm3QGRSTZGLw2ge+TldJLEkKDcsxb6cJA0PZpscCIdPs3hbks2+gICEvZCMV+jIolQDwuBuUocZazKT7/MGxWIIXwij33Ek7oxqVPRkJ58L2vdx9fg+ngS+rHwWOjjxaQXF/GE759YsP5BbtNa8vpTJZd+ecRPV/kk7wu4/gRYlIHNRIe3v4t7QZiZk7ULAufDV3yXafkhuTtbeZS6FIfg49cT2ufeFLLXxgobO+uyzGa8daMqhOQWtqFagzrp5CD5nXbZzIHGhiMFA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from MN2PR11MB4031.namprd11.prod.outlook.com (2603:10b6:208:150::18) by CY5PR11MB6137.namprd11.prod.outlook.com (2603:10b6:930:2b::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.33; Fri, 12 May 2023 01:35:42 +0000 Received: from MN2PR11MB4031.namprd11.prod.outlook.com ([fe80::938:1dcf:6071:ef90]) by MN2PR11MB4031.namprd11.prod.outlook.com ([fe80::938:1dcf:6071:ef90%6]) with mapi id 15.20.6387.022; Fri, 12 May 2023 01:35:35 +0000 From: "Wu, Hao A" To: Pedro Falcato , "devel@edk2.groups.io" CC: Laszlo Ersek , "Wang, Jian J" , "Gao, Liming" , "Ni, Ray" Subject: Re: [PATCH v2 02/12] MdeModulePkg/SataControllerDxe: Log expected errors at DEBUG_INFO level Thread-Topic: [PATCH v2 02/12] MdeModulePkg/SataControllerDxe: Log expected errors at DEBUG_INFO level Thread-Index: AQHZgpPcLp7pYXHkb0Ohrreux6DIS69V3HaQ Date: Fri, 12 May 2023 01:35:34 +0000 Message-ID: References: <20230509163212.291333-1-pedro.falcato@gmail.com> <20230509163212.291333-3-pedro.falcato@gmail.com> In-Reply-To: <20230509163212.291333-3-pedro.falcato@gmail.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN2PR11MB4031:EE_|CY5PR11MB6137:EE_ x-ms-office365-filtering-correlation-id: 1d91f1d1-51fa-42ea-eec3-08db52892e76 x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: TZBRUHuZkfUZUdjqtDl/TRtvuwN0uAUaq/P5ghq5QHLSzCJlEfHrEfV5CvgTOrVnsmDNxsIMm2j0XJ/ILvNgpsIaAlC3NDDJsAE4YVGPZ8ZvmBxMXwwvJ0g5qYrb5mDP2sVubPcRAqUwJwqrWR9kb+SLoC5qRUAU8wcLai0TTY/ly1OAfG/EV6aK1dPF9Lt7l/BcD9uZW4m83c9zsMcWGM7XecAT663QL1lfg5IK980yZGyVgYf70zhJvh811Wq5YIR0KhtQ5qdqOnMnJy4igihF9lNOcyPfFA35Q1U+HaMLNgEnM5NdGKI7fIbCdYRbQcOZS66CYq/H34TnZc20xTlq+Uh8R+xd/WvAlfaJQvGwEULreUm9aQ8NAXUssyhTRBzc+u8zeTnFVRSb9IosVjBUP2K8RctcNrYOA45XOmyqEZoFUXXGf5bW5oxOc6ZTA5icHdM2MTXDOVvqvSHfnyfYBfeIdFXPm87ZmK6lkSVpcRUqLgCgTEK8yxQ4KsLoFvc74w/8nyXDTM+Myv8qz1zEuVOyAL8+RJL27YJ8QRHtH4oRFNCtPB7HGuollo4aTVxJqzdCYtLCwEpN90+LQuZ7T8ZbOFvBX1SmePiHLal/hi5Io+9V6yUQNudc/eo6 x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR11MB4031.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(346002)(136003)(376002)(396003)(366004)(39860400002)(451199021)(4326008)(54906003)(86362001)(66946007)(64756008)(66476007)(66556008)(55016003)(76116006)(66446008)(7696005)(8676002)(9686003)(41300700001)(33656002)(38100700002)(53546011)(6506007)(107886003)(186003)(2906002)(8936002)(52536014)(478600001)(38070700005)(71200400001)(5660300002)(316002)(82960400001)(83380400001)(122000001)(110136005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Bd4ON5rXr7XzSJ3ANKaIQHt/LWs5kfEYWuRgwkFwx/gfRgb2ScD/qAzRU8Tb?= =?us-ascii?Q?psrHDdIuDBJkNlAxjeMkFbM1moPaK2tZBCVd6tnYtHU7efyWELkZHfFf+olq?= =?us-ascii?Q?pK4g3ogOqfo+Ppudt/ZiXQ/vVA6wqSNWL9wfvo86UKbZ1CqO+nXjjqHEe5Re?= =?us-ascii?Q?bQ5Eaga3ZyirPzy5R7sOWG3WetCPxVGMHJ6rU1KSLLk4IAdF5y3QMnUMdvEY?= =?us-ascii?Q?jmllL/Y0Wn3sVeXUhjEdrBWCZ9iTmXVBuFyKbNSZ6AeVQUd2g65rauN2JQVV?= =?us-ascii?Q?NVE9g7bafhb8TnmIKvmefch0ohDnIqIshDbXJH0gTzAlAXjB9Vakb9nJ7+2+?= =?us-ascii?Q?MB8zzlQVZfnpqg9+6VbNK9D1XTUnosVTQ1lZLJ9OT4X37yBgOt9MpmqWaGxt?= =?us-ascii?Q?d3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tp7xG5b9f?= =?us-ascii?Q?I98m+8IXKNth9wHbYlrpbQKo5semvYtWX8qTI221Aum+iOoEcnXENWC9aOiG?= =?us-ascii?Q?IrrBZH22KCn/uLhnLK/DAhap6xiWqDPIOIZemggTmE4aI5KxtK7NUg6NE1A4?= =?us-ascii?Q?HUmqlo06eYq4aH5CzhtuSahr1d2ykojYWXa+uo5k/pW2bHcCOW/YJZSxL+Qz?= =?us-ascii?Q?5er+9cqOLNjCuVoiTINmp+b112uYRbk1fwDS1/hLk/rut5r0eNJNuWuSIg?= =?us-ascii?Q?=3D=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN2PR11MB4031.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1d91f1d1-51fa-42ea-eec3-08db52892e76 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 May 2023 01:35:34.6265 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: t4qrE0ETA3ZPtlS3qQ9pY9epqW7kd2XoyjFXF5dvk+YWueh5dcKM3Xh/ayWR3oUT1XMqdK6ufOG89pp5ET6OPw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR11MB6137 Return-Path: hao.a.wu@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Hao A Wu Best Regards, Hao Wu > -----Original Message----- > From: Pedro Falcato > Sent: Wednesday, May 10, 2023 12:32 AM > To: devel@edk2.groups.io > Cc: Laszlo Ersek ; Pedro Falcato > ; Wang, Jian J ; Gao, > Liming ; Wu, Hao A ; Ni, > Ray > Subject: [PATCH v2 02/12] MdeModulePkg/SataControllerDxe: Log expected > errors at DEBUG_INFO level >=20 > 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, >=20 > > 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. >=20 > 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. >=20 > (ported from commit 5dfba97) >=20 > Cc: Jian J Wang > Cc: Liming Gao > Cc: Hao A Wu > Cc: Ray Ni > Cc: Laszlo Ersek > Signed-off-by: Pedro Falcato > --- > .../Bus/Pci/SataControllerDxe/SataController.c | 15 +++++++++++++-- > 1 file changed, 13 insertions(+), 2 deletions(-) >=20 > diff --git a/MdeModulePkg/Bus/Pci/SataControllerDxe/SataController.c > b/MdeModulePkg/Bus/Pci/SataControllerDxe/SataController.c > index d67a3e69f649..277bc6182db6 100644 > --- a/MdeModulePkg/Bus/Pci/SataControllerDxe/SataController.c > +++ b/MdeModulePkg/Bus/Pci/SataControllerDxe/SataController.c > @@ -358,10 +358,12 @@ SataControllerStart ( > UINTN TotalCount; > UINT64 Supports; > UINT8 MaxPortNumber; > + UINTN BailLogMask; >=20 > DEBUG ((DEBUG_INFO, "SataControllerStart start\n")); >=20 > - Private =3D NULL; > + Private =3D NULL; > + BailLogMask =3D DEBUG_ERROR; >=20 > // > // Now test and open PCI I/O Protocol > @@ -375,6 +377,15 @@ 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, i= n a > + // DriverBindingStart() member function; degrade the log mask to > + // DEBUG_INFO in order to reduce log pollution. > + // > + BailLogMask =3D DEBUG_INFO; > + } > + > goto Bail; > } >=20 > @@ -555,7 +566,7 @@ FreeSataPrivate: > ClosePciIo: > gBS->CloseProtocol (Controller, &gEfiPciIoProtocolGuid, This- > >DriverBindingHandle, Controller); > Bail: > - DEBUG ((DEBUG_ERROR, "SataControllerStart error return status =3D %r\n= ", > Status)); > + DEBUG ((BailLogMask, "SataControllerStart error return status =3D %r\n= ", > Status)); > return Status; > } >=20 > -- > 2.40.1