linux/drivers/net/ethernet/freescale/enetc
Wei Fang fa1a8457b8 net: enetc: restore RX ring congestion mode for ENETC v4
ENETC v4 has the same problem as ENETC v1: the RX BD ring congestion
mode (CM) is only configured in the phylink .mac_link_up() callback, so
it is cleared when enetc_reconfigure() rebuilds the RX BD rings at
runtime (for example when enabling or disabling PTP RX hardware
timestamping) without a link status change, and it is never restored.
As a result, the MAC can no longer generate PAUSE frames on ingress
congestion and flow control stops working.

Fix it in the same way as ENETC v1. Track the desired CM state in the
software flag ENETC_RXBDR_CM. Route enetc4_set_tx_pause() through the
shared helper enetc_set_congestion_mode(), which sets or clears the flag
according to tx_pause and updates the ENETC_RBMR_CM bit under si->gen_lock.
When the RX BD rings are (re)enabled, enetc_enable_rxbdr() consults this
flag and restores the CM bit accordingly, so flow control survives ring
reconfiguration even when the link status does not change.

Fixes: f5b9a1cde0 ("net: enetc: add PTP synchronization support for ENETC v4")
Signed-off-by: Wei Fang <wei.fang@nxp.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20260821064140.1315611-3-wei.fang@oss.nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-24 11:56:38 -07:00
..
enetc_cbdr.c net: enetc: align v1 CBDR API with v4 for VF driver sharing 2026-05-26 13:20:13 +02:00
enetc_ethtool.c net: enetc: extract common helpers for MAC promiscuous mode setting 2026-07-27 16:31:53 -07:00
enetc_hw.h net: enetc: refactor SI VLAN promiscuous mode configuration 2026-07-27 16:31:54 -07:00
enetc_ierb.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
enetc_ierb.h net: update NXP copyright text 2021-09-17 13:52:17 +01:00
enetc_mailbox.h net: enetc: add VF-PF messaging support for IP minor revision query 2026-05-26 13:20:13 +02:00
enetc_mdio.c enetc: Separate C22 and C45 transactions 2023-01-13 21:40:54 -08:00
enetc_msg.c net: enetc: add VF-PF messaging support for IP minor revision query 2026-05-26 13:20:13 +02:00
enetc_pci_mdio.c net: enetc: add i.MX95 EMDIO support 2024-11-04 10:03:51 +00:00
enetc_pf_common.c net: enetc: move enetc_set_si_vlan_promisc() to enetc_pf_common.c 2026-07-27 16:31:54 -07:00
enetc_pf_common.h net: enetc: move enetc_set_si_vlan_promisc() to enetc_pf_common.c 2026-07-27 16:31:54 -07:00
enetc_pf.c net: enetc: restore RX ring congestion mode after ring reconfiguration 2026-08-24 11:56:37 -07:00
enetc_pf.h net: enetc: remove redundant num_vsi field from enetc_port_caps 2026-07-27 16:31:54 -07:00
enetc_ptp.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
enetc_qos.c net: enetc: use kzalloc_flex() for enetc_psfp_gate allocation 2026-07-27 16:31:55 -07:00
enetc_vf.c net: enetc: use alloc_etherdev_mqs() to create netdev for VF driver 2026-07-27 16:31:55 -07:00
enetc.c net: enetc: restore RX ring congestion mode after ring reconfiguration 2026-08-24 11:56:37 -07:00
enetc.h net: enetc: restore RX ring congestion mode after ring reconfiguration 2026-08-24 11:56:37 -07:00
enetc4_debugfs.c net: enetc: remove redundant num_vsi field from enetc_port_caps 2026-07-27 16:31:54 -07:00
enetc4_debugfs.h net: enetc: add debugfs interface to dump MAC filter 2025-05-08 19:43:51 -07:00
enetc4_hw.h net: enetc: remove invalid code from enetc4_pl_mac_link_up() 2026-07-27 16:31:54 -07:00
enetc4_pf.c net: enetc: restore RX ring congestion mode for ENETC v4 2026-08-24 11:56:38 -07:00
Kconfig net: enetc: convert mailbox messages to new formats 2026-05-26 13:20:13 +02:00
Makefile net: enetc: integrate enetc_msg.c into enetc-pf-common driver 2026-05-26 13:20:13 +02:00
netc_blk_ctrl.c net: enetc: add pre-boot initialization for i.MX94 switch 2026-05-21 13:04:41 +02:00
ntmp_private.h net: enetc: add interfaces to manage egress treatment table 2026-06-15 14:32:05 -07:00
ntmp.c net: enetc: add helpers to set/clear table bitmap 2026-06-15 14:32:06 -07:00