Skip to content
Snippets Groups Projects
Forked from Reform / reform-boundary-uboot
Source project has a limited visibility.
  • Alexander Graf's avatar
    f9cfad1a
    efi_loader: Fix network DP with DM_ETH · f9cfad1a
    Alexander Graf authored
    
    When CONFIG_DM_ETH is set, we assemble the device path properly with a
    full device hierarchy. Our helper function dp_fill() even put the MAC
    node itself in it for us.
    
    However, for non-DM compatibility we also have code in that added the
    MAC node manually. That code now runs on top of the existing MAC node:
    
      Handle 0x3db2f6b0
        /HardwareVendor(e61d73b9-a384-4acc-aeab-82e828f3628b)[0: ]
        /USBClass(0,0,9,0,0)/USBClass(424,9514,9,0,2)/MacAddr(b8:27:eb:e1:81:47,1)
        /MacAddr(b8:27:eb:e1:81:47,57)/EndEntire
    
    We obviously don't need the additional node and in fact, grub chokes on
    it and fails to match the DP against the ethernet device node. So this
    patch moves the additional MAC node into the non-DM code path:
    
      Handle 0x3db3fde0
        /HardwareVendor(e61d73b9-a384-4acc-aeab-82e828f3628b)[0: ]
        /USBClass(0,0,9,0,0)/USBClass(424,9514,9,0,2)/MacAddr(b8:27:eb:e1:81:47,1)
        /EndEntire
    
    While at it, we also mark the non-DM MAC node as ethernet.
    
    Fixes: b66c60dd ("efi_loader: add device-path utils")
    Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
    f9cfad1a
    History
    efi_loader: Fix network DP with DM_ETH
    Alexander Graf authored
    
    When CONFIG_DM_ETH is set, we assemble the device path properly with a
    full device hierarchy. Our helper function dp_fill() even put the MAC
    node itself in it for us.
    
    However, for non-DM compatibility we also have code in that added the
    MAC node manually. That code now runs on top of the existing MAC node:
    
      Handle 0x3db2f6b0
        /HardwareVendor(e61d73b9-a384-4acc-aeab-82e828f3628b)[0: ]
        /USBClass(0,0,9,0,0)/USBClass(424,9514,9,0,2)/MacAddr(b8:27:eb:e1:81:47,1)
        /MacAddr(b8:27:eb:e1:81:47,57)/EndEntire
    
    We obviously don't need the additional node and in fact, grub chokes on
    it and fails to match the DP against the ethernet device node. So this
    patch moves the additional MAC node into the non-DM code path:
    
      Handle 0x3db3fde0
        /HardwareVendor(e61d73b9-a384-4acc-aeab-82e828f3628b)[0: ]
        /USBClass(0,0,9,0,0)/USBClass(424,9514,9,0,2)/MacAddr(b8:27:eb:e1:81:47,1)
        /EndEntire
    
    While at it, we also mark the non-DM MAC node as ethernet.
    
    Fixes: b66c60dd ("efi_loader: add device-path utils")
    Signed-off-by: default avatarAlexander Graf <agraf@suse.de>