dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

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

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