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-next>] [day] [month] [year] [list]
Message-ID: <20240402114405.219100-1-c-vankar@ti.com>
Date: Tue, 2 Apr 2024 17:14:03 +0530
From: Chintan Vankar <c-vankar@...com>
To: Dan Carpenter <dan.carpenter@...aro.org>,
        Siddharth Vadapalli
	<s-vadapalli@...com>,
        Heiner Kallweit <hkallweit1@...il.com>,
        Chintan Vankar
	<c-vankar@...com>, Andrew Lunn <andrew@...n.ch>,
        Roger Quadros
	<rogerq@...nel.org>,
        Richard Cochran <richardcochran@...il.com>,
        Paolo Abeni
	<pabeni@...hat.com>, Jakub Kicinski <kuba@...nel.org>,
        Eric Dumazet
	<edumazet@...gle.com>,
        "David S. Miller" <davem@...emloft.net>
CC: <linux-kernel@...r.kernel.org>, <netdev@...r.kernel.org>
Subject: [PATCH net-next v5 0/2] Enable RX HW timestamp for PTP packets using CPTS FIFO

The CPSW offers two mechanisms for communicating packet ingress timestamp
information to the host.

The first mechanism is via the CPTS Event FIFO which records timestamp
when triggered by certain events. One such event is the reception of an
Ethernet packet with a specified EtherType field. This is used to capture
ingress timestamps for PTP packets. With this mechanism the host must
read the timestamp (from the CPTS FIFO) separately from the packet payload
which is delivered via DMA.

In the second mechanism of timestamping, CPSW driver enables hardware
timestamping for all received packets by setting the TSTAMP_EN bit in
CPTS_CONTROL register, which directs the CPTS module to timestamp all
received packets, followed by passing timestamp via DMA descriptors.
This mechanism is responsible for triggering errata i2401:
"CPSW: Host Timestamps Cause CPSW Port to Lock up."

The errata affects all K3 SoCs. Link to errata for AM64x:
https://www.ti.com/lit/er/sprz457h/sprz457h.pdf

As a workaround we can use first mechanism to timestamp received 
packets.

Link to v4:
https://lore.kernel.org/r/20240327054234.1906957-1-c-vankar@ti.com/

Changes from v4 to v5:
- Added cover letter
- Updated commit messages.
- Combined [PATCH v4 2/3] and [PATCH v4 3/3] in v5.
- Replaced "list_del_entry()" and "list_add()" functions with equivalent
  "list_move()" function in [PATCH v4 1/1].
  
  This changes are done as per discussion at here:
  https://lore.kernel.org/all/20240327054234.1906957-1-c-vankar@ti.com/

Chintan Vankar (2):
  net: ethernet: ti: am65-cpts: Enable RX HW timestamp for PTP packets
    using CPTS FIFO
  net: ethernet: ti: am65-cpsw/ethtool: Enable RX HW timestamp only for
    PTP packets

 drivers/net/ethernet/ti/am65-cpsw-ethtool.c | 13 ++-
 drivers/net/ethernet/ti/am65-cpsw-nuss.c    | 50 ++++++------
 drivers/net/ethernet/ti/am65-cpts.c         | 87 +++++++++++++++------
 drivers/net/ethernet/ti/am65-cpts.h         | 11 +--
 4 files changed, 105 insertions(+), 56 deletions(-)

-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ