forked from pool/grub2
66d380590b
- fix grub.xen not able to handle legacy menu.lst hdX names (bnc#863821) * add grub2-xen-legacy-config-device-name.patch from arvidjaar - fix the performance of grub2 uefi pxe is bad (bnc#871555) * add grub2-efinet-reopen-SNP-protocol-for-exclusive-use-by-grub.patch OBS-URL: https://build.opensuse.org/request/show/250087 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=117
49 lines
1.5 KiB
Diff
49 lines
1.5 KiB
Diff
From 42d3848d0162ea8f824d63d57afb43b8b0a96860 Mon Sep 17 00:00:00 2001
|
|
From: Fedora Ninjas <grub2-owner@fedoraproject.org>
|
|
Date: Sat, 15 Feb 2014 15:10:22 -0500
|
|
Subject: [PATCH 110/112] reopen SNP protocol for exclusive use by grub
|
|
|
|
References: bnc#871555
|
|
Patch-Mainline: no
|
|
---
|
|
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
|
|
index 2b344d6..a6e4c79 100644
|
|
--- a/grub-core/net/drivers/efi/efinet.c
|
|
+++ b/grub-core/net/drivers/efi/efinet.c
|
|
@@ -223,6 +223,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)
|
|
@@ -250,6 +251,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;
|
|
}
|
|
}
|
|
--
|
|
1.8.5.3
|
|
|