public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Anthony PERARD" <anthony.perard@citrix.com>
To: <devel@edk2.groups.io>
Cc: Jordan Justen <jordan.l.justen@intel.com>,
	Laszlo Ersek <lersek@redhat.com>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	Julien Grall <julien.grall@arm.com>,
	Anthony PERARD <anthony.perard@citrix.com>
Subject: [PATCH] OvmfPkg/XenBusDxe: Don't call DisconnectController in Stop()
Date: Mon, 1 Jul 2019 12:14:03 +0100	[thread overview]
Message-ID: <20190701111403.7007-1-anthony.perard@citrix.com> (raw)

Calling DisconnectController() on children isn't part of the job of
EFI_DRIVER_BINDING_PROTOCOL.Stop() as it only needs to deallocate
resources allocated in Start(). The disconnection will happen when
both DevicePath and XenBus protocols gets uninstalled.

Reported-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---

Notes:
    Please apply this patch after:
    "OvmfPkg/XenBusDxe: Close XenIoProtocol openned by children"

 OvmfPkg/XenBusDxe/XenBusDxe.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/OvmfPkg/XenBusDxe/XenBusDxe.c b/OvmfPkg/XenBusDxe/XenBusDxe.c
index 7c07a96650..634c7b71eb 100644
--- a/OvmfPkg/XenBusDxe/XenBusDxe.c
+++ b/OvmfPkg/XenBusDxe/XenBusDxe.c
@@ -446,12 +446,6 @@ XenBusDxeDriverBindingStop (
       continue;
     }
     ChildData = XENBUS_PRIVATE_DATA_FROM_THIS (XenBusIo);
-    Status = gBS->DisconnectController (ChildData->Handle, NULL, NULL);
-    if (EFI_ERROR (Status)) {
-      DEBUG ((EFI_D_ERROR, "XenBusDxe: error disconnecting child: %r\n",
-              Status));
-      continue;
-    }
 
     Status = gBS->CloseProtocol (Dev->ControllerHandle, &gXenIoProtocolGuid,
                     Dev->This->DriverBindingHandle, ChildData->Handle);
-- 
Anthony PERARD


             reply	other threads:[~2019-07-01 11:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-01 11:14 Anthony PERARD [this message]
2019-07-01 14:39 ` [PATCH] OvmfPkg/XenBusDxe: Don't call DisconnectController in Stop() Laszlo Ersek
2019-07-01 14:56 ` Laszlo Ersek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190701111403.7007-1-anthony.perard@citrix.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox