Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp239226pxb; Wed, 3 Nov 2021 03:28:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzatuMEhJsiD6zGARMBnhVmMkBf7kt+J+1apW5pIkFVwB6po/zUU5+4hAojI+q80wQAWrwr X-Received: by 2002:a05:6402:5204:: with SMTP id s4mr24558815edd.113.1635935333907; Wed, 03 Nov 2021 03:28:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1635935333; cv=pass; d=google.com; s=arc-20160816; b=ffcQfl+DZGVlUrOgAVsFZcqifuMmvMYS97HSDR68Q8SM0YKoM9njRLiOk9aonMdOJ3 L3njfGx7QLav1MXpaAULiUjawV1ZnyUydI7n88diVNC9o7xO3RrRVjbuRlWtXnIaX0vx pIKGA0pxLZN5or1kwidFc2fqBZ0eCnoAtLG7g3wm/cWaT0tdZDHY4ftniOgtbTIE8nxL UNH80+EUNN/NhO1t1uXa2IIdv+2bWCKk7BUXSEVkPcKwlx0BWfa0ne6rUi2wNcdIuCnV UERftA1/35qSJCShefwyAiHmotUxA9qv2gQz78UkP2GR83mS6dfNX4gzPTLd07QHz7at qqhA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=+nCUIyDaA5J0R5McDqyPRsJVsSMvGY10LjGoGJOFsVc=; b=OkOASfFVpqksUZwBajrAvLpOxMywU6mgCkUqY9SXJZ6pz4/KQdLz7cdAcT8jfXKq0R sQmidPJAD/ovAUXr0OThkuEGvx2Q7fRSc1P4KzfBtYcw5xF9N49PBfamzEARIaHQezQO SEC8EdGu2GXjT4Pw1ER9bLgs+K7o98ysWD56Atp6EKShzJ8A3uricO0nQtnOfrhpz0H7 ItkhuAnD7yy4BpTTe7A2MmXqbxcTREIY06jY/BOg1o0fOXcMuaSDnSTTGPySLVhzYmgB 616SjHf+B8FbRpZDZAN045KZbv22BF9VmSRiQEfdO2wo4h96C5DGmILaQ7CkOkqVsC7E YpoQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=cVTsYVVn; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v5si2599607edl.230.2021.11.03.03.28.30; Wed, 03 Nov 2021 03:28:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=cVTsYVVn; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231939AbhKCK3F (ORCPT + 99 others); Wed, 3 Nov 2021 06:29:05 -0400 Received: from mail-eopbgr80048.outbound.protection.outlook.com ([40.107.8.48]:18930 "EHLO EUR04-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231623AbhKCK3E (ORCPT ); Wed, 3 Nov 2021 06:29:04 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nNJyyVd1ikrJc65n/piE/J6my0lA7gzDbYpSxbJGfbbFy2xngPDraQmqF7dosdaBE2IfON5WRrAZUthE8WSHY0bpVkmHb1AjH9rslcLl1jeM52tEmgjjcUQLL7BDKfgkwfX8Tpnb2pnvQ4XUPfHazelU7CVp7HbK5b9Qvb7kpYJ8XDEyeXj2Xcejtf/J1GzuvGoVhQ9lKsp/HZSLM4K69xLNaq+NApLkVFYeivDSwG47xnRfclXzs9AFZEmFOQR8oVFaL1Ri4CSa9nCQAhzZ7cHt2pYW95FLd0EDsq9/BRs6g7z+b+zaBIWB93LGdPyIHP5ps/LGu5lqLcjEnyXZdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+nCUIyDaA5J0R5McDqyPRsJVsSMvGY10LjGoGJOFsVc=; b=Lp2A4iuafBCkHsrVtHSj5Oj2ZDQ2wocpY3KAM7SGnnebIIJZTSKofiQXLevnN8a09lM2E+jltEb7ILapS6aG0zEXirM3aqv+fCAWireg62E0a1B0BTJeTwD4QJxlstlAb4CXQ/2Ye6CslzMwW1lV8Z+UD4SKGTSBG0NpeFraNWW0Pqhgm7+3yW4K77Nmy1sZZDiejIG3XE5jheZHa0Y5kBS7H5p/8y6/tjmUGQIJ2OLbastcVKmFisvbS/Cb4Jbd1WbFIsEevhKy1ab+JyIPjSW1OnEqXlyPkk4U9P6jesmX/2bxrNzj0cgIXiqjOuJefKR26BvUpzXu61qIT1kC0Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+nCUIyDaA5J0R5McDqyPRsJVsSMvGY10LjGoGJOFsVc=; b=cVTsYVVn7nK/DbJN+2aPO781zjaBhZJWGL9FHs4mvTJ+ZkPaSoUdqGwcVfKQKc7ANIRA8OQtg/ySOq1KEPLn3KSyAginvyfX0LfFuIEYCbFWyx364Itaq5g41rUAsrszzuq1fVjJDF8033q7UPatal8bAmfF30miQUIOLvlYdY0= Received: from VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) by VI1PR04MB4432.eurprd04.prod.outlook.com (2603:10a6:803:69::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.17; Wed, 3 Nov 2021 10:26:25 +0000 Received: from VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::e157:3280:7bc3:18c4]) by VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::e157:3280:7bc3:18c4%5]) with mapi id 15.20.4649.020; Wed, 3 Nov 2021 10:26:25 +0000 From: Vladimir Oltean To: =?iso-8859-1?Q?Cl=E9ment_L=E9ger?= CC: "David S. Miller" , Jakub Kicinski , Rob Herring , Claudiu Manoil , Alexandre Belloni , "UNGLinuxDriver@microchip.com" , Andrew Lunn , "netdev@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Thomas Petazzoni Subject: Re: [PATCH v2 1/6] net: ocelot: add support to get port mac from device-tree Thread-Topic: [PATCH v2 1/6] net: ocelot: add support to get port mac from device-tree Thread-Index: AQHX0JQL0SfN3NCuTUafOx0abL6ZS6vxmVgA Date: Wed, 3 Nov 2021 10:26:25 +0000 Message-ID: <20211103102624.uujlwyhzq2t572o3@skbuf> References: <20211103091943.3878621-1-clement.leger@bootlin.com> <20211103091943.3878621-2-clement.leger@bootlin.com> In-Reply-To: <20211103091943.3878621-2-clement.leger@bootlin.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 5676875b-2e98-4b82-f2b7-08d99eb463f8 x-ms-traffictypediagnostic: VI1PR04MB4432: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:343; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: GDkLG/ZGCg3QlrpuNS61fsXC6ERnNoByrtfSfaD9sjB7hQGk4S131sIGH/PKCwvmxqWnvBoj9iKp1iU5oYkiL7YgUr7pnYd5zqRUG6qyP8eL19ePdNw79p58wChJQt2s0NxVlixvRBwaBWYJ418hT4whTDla6kf3b3rYfErah0n9FE9wxvFU/8odPy8v3Qw08PM8cMKlx/w4YXJz9IYSji/LnPUxBwwgFdvErlIjMf2TeIfpigJaf0697lmHJSKbx5oRrxSLgkv0t6rzSSc2hJ/GHEqzy6jpF8Z2RGYPcHy4vKmzGw+s6dBj/khRE4veXw1CiCrx3uArXikx8fjHd03PPNBSR9bTj9IGjJkSa1eMByHMdwZoZ/6ATJNoeIhdnos36cHrHwwG7kg3ms+X3DnWDmQd4uhrEB7mqPEdrbXGKt7Ys9CRJH7o+fcV/TKDMTJgzf67amBHvUT39DrVxpo91Qq/iCufjy5XUFSK0X8D7qxv6PaSZGgJkq8tQzJGiAkUNVcIdiR75U1ZLdaWvC7e2GmqVOOnIDW695FLeDgF2MrIN/i87soth8kvjgVQu102Lq8mwZhlyJr+4LN+F9O3BeOBpMJp8kovtaIkMsiVUP4Ak93c3JAg+Ow5p8wjOkFNRvhxDHu3H4EXDQ5dGAJR06F7OR7BnsbUJ+BFZT3RJzOMYQf1cdOKkcdhvdWFLQMBf5JaTCuX0nthA0i76Q== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5136.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(7916004)(4636009)(366004)(4326008)(66574015)(5660300002)(2906002)(508600001)(54906003)(186003)(38070700005)(86362001)(6506007)(9686003)(6486002)(8936002)(1076003)(26005)(6512007)(8676002)(33716001)(7416002)(44832011)(66476007)(91956017)(66556008)(66446008)(6916009)(71200400001)(66946007)(64756008)(76116006)(38100700002)(83380400001)(316002)(122000001);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?wmTKMTsgbEiyDgrqt/Yh3oLIkWBf6RS7K5GGShE/fYqDQtPOsgk0spXwcw?= =?iso-8859-1?Q?1YA6tonlzLIvIYDcl0NKg4ZINUWMN93w93a03yfAbb2oJjtTRLB3xujaMK?= =?iso-8859-1?Q?mxCi4MdhME2W5BqUDpgeoxeA/DDqlBFKYY+ou7akIySm7/0qsRg8/8f54V?= =?iso-8859-1?Q?0nxptz05MZrt5Y75TPUTlAjd/lVNDFMeC+kMcjE4P6LD3FeETEYrLL3UO5?= =?iso-8859-1?Q?a41ClBRpEm1N1QjmAymxsZho0QTD0n26lQLgUwwzE4o0VS4usOW1i+cBs4?= =?iso-8859-1?Q?isdi9CclpXkoQ0MO2GqKU4ktN+wLylOosNj6vTjE64+KVZ1kYY6P4+TCy1?= =?iso-8859-1?Q?vtCOW9s4WAPYaZRKYP2EV2TFml6J+icbSgxfyUWyn/RmeFNZmCdU8MShSQ?= =?iso-8859-1?Q?tiSeviGC3YoZ9/QSAJC9G47yRkvngA9ytioOEZq1yB4WIfEdTBUPWzjmrA?= =?iso-8859-1?Q?w/YveDQcIBxgGAIhK7L60JnensvapHvn5yJR+SFcBEJsby015tIyQeUTd/?= =?iso-8859-1?Q?ik0G/+oeObXVC60BmLAjbR+xCzSJSPU0h2um2AU7yaEbj2J7kESCcbmzUa?= =?iso-8859-1?Q?kpbo7XwvopQwaNCQyF8rIOCOXKTsUdKfNt/W5ECYBs3F9oigCRXAHoNAkf?= =?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MMzYVLsbYSX2LDtgZLSJvnO96F3qu?= =?iso-8859-1?Q?gGp3+SzzoGlD6W9nzbVm3vMu2j/f8+/cMDnRwKLNMmccL28FmkgFfhDQRa?= =?iso-8859-1?Q?SPugE7AJYgiJ/SBWHIQ2YSlTJjJgab7+5ACoYENjGqMCleM+guTjR552VA?= =?iso-8859-1?Q?hNyyv4mVmF3jMu9yqKg=3D?= Content-Type: text/plain; charset="iso-8859-1" Content-ID: <518BF9C9D917C147B10223BD2B86F6C1@eurprd04.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5136.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5676875b-2e98-4b82-f2b7-08d99eb463f8 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Nov 2021 10:26:25.6558 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 8unISCMJojtCDG7tzoCWvtzdACpPz9v3hU3WQPqqMaalwtxJ8vxXmZx4MrWLkvaFXWtjCwqG5R2im+fHo4mtjw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4432 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 03, 2021 at 10:19:38AM +0100, Cl=E9ment L=E9ger wrote: > Add support to get mac from device-tree using of_get_mac_address. >=20 > Signed-off-by: Cl=E9ment L=E9ger > --- Reviewed-by: Vladimir Oltean > drivers/net/ethernet/mscc/ocelot_net.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/net/ethernet/mscc/ocelot_net.c b/drivers/net/etherne= t/mscc/ocelot_net.c > index eaeba60b1bba..d76def435b23 100644 > --- a/drivers/net/ethernet/mscc/ocelot_net.c > +++ b/drivers/net/ethernet/mscc/ocelot_net.c > @@ -1704,7 +1704,10 @@ int ocelot_probe_port(struct ocelot *ocelot, int p= ort, struct regmap *target, > NETIF_F_HW_TC; > dev->features |=3D NETIF_F_HW_VLAN_CTAG_FILTER | NETIF_F_HW_TC; > =20 > - eth_hw_addr_gen(dev, ocelot->base_mac, port); > + err =3D of_get_mac_address(portnp, dev->dev_addr); > + if (err) > + eth_hw_addr_gen(dev, ocelot->base_mac, port); > + > ocelot_mact_learn(ocelot, PGID_CPU, dev->dev_addr, > OCELOT_VLAN_UNAWARE_PVID, ENTRYTYPE_LOCKED); > =20 > --=20 > 2.33.0 >=