From nobody Sat Apr 27 17:08:52 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+44066+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+44066+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1563558421; cv=none; d=zoho.com; s=zohoarc; b=dxqyX5ya0lOSnJMNuwBo5UT9TJX0X9Wl49+dvRDhOHp1vSeBrLEU5DEOE5nos9XIzUzy8ib1KSdfzh//YMOpSVylr2OLHUEAmSEsKQVKi/FJaHBNqFg3YzEXL3ZHDq9pBqrdsyUfd4339KHqPh0KEpfOZ7HVPN9QcsDLnAKhjD0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1563558421; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=/A87F9EmVErHl9Xwmm8jkmYamBsRPuFq0FAR0wHr/gA=; b=mi7b71LcZzH10sFU5iHx6ahbZ+rUEZKdKR9NW3qaB4x4t7vz2BeHED0ylgwFcsTzasIGi+TgaYmVSX9R7M5ay4ZAFYtlVxgDHdm6ahOa5ySImXKNgNsR0vo8ccPNiUpr5KavwWtIlX2mE+v6xlqgSAiI/TK70TEk4/qyDJUaoYQ= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+44066+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 156355842092335.91506358653726; Fri, 19 Jul 2019 10:47:00 -0700 (PDT) Return-Path: X-Received: from duck.fensystems.co.uk (duck.fensystems.co.uk [212.13.204.60]) by groups.io with SMTP; Fri, 19 Jul 2019 10:29:39 -0700 X-Received: from pudding.home (unknown [IPv6:2001:470:1dbe:1:ffff::c5f1]) by duck.fensystems.co.uk (Postfix) with ESMTPSA id 1BC2B159FE; Fri, 19 Jul 2019 18:29:37 +0100 (BST) From: Michael Brown To: devel@edk2.groups.io Cc: ard.biesheuvel@linaro.org, leif.lindholm@linaro.org, pete@akeo.ie, Michael Brown Subject: [edk2-devel] [edk2-platforms: PATCH 1/1] Platform/RPi3: Accept "ethernet" or "ethernet0" aliases in device tree Date: Fri, 19 Jul 2019 18:29:07 +0100 Message-Id: <20190719172907.788170-2-mbrown@fensystems.co.uk> In-Reply-To: <20190719172907.788170-1-mbrown@fensystems.co.uk> References: <20190719172907.788170-1-mbrown@fensystems.co.uk> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,mbrown@fensystems.co.uk Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1563558420; bh=lyQ/rLAeuV8gGwUgYbThhHz9fVtKtND+r5t01mfzy0Y=; h=Cc:Date:From:Reply-To:Subject:To; b=Zo5mnR0bLt7vPHnGtapBHpa0Stj/PWXEjn3Mt9AtLh1zZjrioqMXalF6/mZgWaGxD2A 1/SG/FUjdK5SLDWjuThQKvCg/tHeUDDnJgUt00hslOHznQltYkBiuc4JDmLa2mcfEL2TW lLHJ7UiXHYHldVQqGkDQMfqfRUaBcotODCY= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Older device trees tend to use the alias "ethernet". Newer device trees tend to use "ethernet0" since older versions of U-Boot would skip aliases that do not include an index number. See, for example, Linux kernel commit 10b6c0c ("ARM: dts: bcm2835: add index to the ethernet alias") and U-Boot commit f8e57c6 ("fdt_support: Fixup 'ethernet' aliases not ending in digits"). Accept either "ethernet" or "ethernet0" as being the alias to the node for which the MAC address should be updated. Signed-off-by: Michael Brown --- Platform/RaspberryPi/RPi3/Drivers/FdtDxe/FdtDxe.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Platform/RaspberryPi/RPi3/Drivers/FdtDxe/FdtDxe.c b/Platform/R= aspberryPi/RPi3/Drivers/FdtDxe/FdtDxe.c index 83446e3e45..e80bc2c391 100644 --- a/Platform/RaspberryPi/RPi3/Drivers/FdtDxe/FdtDxe.c +++ b/Platform/RaspberryPi/RPi3/Drivers/FdtDxe/FdtDxe.c @@ -35,11 +35,14 @@ UpdateMacAddress ( UINT8 MacAddress[6]; =20 // - // Locate the node that the 'ethernet' alias refers to + // Locate the node that the 'ethernet[0]' alias refers to // Node =3D fdt_path_offset (mFdtImage, "ethernet"); if (Node < 0) { - DEBUG ((DEBUG_ERROR, "%a: failed to locate 'ethernet' alias\n", __FUNC= TION__)); + Node =3D fdt_path_offset (mFdtImage, "ethernet0"); + } + if (Node < 0) { + DEBUG ((DEBUG_ERROR, "%a: failed to locate 'ethernet[0]' alias\n", __F= UNCTION__)); return; } =20 --=20 2.20.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#44066): https://edk2.groups.io/g/devel/message/44066 Mute This Topic: https://groups.io/mt/32529756/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-