[U-Boot] [PATCH 0/1] initialize net_mode.if_type

A minor fix to efi networking.
When if_type is not set, it leads grub2's efi code to send a bogus arp request. This will then stall the progress of grub.
This was tested with grubaa64.efi from Redhat/Oracle linux 7u5.
The patch was tested against: 890e79f2b1c26c5ba1a86d179706348aec7feef7 (aka v2018.05)
Andrew Thomas (1): initialize net_mode.if_type
lib/efi_loader/efi_net.c | 1 + 1 file changed, 1 insertion(+)

if_type is not correctly initialized
Failure to initialize if_type means that grub2/efinet sends a bogus arp request. It therefore gets no response. On Raspberry Pi 3B+ this leads to a pause at:
lan78xx_eth Waiting for PHY auto negotiation to complete....... done lan78xx_eth Waiting for PHY auto negotiation to complete....... done
Signed-off-by: Andrew Thomas andrew.thomas@oracle.com --- lib/efi_loader/efi_net.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/lib/efi_loader/efi_net.c b/lib/efi_loader/efi_net.c index e113950..5a3d7be 100644 --- a/lib/efi_loader/efi_net.c +++ b/lib/efi_loader/efi_net.c @@ -361,6 +361,7 @@ efi_status_t efi_net_register(void) memcpy(netobj->net_mode.current_address.mac_addr, eth_get_ethaddr(), 6); netobj->net_mode.hwaddr_size = ARP_HLEN; netobj->net_mode.max_packet_size = PKTSIZE; + netobj->net_mode.if_type = ARP_ETHER;
netobj->pxe.mode = &netobj->pxe_mode; if (dhcp_ack)

On Thu, Jun 21, 2018 at 6:21 PM, Andrew Thomas andrew.thomas@oracle.com wrote:
if_type is not correctly initialized
Failure to initialize if_type means that grub2/efinet sends a bogus arp request. It therefore gets no response. On Raspberry Pi 3B+ this leads to a pause at:
lan78xx_eth Waiting for PHY auto negotiation to complete....... done lan78xx_eth Waiting for PHY auto negotiation to complete....... done
Signed-off-by: Andrew Thomas andrew.thomas@oracle.com
In the future, please Cc me (network maintainer).
Acked-by: Joe Hershberger joe.hershberger@ni.com
lib/efi_loader/efi_net.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/lib/efi_loader/efi_net.c b/lib/efi_loader/efi_net.c index e113950..5a3d7be 100644 --- a/lib/efi_loader/efi_net.c +++ b/lib/efi_loader/efi_net.c @@ -361,6 +361,7 @@ efi_status_t efi_net_register(void) memcpy(netobj->net_mode.current_address.mac_addr, eth_get_ethaddr(), 6); netobj->net_mode.hwaddr_size = ARP_HLEN; netobj->net_mode.max_packet_size = PKTSIZE;
netobj->net_mode.if_type = ARP_ETHER; netobj->pxe.mode = &netobj->pxe_mode; if (dhcp_ack)
-- 1.8.3.1
U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot

Hi andrew,
https://patchwork.ozlabs.org/patch/932997/ was applied to http://git.denx.de/?p=u-boot/u-boot-net.git
Thanks! -Joe
participants (3)
-
Andrew Thomas
-
Joe Hershberger
-
Joe Hershberger