From nobody Mon Nov 25 00:15:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+81858+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+81858+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1634103415; cv=none; d=zohomail.com; s=zohoarc; b=FT6Dk23mz12MzJePwJa36kHydf83QogobfaQ6lfqz5bzwZyOyEfH2aNYfVB/sDj8J+Dezo1ghgKSST8x5QMEV9THDzjY2kg7+I+Shrm69qfnAgfOnSl+bQAGnY1kH+BLxcs+N8eRtOn6AOx0tKeKr85fnrq1rSlh5+xWq/6XY3Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634103415; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=2HxOXPQBQ99aymp7X7nQOtlSIxzcxxK8PPJSM72DG2E=; b=ceXessoD8H4NOAHNWYtRxZRTG0FDWLBGiq8am/CtorlZx2xUTX+jrgwhJ0Ls/Xv/wS2w2InCdVk0MfOgx3QUtAyb28+BpmH8A0EeCfv9sU3lW0oWLqqkEwkZ1x4zAIJWjuSAqC4eQl2rzkonjGp37XmiiWSVt1hl0tmRu5k5bxA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+81858+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1634103415461399.12053310913734; Tue, 12 Oct 2021 22:36:55 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id D6ECYY1788612xKCIpVD8dAB; Tue, 12 Oct 2021 22:36:55 -0700 X-Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) by mx.groups.io with SMTP id smtpd.web11.4081.1634103414568824284 for ; Tue, 12 Oct 2021 22:36:54 -0700 X-Received: by mail-pj1-f46.google.com with SMTP id pf6-20020a17090b1d8600b0019fa884ab85so3537922pjb.5 for ; Tue, 12 Oct 2021 22:36:54 -0700 (PDT) X-Gm-Message-State: OOocUrKnHCcgnYo0M8cqsjcNx1787277AA= X-Google-Smtp-Source: ABdhPJxezfuA8OSR0qBqyqpj62TrAYPi6zbTSb2TqIFPxPZSjwyWpy7mtDhzu/DLkcJEFGYxzJzULg== X-Received: by 2002:a17:90b:4c8d:: with SMTP id my13mr11084456pjb.101.1634103414059; Tue, 12 Oct 2021 22:36:54 -0700 (PDT) X-Received: from localhost.localdomain (122x208x150x49.ap122.ftth.ucom.ne.jp. [122.208.150.49]) by smtp.gmail.com with ESMTPSA id k14sm13623271pgg.92.2021.10.12.22.36.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 22:36:53 -0700 (PDT) From: "Masami Hiramatsu" To: Ard Biesheuvel , Leif Lindholm Cc: devel@edk2.groups.io, Kazuhiko Sakamoto Subject: [edk2-devel] [PATCH 1/4] Silicon/SynQuacerNetsecDxe: Test the ControllerHandle is managed by this driver Date: Wed, 13 Oct 2021 14:36:51 +0900 Message-Id: <163410341134.323609.17991695355751540906.stgit@localhost> In-Reply-To: <163410340292.323609.10978291802739074305.stgit@localhost> References: <163410340292.323609.10978291802739074305.stgit@localhost> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,masami.hiramatsu@linaro.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1634103415; bh=bFyJMPsPcBGppjXvYlxdOEcbot4efbwb2sU4WRIBKXk=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=CvqaLCCxAdnqehT3k91+7YfpGA/BqiBwdQ9b2I9IW+rvLlFC5HSLXqMiMz+RJojJR1z laolWqLmuWmT8ys6KzLwB9cKkWk50dZ7//9fFItXAN5F4fbAadVJMASvLvCz7uqKZwcPC VSMJ8/2uN8NIkaUj0CuZqunnQtkpgciMq8Q= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1634103416458100002 From: Kazuhiko Sakamoto Test the @ControllerHandle is not NULL and is actually managed by this driver. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Kazuhiko Sakamoto Signed-off-by: Masami Hiramatsu --- .../Drivers/Net/NetsecDxe/ComponentName.c | 13 +++++++++++++ .../Drivers/Net/NetsecDxe/DriverBinding.c | 1 - .../SynQuacer/Drivers/Net/NetsecDxe/NetsecDxe.h | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/ComponentNam= e.c b/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/ComponentName.c index 44b3daa0af..743fa88384 100644 --- a/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/ComponentName.c +++ b/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/ComponentName.c @@ -159,6 +159,19 @@ NetsecGetControllerName ( OUT CHAR16 **ControllerName ) { + EFI_STATUS Status; + + if (!ControllerHandle) { + return EFI_INVALID_PARAMETER; + } + + Status =3D EfiTestManagedDevice (ControllerHandle, + gNetsecDriverBinding.DriverBindingHandle, + &gEdkiiNonDiscoverableDeviceProtocolGuid); + if (EFI_ERROR (Status)) { + return Status; + } + if (ChildHandle !=3D NULL) { return EFI_UNSUPPORTED; } diff --git a/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/DriverBindin= g.c b/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/DriverBinding.c index 392d1b474f..fa0c415e98 100644 --- a/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/DriverBinding.c +++ b/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/DriverBinding.c @@ -131,7 +131,6 @@ NetsecDriverBindingStop ( } =20 =20 -STATIC EFI_DRIVER_BINDING_PROTOCOL gNetsecDriverBinding =3D { NetsecDriverBindingSupported, NetsecDriverBindingStart, diff --git a/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/NetsecDxe.h = b/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/NetsecDxe.h index cf2abb0ab1..9b3d19c033 100644 --- a/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/NetsecDxe.h +++ b/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/NetsecDxe.h @@ -27,6 +27,7 @@ #include "netsec_for_uefi/pfdep.h" =20 extern EFI_COMPONENT_NAME2_PROTOCOL gNetsecDriverComponentName2; +extern EFI_DRIVER_BINDING_PROTOCOL gNetsecDriverBinding; =20 /*--------------- Simple Network Driver entry point functions ------------= ----*/ =20 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#81858): https://edk2.groups.io/g/devel/message/81858 Mute This Topic: https://groups.io/mt/86281578/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-