Message ID | 20231026051051.2316937-1-o.rempel@pengutronix.de |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:d641:0:b0:403:3b70:6f57 with SMTP id cy1csp434403vqb; Wed, 25 Oct 2023 22:11:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFdehdCPH+b1XTRfgT2nw8TxYBha9un8a4qlnH4wiaszm3tueGOConNYWy8xb8kf9hzfHXe X-Received: by 2002:a81:5250:0:b0:5a7:c641:4fd2 with SMTP id g77-20020a815250000000b005a7c6414fd2mr17347694ywb.10.1698297086848; Wed, 25 Oct 2023 22:11:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698297086; cv=none; d=google.com; s=arc-20160816; b=Luk8bTGHs7J7uUejpPL4veEdrY8Tu3R91F6p0ZusToVmEVQdQYbmfw2C9Q0sWxqzUk D5FInrmleao7BOI1iUip/Q2ssAFhVP5iZSeBvyJScUIdP43wnwQN1dSAKqOrgREf4qio cJH0xjI+90sdKYRraQ9E2AN55PePtOzj5fRpMYUwzej4BXzYLvugFk1ckxOi3x+ug7TK KG2MTu2QBTxIUqfyonmqAaEsCPpKoCKEvsFyzY2wJFCtxgmKc1VHlf+1zZK0PO3z1a/u A3yCw+cBBjodiQcDfC9L07p39AVf9uKYJ5RYXvYZ60P985+82kI2zmTtWzf7PZL7CPla CIDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=FrQK+A7V+mtOh5hexrWSvRASCMJtj1t9MLKMrVI8SyQ=; fh=J4gjwt0mePoRaYCjaHLm28JnUFi5LyPM6ZZbSRFLAL0=; b=lvQPe102rtdUOY8u9AcoNPz64A6rYQzXOA15mxXlCAi7xPRKi/5yfewIeuDKJGOuTZ ++g47aRfweI/Z1C3fZJO6iFRZFOGkjNcBgb4we84Ny4Py6gilNwVOg6+6HiyfPWh6Q8t Ay02aU7kl64ZVGkzxgYGrvUcBFHXTg1bk0dY4bawtojnK+lQghikgVUsJaErExfJWRaB NHZhto6xfVeY3/DNygP/aySvoi+BjVrZOc3BrSolYcFvOKZAWVJMob3G/wNXWb7QZFbF i9BJUGtVdyZyFWD7Xu+uLaAJ0suJa+RGIpPgFgUPnAD4/bj0Er93udFM+Vko8o/oxE1Q RUug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id f184-20020a0dc3c1000000b005a83af25d58si14040561ywd.359.2023.10.25.22.11.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 22:11:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 9CE8281BDF08; Wed, 25 Oct 2023 22:11:25 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233125AbjJZFLW (ORCPT <rfc822;aposhian.dev@gmail.com> + 26 others); Thu, 26 Oct 2023 01:11:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229554AbjJZFLV (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 26 Oct 2023 01:11:21 -0400 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [IPv6:2a0a:edc0:2:b01:1d::104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3A9093 for <linux-kernel@vger.kernel.org>; Wed, 25 Oct 2023 22:11:16 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <ore@pengutronix.de>) id 1qvsdx-0004Y7-VD; Thu, 26 Oct 2023 07:10:53 +0200 Received: from [2a0a:edc0:0:1101:1d::ac] (helo=dude04.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from <ore@pengutronix.de>) id 1qvsdw-004L1P-KV; Thu, 26 Oct 2023 07:10:52 +0200 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from <ore@pengutronix.de>) id 1qvsdw-009ikT-1p; Thu, 26 Oct 2023 07:10:52 +0200 From: Oleksij Rempel <o.rempel@pengutronix.de> To: "David S. Miller" <davem@davemloft.net>, Andrew Lunn <andrew@lunn.ch>, Eric Dumazet <edumazet@google.com>, Florian Fainelli <f.fainelli@gmail.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Vladimir Oltean <olteanv@gmail.com>, Woojung Huh <woojung.huh@microchip.com>, Arun Ramadoss <arun.ramadoss@microchip.com>, Conor Dooley <conor+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Rob Herring <robh+dt@kernel.org> Cc: Oleksij Rempel <o.rempel@pengutronix.de>, kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, UNGLinuxDriver@microchip.com, "Russell King (Oracle)" <linux@armlinux.org.uk>, devicetree@vger.kernel.org Subject: [PATCH net-next v8 0/5] net: dsa: microchip: provide Wake on LAN support (part 2) Date: Thu, 26 Oct 2023 07:10:46 +0200 Message-Id: <20231026051051.2316937-1-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 25 Oct 2023 22:11:25 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780793566032884565 X-GMAIL-MSGID: 1780793566032884565 |
Series |
net: dsa: microchip: provide Wake on LAN support (part 2)
|
|
Message
Oleksij Rempel
Oct. 26, 2023, 5:10 a.m. UTC
This patch series introduces extensive Wake on LAN (WoL) support for the Microchip KSZ9477 family of switches, coupled with some code refactoring and error handling enhancements. The principal aim is to enable and manage Wake on Magic Packet and other PHY event triggers for waking up the system, whilst ensuring that the switch isn't reset during a shutdown if WoL is active. The Wake on LAN functionality is optional and is particularly beneficial if the PME pins are connected to the SoC as a wake source or to a PMIC that can enable or wake the SoC. changes v8: - rebase on top of net-next and s/slave/user/ changes v7: - move wakeup-source after reset-gpios - update "Wake event on port.." debug message - add and use ksz_is_port_mac_global_usable() instead of ksz_switch_macaddr_get/put. changes v6: - add variables magic_switched_off and magic_switched_on for readability - EXPORT_SYMBOL(ksz_switch_shutdown); to fix build as module changes v5: - rework Wake on Magic Packet support. - Make sure we show more or less realistic information on get_wol by comparing refcounted mac address against the ports address - fix mac address refcounting on set_wol() - rework shutdown sequence by to handle PMIC related issues. Make sure PME pin is net frequently toggled. - use wakeup_source variable instead of reading PME pin register. changes v4: - add ksz_switch_shutdown() and do not skip dsa_switch_shutdown() and etc. - try to configure MAC address on WAKE_MAGIC. If not possible, prevent WAKE_MAGIC configuration - use ksz_switch_macaddr_get() for WAKE_MAGIC. - prevent ksz_port_set_mac_address if WAKE_MAGIC is active - do some more refactoring and patch reordering changes v3: - use ethernet address of DSA master instead from devicetree - use dev_ops->wol* instead of list of supported switch - don't shutdown the switch if WoL is enabled - rework on top of latest HSR changes changes v2: - rebase against latest next Oleksij Rempel (5): net: dsa: microchip: ksz9477: Add Wake on Magic Packet support net: dsa: microchip: Refactor comment for ksz_switch_macaddr_get() function net: dsa: microchip: Add error handling for ksz_switch_macaddr_get() net: dsa: microchip: Refactor switch shutdown routine for WoL preparation net: dsa: microchip: Ensure Stable PME Pin State for Wake-on-LAN drivers/net/dsa/microchip/ksz9477.c | 103 ++++++++++++++++++++++- drivers/net/dsa/microchip/ksz9477.h | 1 + drivers/net/dsa/microchip/ksz9477_i2c.c | 5 +- drivers/net/dsa/microchip/ksz_common.c | 104 +++++++++++++++++++++--- drivers/net/dsa/microchip/ksz_common.h | 6 ++ drivers/net/dsa/microchip/ksz_spi.c | 5 +- 6 files changed, 200 insertions(+), 24 deletions(-)
Comments
On Thu, Oct 26, 2023 at 07:10:46AM +0200, Oleksij Rempel wrote: > This patch series introduces extensive Wake on LAN (WoL) support for the > Microchip KSZ9477 family of switches, coupled with some code refactoring > and error handling enhancements. The principal aim is to enable and > manage Wake on Magic Packet and other PHY event triggers for waking up > the system, whilst ensuring that the switch isn't reset during a > shutdown if WoL is active. > > The Wake on LAN functionality is optional and is particularly beneficial > if the PME pins are connected to the SoC as a wake source or to a PMIC > that can enable or wake the SoC. > > changes v8: > - rebase on top of net-next and s/slave/user/ I am stunned by what happened here. The timeline seems to be: - On the 23rd of October, you sent a 9-patch series constituting v7. - On the 25th of October, 4 of those patches were silently merged, as follows: 93aa731e6133 Merge branch 'dsa-microchip-WoL-support' d264f24409b8 net: dsa: microchip: ksz9477: add Wake on LAN support aed7425d6510 net: dsa: microchip: use wakeup-source DT property to enable PME output 4e1799ae84fc dt-bindings: net: dsa: microchip: add wakeup-source property 02e987f52cf0 net: dsa: microchip: Add missing MAC address register offset for ksz8863 commit 93aa731e613399f5145166940b20224a8d116920 Merge: e43e6d9582e0 d264f24409b8 Author: David S. Miller <davem@davemloft.net> Date: Wed Oct 25 08:47:33 2023 +0100 Merge branch 'dsa-microchip-WoL-support' with no further details as usual (cover letter becomes merge commit message), no patchwork bot notification, nothing. - Today you are sending the rest of 5 unmerged patches. - In parallel, Colin Ian King has sent a fixup for a review comment on the first 4 patches from v7, which got silently applied without that comment being addressed. So, given the circumstances, I see that you did the right thing. It's just that I'm starting to understand less and less of what the rules are supposed to be.
Hello: This series was applied to netdev/net-next.git (main) by Jakub Kicinski <kuba@kernel.org>: On Thu, 26 Oct 2023 07:10:46 +0200 you wrote: > This patch series introduces extensive Wake on LAN (WoL) support for the > Microchip KSZ9477 family of switches, coupled with some code refactoring > and error handling enhancements. The principal aim is to enable and > manage Wake on Magic Packet and other PHY event triggers for waking up > the system, whilst ensuring that the switch isn't reset during a > shutdown if WoL is active. > > [...] Here is the summary with links: - [net-next,v8,1/5] net: dsa: microchip: ksz9477: Add Wake on Magic Packet support https://git.kernel.org/netdev/net-next/c/3b454b6390c3 - [net-next,v8,2/5] net: dsa: microchip: Refactor comment for ksz_switch_macaddr_get() function https://git.kernel.org/netdev/net-next/c/78c21fca0b39 - [net-next,v8,3/5] net: dsa: microchip: Add error handling for ksz_switch_macaddr_get() https://git.kernel.org/netdev/net-next/c/818cdb0f4b38 - [net-next,v8,4/5] net: dsa: microchip: Refactor switch shutdown routine for WoL preparation https://git.kernel.org/netdev/net-next/c/77c819cb493a - [net-next,v8,5/5] net: dsa: microchip: Ensure Stable PME Pin State for Wake-on-LAN https://git.kernel.org/netdev/net-next/c/8afb91acc4a3 You are awesome, thank you!