Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp958042img; Thu, 28 Feb 2019 10:33:01 -0800 (PST) X-Google-Smtp-Source: APXvYqyz53cP0AMweYI7SE8EzsrnHbeL06DYMdFXtWs/bUmFneJVjFCWfhPrGuhQeTsXtyU7DA9q X-Received: by 2002:a17:902:7b8c:: with SMTP id w12mr740023pll.207.1551378781722; Thu, 28 Feb 2019 10:33:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551378781; cv=none; d=google.com; s=arc-20160816; b=Muh8Jd3HX57Pe/jlk+dEF5gSHlrTcoxOEPxmSXlW+tVo/G9Hhdj7fLuzJgunHvhLkn dNC7yzAuDUYBoOh4zU8tx6Ub74xIZOEwGnB2eIvg+qKhB+x7fcoOCXH5z35ZflNc7GWb vzTBxMAnTLycjVAnlr/Yf3ZvlNp2isMvCO+BE9QgSiauskFuUuycNq6Yl5jxLb5I2DFk Qk7f8Wes22de80J8VDvtxbfH2t/UGR/QU4jsXfrebv+0KA+4TOZXLJZZrUgfEn5L8yvq Yi5XUQpauGNSJ/XUsiDK6lODE5kGs23kNqPFP0iGIej6h9Qhe8rQCnzkfQPwoe5mHNE4 7JDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=+anElq0d8yoLGeY+UyXO/p8UFcJ7qxV5jUGgc6X3bDM=; b=il9mK39EgPokg7GhAxemq4tRBaAx2OcWeDFM3N8M2bPWEo27twc+yUXWDj7mOOt/OQ jo+/aniqRUYaqbphgN78mlkwUMIz+i63qlL8jVehuy5kmwWv7lLwk5arKAJX8Uj9yo+S WQ69Ph+mHWK85U4e3Z6nS7C2+P8izaK4BU6c91sdMr49nEBp71hUMxN+iQENGmQPQV/R Au8GPBphJX6/TpGDk78q3z151J/7bYqwpisq068wsSRQTN0RzN5gz2GPLQaTNzCJlXg5 9TOymBzGsKRQG+8U+3NWHi1rGlvpKo4Wz0I1eJ/K8TVZxT/b1ZuAKUBjE1pq3sLdIHbS Emww== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v3si18310536pff.158.2019.02.28.10.32.46; Thu, 28 Feb 2019 10:33:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387732AbfB1RNf convert rfc822-to-8bit (ORCPT + 99 others); Thu, 28 Feb 2019 12:13:35 -0500 Received: from smtp.asem.it ([151.1.184.197]:54367 "EHLO smtp.asem.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387689AbfB1RNc (ORCPT ); Thu, 28 Feb 2019 12:13:32 -0500 Received: from webmail.asem.it by asem.it (smtp.asem.it) (SecurityGateway 5.5.0) with ESMTP id SG003723839.MSG for ; Thu, 28 Feb 2019 18:13:28 +0100S Received: from ASAS044.asem.intra (172.16.16.44) by ASAS044.asem.intra (172.16.16.44) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Thu, 28 Feb 2019 18:13:27 +0100 Received: from ASAS044.asem.intra ([::1]) by ASAS044.asem.intra ([::1]) with mapi id 15.01.1261.035; Thu, 28 Feb 2019 18:13:27 +0100 From: Flavio Suligoi To: Andrew Lunn CC: Jeff Kirsher , "David S . Miller" , "intel-wired-lan@lists.osuosl.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH v3] net: e1000e: add MAC address kernel cmd line parameter Thread-Topic: [PATCH v3] net: e1000e: add MAC address kernel cmd line parameter Thread-Index: AQHUz2za8U5Pv4cZVkOebP6EQ2CVPqX1RhaAgAAUBLD///4SgIAAFXBw Date: Thu, 28 Feb 2019 17:13:27 +0000 Message-ID: <6a7a37813e71420b929c769dd1e77664@asem.it> References: <1551361135-404-1-git-send-email-f.suligoi@asem.it> <1551361951-1595-1-git-send-email-f.suligoi@asem.it> <20190228153245.GA17912@lunn.ch> <20190228163729.GB17912@lunn.ch> In-Reply-To: <20190228163729.GB17912@lunn.ch> Accept-Language: it-IT, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.16.17.161] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-SGHeloLookup-Result: pass smtp.helo=webmail.asem.it (ip=172.16.16.44) X-SGSPF-Result: none (smtp.asem.it) X-SGOP-RefID: str=0001.0A0B020E.5C7816B8.0036,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0 (_st=1 _vt=0 _iwf=0) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > Hi Andrew, > > > > we produce a lot of boards and we have to change the MAC address, > > from u-boot, for every board. So I must save in the u-boot > > environment (SPI NOR flash) the MAC address for every board. > > Hi Flavio > > u-boot should be able to write the MAC address in the correct part of > device tree. Boards have been doing this a long time. > > Module parameters are considered bad. You should only do it if you > have no other option. Here you do have another options, so it is going > to be a hard sell getting David to access your patch. > > You will have more success by adding a call to > eth_platform_get_mac_address() to the e1000e driver. You have right, and thanks for your suggestions, but with a kernel parameter I can use the same method for any board where the NVM is missed, independently of any architecture (with or without the device tree presence - ARM or x86 or others). In fact slso the drivers/net/ethernet/freescale/fec_main.c provides a kernel parameter for the MAC address, in fec_get_mac: /* * try to get mac address in following order: * * 1) module parameter via kernel command line in form * fec.macaddr=0x00,0x04,0x9f,0x01,0x30,0xe0 */ iap = macaddr; Thanks, Flavio > Andrew