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

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