2016-04-05 19:32:41 +00:00
|
|
|
From 27e661936f8f001100c143036749a0e620d63cbf Mon Sep 17 00:00:00 2001
|
2014-07-02 15:49:28 +00:00
|
|
|
From: Fedora Ninjas <grub2-owner@fedoraproject.org>
|
|
|
|
Date: Sat, 15 Feb 2014 15:10:22 -0500
|
2016-04-07 14:59:58 +00:00
|
|
|
Subject: [PATCH 53/89] reopen SNP protocol for exclusive use by grub
|
2014-07-02 15:49:28 +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
|
2016-03-04 18:32:29 +00:00
|
|
|
index 5388f95..ea0e0ca 100644
|
2014-07-02 15:49:28 +00:00
|
|
|
--- a/grub-core/net/drivers/efi/efinet.c
|
|
|
|
+++ b/grub-core/net/drivers/efi/efinet.c
|
2016-03-04 18:32:29 +00:00
|
|
|
@@ -330,6 +330,7 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device,
|
2014-07-02 15:49:28 +00:00
|
|
|
{
|
|
|
|
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)
|
2016-03-04 18:32:29 +00:00
|
|
|
@@ -383,6 +384,21 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device,
|
2014-07-02 15:49:28 +00:00
|
|
|
&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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
--
|
2016-04-05 19:32:41 +00:00
|
|
|
2.5.5
|
2014-07-02 15:49:28 +00:00
|
|
|
|