From patchwork Thu Apr 30 20:31:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Schiffer X-Patchwork-Id: 466720 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id DC2A2140310 for ; Fri, 1 May 2015 06:33:17 +1000 (AEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 7970E28AE03; Thu, 30 Apr 2015 22:31:27 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 9FDC128A60C for ; Thu, 30 Apr 2015 22:31:10 +0200 (CEST) X-policyd-weight: using cached result; rate: -7.6 Received: from chaos.universe-factory.net (chaos.universe-factory.net [37.72.148.22]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Thu, 30 Apr 2015 22:31:07 +0200 (CEST) Received: from avalon.neoraider.dn42 (unknown [82.139.197.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by chaos.universe-factory.net (Postfix) with ESMTPSA id D9B5718965E for ; Thu, 30 Apr 2015 22:32:12 +0200 (CEST) From: Matthias Schiffer To: openwrt-devel@lists.openwrt.org Date: Thu, 30 Apr 2015 22:31:43 +0200 Message-Id: <23e692f05c1470500696ba6eab78837cab90ceec.1430425904.git.mschiffer@universe-factory.net> X-Mailer: git-send-email 2.3.7 In-Reply-To: References: In-Reply-To: References: Subject: [OpenWrt-Devel] [PATCH v2 3/4] mpc85xx: gianfar: add mtd-mac-address support X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" Signed-off-by: Matthias Schiffer --- .../101-net-gianfar-use-mtd-mac-address.patch | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 target/linux/mpc85xx/patches-3.18/101-net-gianfar-use-mtd-mac-address.patch diff --git a/target/linux/mpc85xx/patches-3.18/101-net-gianfar-use-mtd-mac-address.patch b/target/linux/mpc85xx/patches-3.18/101-net-gianfar-use-mtd-mac-address.patch new file mode 100644 index 0000000..1b7abc8 --- /dev/null +++ b/target/linux/mpc85xx/patches-3.18/101-net-gianfar-use-mtd-mac-address.patch @@ -0,0 +1,19 @@ +--- a/drivers/net/ethernet/freescale/gianfar.c ++++ b/drivers/net/ethernet/freescale/gianfar.c +@@ -858,10 +858,13 @@ static int gfar_of_init(struct platform_ + if (stash_len || stash_idx) + priv->device_flags |= FSL_GIANFAR_DEV_HAS_BUF_STASHING; + +- mac_addr = of_get_mac_address(np); ++ err = of_get_mac_address_mtd(np, dev->dev_addr); ++ if (err) { ++ mac_addr = of_get_mac_address(np); + +- if (mac_addr) +- memcpy(dev->dev_addr, mac_addr, ETH_ALEN); ++ if (mac_addr) ++ memcpy(dev->dev_addr, mac_addr, ETH_ALEN); ++ } + + if (model && !strcasecmp(model, "TSEC")) + priv->device_flags |= FSL_GIANFAR_DEV_HAS_GIGABIT |