linux/drivers/net/ethernet/ti
Aksh Garg d4b00d132d net: ethernet: ti: am65-cpsw-qos: fix IET verify retry mechanism
The am65_cpsw_iet_verify_wait() function attempts verification 20 times,
toggling the AM65_CPSW_PN_IET_MAC_LINKFAIL bit in each iteration. When
the LINKFAIL bit transitions from 1 to 0, the MAC merge layer initiates
the verification process and waits for the timeout configured in
MAC_VERIFY_CNT before automatically retransmitting. The MAC_VERIFY_CNT
register is configured according to the user-defined verify/response
timeout in am65_cpsw_iet_set_verify_timeout_count(). As per IEEE 802.3
Clause 99, the hardware performs this automatic retry up to 3 times.

Current implementation toggles LINKFAIL after the user-configured
verify/response timeout in each iteration, forcing the hardware to
restart verification instead of respecting the MAC_VERIFY_CNT timeout.
This bypasses the hardware's automatic retry mechanism.

Fix this by moving the LINKFAIL bit toggle outside the retry loop and
reducing the retry count from 20 to 3. The software now only monitors
the status register while the hardware autonomously handles the 3
verification attempts at proper MAC_VERIFY_CNT intervals.

Fixes: 49a2eb9068 ("net: ethernet: ti: am65-cpsw-qos: Add Frame Preemption MAC Merge support")
Signed-off-by: Aksh Garg <a-garg7@ti.com>
Link: https://patch.msgid.link/20251106092305.1437347-3-a-garg7@ti.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-11-10 18:00:40 -08:00
..
icssg net: ti: icssg-prueth: Fix fdb hash size configuration 2025-11-05 17:43:08 -08:00
icssm net: ti: icssm-prueth: unwind cleanly in probe() 2025-09-19 16:58:25 -07:00
am65-cpsw-ethtool.c net: ti: am65-cpsw: Update hw timestamping filter for PTPv1 RX packets 2025-09-18 15:42:28 -07:00
am65-cpsw-nuss.c net: ti: am65-cpsw: Update hw timestamping filter for PTPv1 RX packets 2025-09-18 15:42:28 -07:00
am65-cpsw-nuss.h net: ethernet: ti am65_cpsw: Drop separate TX completion functions 2025-02-19 11:52:44 +00:00
am65-cpsw-qos.c net: ethernet: ti: am65-cpsw-qos: fix IET verify retry mechanism 2025-11-10 18:00:40 -08:00
am65-cpsw-qos.h net: ethernet: ti: am65-cpsw-qos: Add Frame Preemption MAC Merge support 2023-12-23 01:01:19 +00:00
am65-cpsw-switchdev.c
am65-cpsw-switchdev.h
am65-cpts.c net: ethernet: ti: am65-cpts: fix timestamp loss due to race conditions 2025-10-21 12:26:11 +02:00
am65-cpts.h net: ethernet: ti: am65-cpsw/ethtool: Enable RX HW timestamp only for PTP packets 2024-04-23 12:07:24 +02:00
cpsw_ale.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
cpsw_ale.h net: ethernet: ti: cpsw_ale: Fix warning on some platforms 2024-10-01 11:34:41 +02:00
cpsw_ethtool.c net: ethernet: ti: cpsw: disable PHY EEE advertisement 2024-12-19 19:07:48 -08:00
cpsw_new.c net: cpsw: isolate cpsw_ndo_ioctl() to just the old driver 2025-05-14 19:41:46 -07:00
cpsw_priv.c net: cpsw: isolate cpsw_ndo_ioctl() to just the old driver 2025-05-14 19:41:46 -07:00
cpsw_priv.h net: cpsw: isolate cpsw_ndo_ioctl() to just the old driver 2025-05-14 19:41:46 -07:00
cpsw_sl.c
cpsw_sl.h
cpsw_switchdev.c
cpsw_switchdev.h
cpsw-common.c net: fill in MODULE_DESCRIPTION()s for cpsw-common 2024-01-29 12:12:51 +00:00
cpsw-phy-sel.c net: Explicitly include correct DT includes 2023-07-27 20:33:16 -07:00
cpsw.c net: cpsw: isolate cpsw_ndo_ioctl() to just the old driver 2025-05-14 19:41:46 -07:00
cpsw.h
cpts.c time/timecounter: Fix the lie that struct cyclecounter is const 2025-07-01 15:38:25 +02:00
cpts.h
davinci_cpdma.c
davinci_cpdma.h
davinci_emac.c net: ethernet: Switch back to struct platform_driver::remove() 2024-10-04 16:39:56 -07:00
davinci_mdio.c net: ethernet: Switch back to struct platform_driver::remove() 2024-10-04 16:39:56 -07:00
k3-cppi-desc-pool.c net: ethernet: ti: Add desc_infos member to struct k3_cppi_desc_pool 2024-04-15 13:18:18 +01:00
k3-cppi-desc-pool.h net: ethernet: ti: Add desc_infos member to struct k3_cppi_desc_pool 2024-04-15 13:18:18 +01:00
Kconfig net: ti: icssm-prueth: Adds ICSSM Ethernet driver 2025-09-14 13:00:54 -07:00
Makefile net: ti: icssm-prueth: Adds ICSSM Ethernet driver 2025-09-14 13:00:54 -07:00
netcp_core.c net: ethernet: ti: netcp: Standardize knav_dma_open_channel to return NULL on error 2025-11-04 19:15:36 -08:00
netcp_ethss.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
netcp_sgmii.c
netcp_xgbepcsr.c
netcp.h net: ethernet: ti: Remove unused declarations 2023-08-22 10:33:21 -07:00
tlan.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
tlan.h