Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751620AbdFFPBM (ORCPT ); Tue, 6 Jun 2017 11:01:12 -0400 Received: from mail-sn1nam01on0044.outbound.protection.outlook.com ([104.47.32.44]:48685 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751589AbdFFPBH (ORCPT ); Tue, 6 Jun 2017 11:01:07 -0400 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; From: Ioana Radulescu To: CC: , , , , , , , , Subject: [PATCH 17/18] staging: fsl-dpaa2/eth: Refactor MAC address setup Date: Tue, 6 Jun 2017 10:00:40 -0500 Message-ID: <20170606150041.10955-18-ruxandra.radulescu@nxp.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170606150041.10955-1-ruxandra.radulescu@nxp.com> References: <20170606150041.10955-1-ruxandra.radulescu@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131412348453879262;(91ab9b29-cfa4-454e-5278-08d120cd25b8);() X-Forefront-Antispam-Report: CIP:192.88.168.50;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(336005)(39860400002)(39450400003)(39850400002)(39840400002)(39410400002)(39380400002)(39400400002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(9170700003)(2950100002)(2906002)(77096006)(6916009)(54906002)(4326008)(53936002)(38730400002)(110136004)(47776003)(50986999)(76176999)(189998001)(6666003)(39060400002)(85426001)(8656002)(86362001)(33646002)(50466002)(81166006)(8676002)(8936002)(50226002)(36756003)(104016004)(498600001)(5003940100001)(7416002)(5660300001)(305945005)(48376002)(1076002)(356003)(2351001)(106466001)(105606002);DIR:OUT;SFP:1101;SCL:1;SRVR:BL2PR03MB163;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;MLV:ovrnspm;MX:1;A:1;PTR:InfoDomainNonexistent;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BL2FFO11FD037;1:KOAcG/5VlvVEePgEAjc9BToRqkupKJS1Ytx1j2AuWiSzS1F4726lojgrxL37uWNGbN9/HYoRftqJ+ocGEIWnp67P4EQhOPwnA/QORdLhylCp21FJVQi93WRFY8jqHyGHjjCXigaEC+/sQhueK/y7EKNYETbwczD/Wz2hVBhE2/Iy+4MBFfYyVQhWcGzqjjTXBGj/zLu8/jSgi7dBKqslo5dltSSAeTkfV12yLAJE/W874HiGRL09q5NzqeQLCCwqHtXmAOUn+PdjdHPpf98VdvvVYctkz3cGmSVmXfFIu+uFmruCYr/1aCAxj6SldM5GOKKmhGi+oyTqK5Eqw5pkEK0SFAb5Fvz9xdi27L9waP/PRD6Wl7H+l1VaeF0xkigcyv5E00QrJfpqV5h8Pc8BJc33n46wrJXcfy8Xp/scApNpNkDe1XjCrijFJsj2OgZYRv+EVj82bFgeNnXgrslExY2xxM/kRug3EbRzzpnL0KTbDf3J2U57aiF+NTgCyLFaJR4cov6H/G9uAObM/DUrd7mCt7v2M9PGt4p1SNwD+SCXmiVDEOfmNWoQm53QqHYV8Z8bc0F3S2A5RnwbKuPE3okcywh/zgCnghpBV+pZArbcJBi/GfGhhTvljP2kWoYL695UXIlnR37DuCg750F1K/wxWAHD5CB6ke5WNYPUPKYCSg3ZUmFTRBvJvOxSEwox MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL2PR03MB163: X-MS-Office365-Filtering-Correlation-Id: a986975e-03ce-4d63-1c7d-08d4aceccf26 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(201703131430075)(201703131517081);SRVR:BL2PR03MB163; X-Microsoft-Exchange-Diagnostics: 1;BL2PR03MB163;3:z5g9iNRNgEvikI6/TmEca2X9EuSqCMou6JxCRSlEouZgvOnHAdsCPTUhxDNsJ1TbbWJiXvyah/mbb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4KFbdLmUTWwz+laYbArKpfm17TRMfWke8zSr345kTd5n05D3JmzhGwHQ4IEGdjMz X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(601004)(2401047)(8121501046)(5005006)(13018025)(13016025)(10201501046)(3002001)(100000703101)(100105400095)(93006095)(93001095)(6055026)(6096035)(20161123563025)(20161123559100)(20161123561025)(201703131430075)(201703131441075)(201703131448075)(201703131433075)(201703161259150)(20161123565025)(20161123556025)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:BL2PR03MB163;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:BL2PR03MB163; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BL2PR03MB163;4:KZ6gFnZ/cG27nNF06A2+RV8z0/bzMBJzUdR9Y3r5hgD?= =?us-ascii?Q?ws8MG0e114dvV7VTv/PR5Zw1Z9RzIY2NFiV0Q/VczeJmAe/PR1thqNkfHGrz?= =?us-ascii?Q?FfW3ye7l13HEZof48tPWH1XR+3tPYzVUsbsMrwiTyKZVWB24r5+C4xvKkM/D?= =?us-ascii?Q?Z/xrP++VJ9wutffuq+WCZo/YEkFmBhuiRCl1qSnTmvMScrzdZqGZXT6JCLc+?= =?us-ascii?Q?3qDP8Gq39Lr7E85PTcp0160CvfMFwgffsrvRbx+FgQwF2aTpLUyDQFxM/DoQ?= =?us-ascii?Q?nKEd0ZNIWQzm2T6J1qcz02R81mf0RhnXIemp7TV16M9q1wYEB41wVEOqfpFJ?= =?us-ascii?Q?y5q5F0NAPVP31YoJsQduXDDtpmVmsf1cEjs+/HIowk0yi8+zoFL2+l+jpqDL?= =?us-ascii?Q?orDnd86HLIobtl+hrTkNbDxQuz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033054F29A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BL2PR03MB163;23:fX0jOoMPpRUjTfMuv29BPXOXl85xDCHNRMB2b3RFG8?= =?us-ascii?Q?qyzTtVhqSSkLnHqznQDp2BCc38YueOX7NgkpibHyC2P8bZBc7v3e6aTp8TL0?= =?us-ascii?Q?9bIecB8RI+MZFXLu77ahEjwLNs/Osm91Oeaxyj2xbNAeA/ycEv8uILI+HHK2?= =?us-ascii?Q?n4T3bKfmF0cJgFap0p+Thu0bMd4hV2Wty9zbHArR3JESN3ERSrPr/Yi853G7?= =?us-ascii?Q?Lrv66zi50UPd12wWUByj97NkqabdGj2w9zdT4Ca+40luQzppjwjhANGi5O3t?= =?us-ascii?Q?Omn6uGAoambK0N1mRM4X/bb8/aE7K4xs9+mrjDPf9vdjvYJPBeFVVgZ4aLW+?= =?us-ascii?Q?n/v6rvt1on/93KNYcsd0STp1jN7mDbl7lPnclOJFu3IUbSk1HLUbwaa+4rXu?= =?us-ascii?Q?dLEehgkqse41W6uhzIT8qRf199ZL0ZE/FT3O4JW2KGQsfQSs5u+MkhpEh3FU?= =?us-ascii?Q?VjVhdQQCBkG6+E8IrbZg4L9CsxWwpL34Edo+dWkj80PBshqIUOdr0aPdzRWP?= =?us-ascii?Q?mcFA1+SFAp4ZQDGLRhg8Yt7XF9qxYb8x1JsPyygcmHdq5jF9dAtSfNum7kpH?= =?us-ascii?Q?0ca00IeCLjBE2XZBS6ySn2IXIzyrAqWj7tQknSnEsrFwfgAB8FuuFvuyeb+g?= =?us-ascii?Q?0tb9noSKFsF/xWDKqW+bUa4nZbfBPMfUJlOnBuMv+LQDaZA0KriynlWGwRXc?= =?us-ascii?Q?qwahDNZmlaHXbYugOVvOBWCOLAdJZj9SguAlwNbyHIrNlvoMcT47z2wW7O0X?= =?us-ascii?Q?Kb9iqkTxef0oScj71Q9qq2XseVvvyNQh4SPUJOJWUuAboMh2Jt7AEUCoktJz?= =?us-ascii?Q?Gae+dPlxUoHeiX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qfqqAkFJF0g5vAQuPquzAo1jix1+/faeruCBKx8P3AtLT64WGedMizgBNEdGRUEObFDMF X-Microsoft-Exchange-Diagnostics: 1;BL2PR03MB163;5:GP49LwiRIx0E+Afn3xp0BmPG0Ta4WkTZX3vS/K6ilUesU5GE5Mgxwg13d1DvOwEu97H1kEmxa6HQpcB54npby4mInFrUDANvqzKcm7DInZFrbSf0axs3OmxIws0FpN0P+gU/TKpiqQTqz519aUGMg8gt1NIpZ1YEDeiqtb3fFp8lLxPrgq8pRTH77z1xTinLmA0iC+LsnNQZV90tQ/OtkOWCfUlXWekDdI+OiAB0sIQnKITl7f1bKg4OMmGKYUF2MYKcAfPu+XRu3jZTEtOE9XMSiiZowxwGj32Lj5JK10FhBmH/cmr0I/iosOcxXIVtQCp+IpDU0kNAHjjtNWY6EuUmfjX0jbba1gAsULSNr2FAJodT4IcfUZRFMwzvN0/P9DX+KLl5NG5tqECVtzyY1uqQtO2cONrxobIdoMvdXYiak6WTvnd4AkxJNyPJ7GdnxslZY/h8+YtnBvzjA7cO6oGEcDIT5njttYfSU6l/wW0vYdICGuIGJyWHRqrrVAt214yGvB3olKkA7HkuqsN3vg==;24:5XuaE6Hg6kB5rBxXASdrQO/6xjVXl3sdPH2Muks+TbctHghIudlesXTEBcZnjQ7SPbu7wgPPJqB45bMjrIq9IibjqPg6KQldwZhae/cIlZ8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BL2PR03MB163;7:Bo2yOUQ6DVf64iZs0hkmlWncVsp/mNtLjxpJ79IRauyhQX3ARymCqIQVT81R1SGZC0oFmDjzzUYc2QvtVPpDbQ1EyaOSsCBwhIY6fB8bYCM9BW2CvOUbljNxUs0L7Gcv0Hwit7r1LG0GebYOipBuC1y9uUWeT4TkScMINu3IWwBhdKwQxvhzzRJjBoOHBfWt3dcx77JXUZ4Y6yVvlKnDb6EyV0X3DIYtSADUnvl/jN+ND8ToCo2L95uhcgQvbkWzSyJCKjGJ5R+M4Opf05IeKSieeK08TKqi+fZAgmLfmT+KHQjWkudPtJHhzWF8zjNACb7ciZojNUm0KtNkb+i6GA== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2017 15:00:45.2163 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;Ip=[192.88.168.50];Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2PR03MB163 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3668 Lines: 102 The driver logic for allocating a MAC address to a net device is complicated enough to deserve a function of its own. While here, cleanup a bit the code comments. Signed-off-by: Ioana Radulescu --- drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 46 ++++++++++++++++---------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c index 7dca8c2e5ff9..3f7f61b9c462 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c @@ -2162,15 +2162,12 @@ static void free_rings(struct dpaa2_eth_priv *priv) dpaa2_io_store_destroy(priv->channel[i]->store); } -static int netdev_init(struct net_device *net_dev) +static int set_mac_addr(struct dpaa2_eth_priv *priv) { - int err; + struct net_device *net_dev = priv->net_dev; struct device *dev = net_dev->dev.parent; - struct dpaa2_eth_priv *priv = netdev_priv(net_dev); u8 mac_addr[ETH_ALEN], dpni_mac_addr[ETH_ALEN]; - u8 bcast_addr[ETH_ALEN]; - - net_dev->netdev_ops = &dpaa2_eth_ops; + int err; /* Get firmware address, if any */ err = dpni_get_port_mac_addr(priv->mc_io, 0, priv->mc_token, mac_addr); @@ -2183,7 +2180,7 @@ static int netdev_init(struct net_device *net_dev) err = dpni_get_primary_mac_addr(priv->mc_io, 0, priv->mc_token, dpni_mac_addr); if (err) { - dev_err(dev, "dpni_get_primary_mac_addr() failed (%d)\n", err); + dev_err(dev, "dpni_get_primary_mac_addr() failed\n"); return err; } @@ -2201,18 +2198,19 @@ static int netdev_init(struct net_device *net_dev) } memcpy(net_dev->dev_addr, mac_addr, net_dev->addr_len); } else if (is_zero_ether_addr(dpni_mac_addr)) { - /* Fills in net_dev->dev_addr, as required by - * register_netdevice() + /* No MAC address configured, fill in net_dev->dev_addr + * with a random one */ eth_hw_addr_random(net_dev); - /* Make the user aware, without cluttering the boot log */ - dev_dbg_once(dev, " device(s) have all-zero hwaddr, replaced with random\n"); + dev_dbg_once(dev, "device(s) have all-zero hwaddr, replaced with random\n"); + err = dpni_set_primary_mac_addr(priv->mc_io, 0, priv->mc_token, net_dev->dev_addr); if (err) { - dev_err(dev, "dpni_set_primary_mac_addr(): %d\n", err); + dev_err(dev, "dpni_set_primary_mac_addr() failed\n"); return err; } + /* Override NET_ADDR_RANDOM set by eth_hw_addr_random(); for all * practical purposes, this will be our "permanent" mac address, * at least until the next reboot. This move will also permit @@ -2226,14 +2224,28 @@ static int netdev_init(struct net_device *net_dev) memcpy(net_dev->dev_addr, dpni_mac_addr, net_dev->addr_len); } - /* Explicitly add the broadcast address to the MAC filtering table; - * the MC won't do that for us. - */ + return 0; +} + +static int netdev_init(struct net_device *net_dev) +{ + struct device *dev = net_dev->dev.parent; + struct dpaa2_eth_priv *priv = netdev_priv(net_dev); + u8 bcast_addr[ETH_ALEN]; + int err; + + net_dev->netdev_ops = &dpaa2_eth_ops; + + err = set_mac_addr(priv); + if (err) + return err; + + /* Explicitly add the broadcast address to the MAC filtering table */ eth_broadcast_addr(bcast_addr); err = dpni_add_mac_addr(priv->mc_io, 0, priv->mc_token, bcast_addr); if (err) { - dev_warn(dev, "dpni_add_mac_addr() failed (%d)\n", err); - /* Won't return an error; at least, we'd have egress traffic */ + dev_err(dev, "dpni_add_mac_addr() failed\n"); + return err; } /* Reserve enough space to align buffer as per hardware requirement; -- 2.11.0