2018-04-11 18:42:03 +00:00
|
|
|
From 0ff5bf3deefdb17dbadb51a11acc50b96e2ed797 Mon Sep 17 00:00:00 2001
|
2018-01-17 22:04:09 +00:00
|
|
|
From: Fedora Ninjas <grub2-owner@fedoraproject.org>
|
|
|
|
Date: Sat, 15 Feb 2014 15:10:22 -0500
|
2018-07-02 12:42:57 +00:00
|
|
|
Subject: [PATCH 116/250] reopen SNP protocol for exclusive use by grub
|
2018-01-17 22:04:09 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
grub-core/net/drivers/efi/efinet.c | 16 ++++++++++++++++
|
|
|
|
1 file changed, 16 insertions(+)
|
|
|
|
|
|
|
|
diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c
|
2018-02-27 18:56:41 +00:00
|
|
|
index 5388f952ba9..ea0e0ca360e 100644
|
2018-01-17 22:04:09 +00:00
|
|
|
--- a/grub-core/net/drivers/efi/efinet.c
|
|
|
|
+++ b/grub-core/net/drivers/efi/efinet.c
|
|
|
|
@@ -330,6 +330,7 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device,
|
|
|
|
{
|
|
|
|
struct grub_net_card *card;
|
|
|
|
grub_efi_device_path_t *dp;
|
|
|
|
+ grub_efi_simple_network_t *net;
|
|
|
|
|
|
|
|
dp = grub_efi_get_device_path (hnd);
|
|
|
|
if (! dp)
|
|
|
|
@@ -383,6 +384,21 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device,
|
|
|
|
&pxe_mode->dhcp_ack,
|
|
|
|
sizeof (pxe_mode->dhcp_ack),
|
|
|
|
1, device, path);
|
|
|
|
+ net = grub_efi_open_protocol (card->efi_handle, &net_io_guid,
|
|
|
|
+ GRUB_EFI_OPEN_PROTOCOL_BY_EXCLUSIVE);
|
|
|
|
+ if (net) {
|
|
|
|
+ if (net->mode->state == GRUB_EFI_NETWORK_STOPPED
|
|
|
|
+ && efi_call_1 (net->start, net) != GRUB_EFI_SUCCESS)
|
|
|
|
+ continue;
|
|
|
|
+
|
|
|
|
+ if (net->mode->state == GRUB_EFI_NETWORK_STOPPED)
|
|
|
|
+ continue;
|
|
|
|
+
|
|
|
|
+ if (net->mode->state == GRUB_EFI_NETWORK_STARTED
|
|
|
|
+ && efi_call_3 (net->initialize, net, 0, 0) != GRUB_EFI_SUCCESS)
|
|
|
|
+ continue;
|
|
|
|
+ card->efi_net = net;
|
|
|
|
+ }
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
--
|
2018-06-04 16:28:07 +00:00
|
|
|
2.17.1
|
2018-01-17 22:04:09 +00:00
|
|
|
|