[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y7678lFYTzDFc27j@lunn.ch>
Date: Wed, 11 Jan 2023 14:38:58 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Kurt Kanzenbach <kurt@...utronix.de>
Cc: Florian Fainelli <f.fainelli@...il.com>,
Vladimir Oltean <olteanv@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Richard Cochran <richardcochran@...il.com>,
netdev@...r.kernel.org
Subject: Re: [PATCH net-next] net: dsa: mv88e6xxx: Enable PTP receive for
mv88e6390
On Wed, Jan 11, 2023 at 09:04:17AM +0100, Kurt Kanzenbach wrote:
> The switch receives management traffic such as STP and LLDP. However, PTP
> messages are not received, only transmitted.
>
> Ideally, the switch would trap all PTP messages to the management CPU. This
> particular switch has a PTP block which identifies PTP messages and traps them
> to a dedicated port. There is a register to program this destination. This is
> not used at the moment.
>
> Therefore, program it to the same port as the MGMT traffic is trapped to. This
> allows to receive PTP messages as soon as timestamping is enabled.
>
> In addition, the datasheet mentions that this register is not valid e.g. for
> 6190 variants. So, add a new cpu port method for 6390 which programs the MGTM
> and PTP destination.
The mv88e6190x_ops and ops mv88e6190_ops structure does not have a
ptp_ops member. So these two devices do not support PTP.
I think it would be cleaner to implement setting the PTP MGMT port as
part of the ptp_ops. Maybe add a new op, which is called from
mv88e6xxx_ptp_setup() if set?
Andrew
Powered by blists - more mailing lists