lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b34eff8d-0c14-4085-bff1-f01ff3349637@linux.dev>
Date: Thu, 10 Jul 2025 02:08:39 +0100
From: Vadim Fedorenko <vadim.fedorenko@...ux.dev>
To: Tristram.Ha@...rochip.com, olteanv@...il.com
Cc: Woojung.Huh@...rochip.com, andrew@...n.ch, robh@...nel.org,
 krzk+dt@...nel.org, conor+dt@...nel.org, maxime.chevallier@...tlin.com,
 davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
 pabeni@...hat.com, marex@...x.de, UNGLinuxDriver@...rochip.com,
 devicetree@...r.kernel.org, netdev@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v3 7/7] net: dsa: microchip: Disable PTP function
 of KSZ8463

On 09/07/2025 23:59, Tristram.Ha@...rochip.com wrote:
>> On Tue, Jul 08, 2025 at 05:32:33PM -0700, Tristram.Ha@...rochip.com wrote:
>>> From: Tristram Ha <tristram.ha@...rochip.com>
>>>
>>> The PTP function of KSZ8463 is on by default.  However, its proprietary
>>> way of storing timestamp directly in a reserved field inside the PTP
>>> message header is not suitable for use with the current Linux PTP stack
>>> implementation.  It is necessary to disable the PTP function to not
>>> interfere the normal operation of the MAC.
>>>
>>> Signed-off-by: Tristram Ha <tristram.ha@...rochip.com>
>>> ---
>>>   drivers/net/dsa/microchip/ksz8.c | 11 +++++++++++
>>>   1 file changed, 11 insertions(+)
>>>
>>> diff --git a/drivers/net/dsa/microchip/ksz8.c b/drivers/net/dsa/microchip/ksz8.c
>>> index ddbd05c44ce5..fd4a000487d6 100644
>>> --- a/drivers/net/dsa/microchip/ksz8.c
>>> +++ b/drivers/net/dsa/microchip/ksz8.c
>>> @@ -1761,6 +1761,17 @@ void ksz8_config_cpu_port(struct dsa_switch *ds)
>>>                                           reg16(dev, KSZ8463_REG_DSP_CTRL_6),
>>>                                           COPPER_RECEIVE_ADJUSTMENT, 0);
>>>                }
>>> +
>>> +             /* Turn off PTP function as the switch's proprietary way of
>>> +              * handling timestamp is not supported in current Linux PTP
>>> +              * stack implementation.
>>> +              */
>>> +             regmap_update_bits(ksz_regmap_16(dev),
>>> +                                reg16(dev, KSZ8463_PTP_MSG_CONF1),
>>> +                                PTP_ENABLE, 0);
>>> +             regmap_update_bits(ksz_regmap_16(dev),
>>> +                                reg16(dev, KSZ8463_PTP_CLK_CTRL),
>>> +                                PTP_CLK_ENABLE, 0);
>>>        }
>>>   }
>>>
>>> --
>>> 2.34.1
>>>
>>
>> What prevents the user from later enabling this through
>> ksz_set_hwtstamp_config(HWTSTAMP_TX_ONESTEP_P2P)?
> 
> The PTP engine in KSZ8463 is first generation.  The DSA PTP driver used
> by KSZ9477 and LAN937X is for second generation, which uses tail tag to
> pass along receive/transmit timestamp and port information.
> 
> It is not likely the PTP driver will be updated to support KSZ8463.
> Currently that driver code is not activated except for KSZ9477 and
> LAN937X.

I believe Vladimir was asking about software options and the answer is
that this switch is added with .ptp_capable = false in the patch 2.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ