[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <mtlhnjzgpaxmtd4lwesga6qlba7vukxuj2mwyc75d7u2ea7fei@4xjuh4pjys4x>
Date: Tue, 30 Jul 2024 10:03:14 +0200
From: Markus Schneider-Pargmann <msp@...libre.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: Marc Kleine-Budde <mkl@...gutronix.de>,
Chandrasekar Ramakrishnan <rcsekar@...sung.com>, Vincent Mailhol <mailhol.vincent@...adoo.fr>,
"David S . Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, Nishanth Menon <nm@...com>,
Vignesh Raghavendra <vigneshr@...com>, Tero Kristo <kristo@...nel.org>,
Martin Hundebøll <martin@...nix.com>, Christophe JAILLET <christophe.jaillet@...adoo.fr>,
Michal Kubiak <michal.kubiak@...el.com>, Vibhore Vardhan <vibhore@...com>,
Kevin Hilman <khilman@...libre.com>, Dhruva Gole <d-gole@...com>, Conor Dooley <conor@...nel.org>,
linux-can@...r.kernel.org, netdev@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v2 2/7] can: m_can: Map WoL to device_set_wakeup_enable
Hi,
On Mon, Jul 29, 2024 at 09:37:56PM GMT, Andrew Lunn wrote:
> > > > +static void m_can_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
> > > > +{
> > > > + struct m_can_classdev *cdev = netdev_priv(dev);
> > > > +
> > > > + wol->supported = device_can_wakeup(cdev->dev) ? WAKE_PHY : 0;
> > > > + wol->wolopts = device_may_wakeup(cdev->dev) ? WAKE_PHY : 0;
> > > > +}
> > >
> > > It is nice to see Ethernet WoL mapped to CAN :-)
> > >
> > > So will any activity on the CAN BUS wake the device? Or does it need
> > > to be addresses to this device?
> >
> > Unless you have a special filtering transceiver, which is the CAN
> > equivalent of a PHY, CAN interfaces usually wake up on the first
> > message on the bus. That message is usually lost.
>
> Thanks for the info. WAKE_PHY does seem the most appropriate then.
>
> Reviewed-by: Andrew Lunn <andrew@...n.ch>
Thank you.
Just to extend on Marc's explanation specifically for m_can:
For this very low power mode 'Partial-IO' the m_can IP is not active.
The m_can pins will trigger a wakeup for any activity. Also as the SoC
needs to do a normal boot, I would guess there are more messages lost
when waking up from Partial-IO. Other low power modes that will be
upstreamed in the future will not need as much time to be able to
receive CAN messages again.
Best
Markus
Powered by blists - more mailing lists