Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp924900rdg; Fri, 13 Oct 2023 05:33:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGUiXpWOuHaPVkI/OK935zh3g1fbd7dKWXfrBqr0aUyHeb4//VweCqtm3NdyALYwlfMjw8G X-Received: by 2002:a05:6808:1513:b0:3ad:ff3e:d25c with SMTP id u19-20020a056808151300b003adff3ed25cmr36013739oiw.53.1697200387374; Fri, 13 Oct 2023 05:33:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697200387; cv=none; d=google.com; s=arc-20160816; b=TpycZQ2NxsfZZ2A2JCxth8NHRKhmDk1wxISxiaMPsMBG69WljDsdDKLK7YQOcqJX2m vKtAaZl93nV9CuEFrjEyQaK5Xjm0NlZs2eP8ecQpUJOJr+kaV+JoZ67NqO6gs2vD//TL es3azOQJkH1KY2z/ZpkPM7OuU1suovSvWnjj5W8yEftFveT1hhUOJZA3i26MrvEjBmdd KrHJy8IraJkWQQ1mrRc3gW4FF46plGUhpxV6Z4IZublSV5iSnQDZPtpU1/eYU4W1vK9W n2JcimcZXdOJTukKFH2L07MwgYI/YzaOB1h88h/gAUZQ3qdXUC4KIjK/IU+9tyon8FKL Us+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=vyT3QmhAn6GJqY6054QmJlw/CJpCAFNbS1sbCVTYiog=; fh=4w3Pqs5x2lCMSSUPACK3dMuO7uUmsmglpPHc5D/SCqY=; b=eaH1b/NgUll1V9YxWUhaSSeTfbCQkb0PcgXntQfPuK296y9aho2ONE6Hpy6R5vX3he MOX5sTxDGkMPhFNlsGOrjY1x7c3tPKc4CnGWwVSUrO2RYRFVYqPSxZUYU+/3mQsFnzMc Cq+z0CmWVzLf66Fc1Ex6z3yCM5gM6y02bPiIjrDH6qAPl++y3lAFFlpsrBQ48APsNfPH iVvh32tfN7VpJZb6nW6NPj6Nrvzo8f27GfTAHWjZvBE/XXtKzdZ8RZXWrY5nM/cLjQW6 WKdn1nLv3dOFe83gXVWzsVJRVxuGrrDO/p4ZJprBRf5t/fa+VJeSzRlsXxLw76SzNAFs PX0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=MarvLHah; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id y9-20020a056a001c8900b00690d25b198dsi16516775pfw.103.2023.10.13.05.33.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 05:33:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=MarvLHah; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 2ADEF8208F0F; Fri, 13 Oct 2023 05:33:05 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231548AbjJMMc4 (ORCPT + 99 others); Fri, 13 Oct 2023 08:32:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231241AbjJMMcz (ORCPT ); Fri, 13 Oct 2023 08:32:55 -0400 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 012FEBD; Fri, 13 Oct 2023 05:32:53 -0700 (PDT) Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-53de8fc1ad8so3563884a12.0; Fri, 13 Oct 2023 05:32:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697200372; x=1697805172; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=vyT3QmhAn6GJqY6054QmJlw/CJpCAFNbS1sbCVTYiog=; b=MarvLHahQ9YWJ+u28/n8ycyPyxiHM/qMIh95s5VomL6QE6vPybGfU+ifE/ARDMK32p aFK19qsbCz+9IYyArpD/wXjbCOLZGGIs1HgARFxouVhgE+immpoPCKrdkpWFahUPsG51 ysi7zbD4OpjWto3fESpHX0ydYAr3Mnnxg6e7DAvCYN2EW3rM04yVwnIavHsNVKNiU0q8 2fi9ISAuJohPQaNh6gqSm6Cn52wLWjXzEMQa4PgYKOKFyC3KEZEu2j/oL/kWPZrbu1v5 O8D+XoVYwINmtTJcd/sZnhlS+4w6lu7t2XJXwjKXqQA71OmJY7aaq4qMg90rTJ5+axK2 i/fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697200372; x=1697805172; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=vyT3QmhAn6GJqY6054QmJlw/CJpCAFNbS1sbCVTYiog=; b=U41J0biBaKZ/Rjxs6Cmaq37F+6mzwOq+vAJ4/tshiO7fuzDKjp2a8f+fq27OE0PR4J 2q9GP+VoC3KmTYIRlNjiMiyA5spMOxw7fS3/fmtPDcUY0PuqihAtb3kyG9KdI3km+8El Oq01wnlDHOaHe8pEzLZl4/j3R4WnMajvdGh4GFY1N7SFDgVfjm5PR9SZQekMIj1ljexN nO0BaijJH90QMb699V/GNP2jZeq5+yNwQP/HxlhVsbHOvxwV7q+ZcClTCqDqXEv9UvxL sZfD/JeJ2YmOJzODAnzKioSktHT/KHheBrEQLyc3wHItJsViFcA2e+RWWInIlh2Fh3Xh +7ZA== X-Gm-Message-State: AOJu0YzPXRskactDMLkrHPwB4lW4kiDi3g5T0YAkMD/3Cjm7W6eZgq+2 ZjdXTVo/jqtZAYzU8tmZnzo= X-Received: by 2002:a05:6402:4023:b0:53d:b2a5:465d with SMTP id d35-20020a056402402300b0053db2a5465dmr8584164eda.9.1697200372305; Fri, 13 Oct 2023 05:32:52 -0700 (PDT) Received: from skbuf ([188.26.57.160]) by smtp.gmail.com with ESMTPSA id b6-20020a056402138600b00536031525e5sm11380109edv.91.2023.10.13.05.32.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 05:32:52 -0700 (PDT) Date: Fri, 13 Oct 2023 15:32:49 +0300 From: Vladimir Oltean To: Oleksij Rempel Cc: "David S. Miller" , Andrew Lunn , Eric Dumazet , Florian Fainelli , Jakub Kicinski , Paolo Abeni , Woojung Huh , Arun Ramadoss , Conor Dooley , Krzysztof Kozlowski , Rob Herring , kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, UNGLinuxDriver@microchip.com, "Russell King (Oracle)" , devicetree@vger.kernel.org Subject: Re: [PATCH net-next v3 2/7] net: dsa: microchip: Set unique MAC at startup for WoL support Message-ID: <20231013123249.bhigwsezy6afb5qt@skbuf> References: <20231013122405.3745475-1-o.rempel@pengutronix.de> <20231013122405.3745475-3-o.rempel@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231013122405.3745475-3-o.rempel@pengutronix.de> X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Fri, 13 Oct 2023 05:33:05 -0700 (PDT) On Fri, Oct 13, 2023 at 02:24:00PM +0200, Oleksij Rempel wrote: > Set a unique global MAC address for each switch on the network at system > startup by syncing the switch's global MAC address with the Ethernet > address of the DSA master interface. This is crucial for supporting > Wake-on-LAN (WoL) functionality, as it requires a unique address for > each switch. > > Although the operation is performed only at system start and won't sync > if the master Ethernet address changes dynamically, it lays the > groundwork for WoL support by ensuring a unique MAC address for each > switch. > > Signed-off-by: Oleksij Rempel > --- Why not take the MAC address of the user port at ksz9477_set_wol() time, and use the existing ksz_switch_macaddr_get() API that was just added so that this use case could work?