grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] efinet: disable MNP background polling


From: Andrei Borzenkov
Subject: Re: [PATCH] efinet: disable MNP background polling
Date: Thu, 1 Oct 2015 20:40:24 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0

01.10.2015 12:26, HATAYAMA Daisuke пишет:

Actually, PXE boot fails on Fujitsu PRIMEQUEST 2000 series now.


Could you give more details what fails here? GRUB is not loaded or GRUB fails to load its files or image chainloaded by GRUB fails?


diff --git a/grub-core/net/drivers/efi/efinet.c 
b/grub-core/net/drivers/efi/efinet.c
index c9af01c..a506ab3 100644
--- a/grub-core/net/drivers/efi/efinet.c
+++ b/grub-core/net/drivers/efi/efinet.c
@@ -29,6 +29,7 @@ GRUB_MOD_LICENSE ("GPLv3+");
  /* GUID.  */
  static grub_efi_guid_t net_io_guid = GRUB_EFI_SIMPLE_NETWORK_GUID;
  static grub_efi_guid_t pxe_io_guid = GRUB_EFI_PXE_GUID;
+static grub_efi_guid_t mnp_io_guid = GRUB_EFI_MANAGED_NETWORK_GUID;

  static grub_err_t
  send_card_buffer (struct grub_net_card *dev,
@@ -269,6 +270,9 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char 
**device,
      grub_efi_device_path_t *cdp;
      struct grub_efi_pxe *pxe;
      struct grub_efi_pxe_mode *pxe_mode;
+    grub_efi_managed_network_t *mnp;
+    struct grub_efi_managed_network_config_data m;
+    struct grub_efi_simple_network_mode s;
      if (card->driver != &efidriver)
        continue;
      cdp = grub_efi_get_device_path (card->efi_handle);
@@ -312,6 +316,16 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char 
**device,
                                    &pxe_mode->dhcp_ack,
                                    sizeof (pxe_mode->dhcp_ack),
                                    1, device, path);
+
+    mnp = grub_efi_open_protocol (card->efi_handle, &mnp_io_guid,
+                                 GRUB_EFI_OPEN_PROTOCOL_GET_PROTOCOL);
+
+    if (mnp
+       && efi_call_3 (mnp->get_mode_data, mnp, &m, &s) == GRUB_EFI_SUCCESS) {
+      m.disable_background_polling = 1;
+      efi_call_2 (mnp->configure, mnp, &m);
+    }
+

That's not going to work, sorry. As Laszlo already explained, base card does not have MNP protocol as all. MNP is bound to child nodes and configuration is per-child so you would need to iterate through all of them.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]