dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

Blame SOURCES/0198-Revert-reopen-SNP-protocol-for-exclusive-use-by-grub.patch

4fe85b
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
4fe85b
From: Peter Jones <pjones@redhat.com>
4fe85b
Date: Thu, 7 Apr 2016 10:58:06 -0400
4fe85b
Subject: [PATCH] Revert "reopen SNP protocol for exclusive use by grub"
4fe85b
4fe85b
I *think* this should have been replaced by upstream's
4fe85b
49426e9fd2e562c73a4f1206f32eff9e424a1a73, so I'm reverting for now.
4fe85b
4fe85b
May resolve rhbz#1273974.
4fe85b
4fe85b
This reverts commit 147daeab22db793978f952b6f0d832919a1b0081.
4fe85b
---
4fe85b
 grub-core/net/drivers/efi/efinet.c | 40 --------------------------------------
4fe85b
 1 file changed, 40 deletions(-)
4fe85b
4fe85b
diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c
4fe85b
index d8099a59855..3f112438a93 100644
4fe85b
--- a/grub-core/net/drivers/efi/efinet.c
4fe85b
+++ b/grub-core/net/drivers/efi/efinet.c
4fe85b
@@ -340,7 +340,6 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device,
4fe85b
 {
4fe85b
   struct grub_net_card *card;
4fe85b
   grub_efi_device_path_t *dp;
4fe85b
-  grub_efi_simple_network_t *net;
4fe85b
 
4fe85b
   dp = grub_efi_get_device_path (hnd);
4fe85b
   if (! dp)
4fe85b
@@ -394,45 +393,6 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device,
4fe85b
 				    &pxe_mode->dhcp_ack,
4fe85b
 				    sizeof (pxe_mode->dhcp_ack),
4fe85b
 				    1, device, path);
4fe85b
-    net = grub_efi_open_protocol (card->efi_handle, &net_io_guid,
4fe85b
-				  GRUB_EFI_OPEN_PROTOCOL_BY_EXCLUSIVE);
4fe85b
-    if (net) {
4fe85b
-      if (net->mode->state == GRUB_EFI_NETWORK_STOPPED
4fe85b
-	  && efi_call_1 (net->start, net) != GRUB_EFI_SUCCESS)
4fe85b
-	continue;
4fe85b
-
4fe85b
-      if (net->mode->state == GRUB_EFI_NETWORK_STOPPED)
4fe85b
-	continue;
4fe85b
-
4fe85b
-      if (net->mode->state == GRUB_EFI_NETWORK_STARTED
4fe85b
-	  && efi_call_3 (net->initialize, net, 0, 0) != GRUB_EFI_SUCCESS)
4fe85b
-	continue;
4fe85b
-
4fe85b
-      /* Enable hardware receive filters if driver declares support for it.
4fe85b
-	 We need unicast and broadcast and additionaly all nodes and
4fe85b
-	 solicited multicast for IPv6. Solicited multicast is per-IPv6
4fe85b
-	 address and we currently do not have API to do it so simply
4fe85b
-	 try to enable receive of all multicast packets or evertyhing in
4fe85b
-	 the worst case (i386 PXE driver always enables promiscuous too).
4fe85b
-
4fe85b
-	 This does trust firmware to do what it claims to do.
4fe85b
-       */
4fe85b
-      if (net->mode->receive_filter_mask)
4fe85b
-	{
4fe85b
-	  grub_uint32_t filters = GRUB_EFI_SIMPLE_NETWORK_RECEIVE_UNICAST   |
4fe85b
-				  GRUB_EFI_SIMPLE_NETWORK_RECEIVE_BROADCAST |
4fe85b
-				  GRUB_EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS_MULTICAST;
4fe85b
-
4fe85b
-	  filters &= net->mode->receive_filter_mask;
4fe85b
-	  if (!(filters & GRUB_EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS_MULTICAST))
4fe85b
-	    filters |= (net->mode->receive_filter_mask &
4fe85b
-			GRUB_EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS);
4fe85b
-
4fe85b
-	  efi_call_6 (net->receive_filters, net, filters, 0, 0, 0, NULL);
4fe85b
-	}
4fe85b
-
4fe85b
-      card->efi_net = net;
4fe85b
-    }
4fe85b
     return;
4fe85b
   }
4fe85b
 }