From: Florian Fainelli <f.fainelli@gmail.com>
To: netdev@vger.kernel.org
Cc: "Florian Fainelli" <f.fainelli@gmail.com>,
"Doug Berger" <opendmb@gmail.com>,
"Broadcom internal kernel review list"
<bcm-kernel-feedback-list@broadcom.com>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>, "Andrew Lunn" <andrew@lunn.ch>,
"Heiner Kallweit" <hkallweit1@gmail.com>,
"Russell King" <linux@armlinux.org.uk>,
"Marek Behún" <kabel@kernel.org>,
"Peter Geis" <pgwipeout@gmail.com>,
Frank <Frank.Sae@motor-comm.com>,
linux-kernel@vger.kernel.org (open list)
Subject: [PATCH net-next v2 0/3] Support for Wake-on-LAN for Broadcom
Date: Tue, 9 May 2023 15:34:00 -0700 [thread overview]
Message-ID: <20230509223403.1852603-1-f.fainelli@gmail.com> (raw)
This patch series adds support for Wake-on-LAN to the Broadcom PHY
driver. Specifically the BCM54210E/B50212E are capable of supporting
Wake-on-LAN using an external pin typically wired up to a system's GPIO.
These PHY operate a programmable Ethernet MAC destination address
comparator which will fire up an interrupt whenever a match is received.
Because of that, it was necessary to introduce patch #1 which allows the
PHY driver's ->suspend() routine to be called unconditionally. This is
necessary in our case because we need a hook point into the device
suspend/resume flow to enable the wake-up interrupt as late as possible.
Patch #2 adds support for the Broadcom PHY library and driver for
Wake-on-LAN proper with the WAKE_UCAST, WAKE_MCAST, WAKE_BCAST,
WAKE_MAGIC and WAKE_MAGICSECURE. Note that WAKE_FILTER is supportable,
however this will require further discussions and be submitted as a RFC
series later on.
Patch #3 updates the GENET driver to defer to the PHY for Wake-on-LAN if
the PHY supports it, thus allowing the MAC to be powered down to
conserve power.
Changes in v2:
- introduce PHY_ALWAYS_CALL_SUSPEND and only have the Broadcom PHY
driver set this flag to minimize changes to the suspend flow to only
drivers that need it
- corrected possibly uninitialized variable in bcm54xx_set_wakeup_irq
(Simon)
Florian Fainelli (3):
net: phy: Allow drivers to always call into ->suspend()
net: phy: broadcom: Add support for Wake-on-LAN
net: bcmgenet: Add support for PHY-based Wake-on-LAN
.../ethernet/broadcom/genet/bcmgenet_wol.c | 14 ++
drivers/net/phy/bcm-phy-lib.c | 212 ++++++++++++++++++
drivers/net/phy/bcm-phy-lib.h | 5 +
drivers/net/phy/broadcom.c | 126 ++++++++++-
drivers/net/phy/phy_device.c | 5 +-
include/linux/brcmphy.h | 55 +++++
include/linux/phy.h | 4 +
7 files changed, 416 insertions(+), 5 deletions(-)
--
2.34.1
next reply other threads:[~2023-05-09 22:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-09 22:34 Florian Fainelli [this message]
2023-05-09 22:34 ` [PATCH net-next v2 1/3] net: phy: Allow drivers to always call into ->suspend() Florian Fainelli
2023-05-11 10:10 ` Simon Horman
2023-05-11 12:08 ` Andrew Lunn
2023-05-09 22:34 ` [PATCH net-next v2 2/3] net: phy: broadcom: Add support for Wake-on-LAN Florian Fainelli
2023-05-11 10:10 ` Simon Horman
2023-05-11 10:26 ` Paolo Abeni
2023-05-11 16:17 ` Florian Fainelli
2023-05-09 22:34 ` [PATCH net-next v2 3/3] net: bcmgenet: Add support for PHY-based Wake-on-LAN Florian Fainelli
2023-05-11 10:10 ` Simon Horman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230509223403.1852603-1-f.fainelli@gmail.com \
--to=f.fainelli@gmail.com \
--cc=Frank.Sae@motor-comm.com \
--cc=andrew@lunn.ch \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kabel@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=opendmb@gmail.com \
--cc=pabeni@redhat.com \
--cc=pgwipeout@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®