Skip to content

net: enetc: cleanups and improvements

[email protected] imx linux-arm-kernel linuxppc-dev lkml netdev sashiko-reviews 5 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest posting 2/214 patches 11 repliesApplied 14/14
  2. v4 posting 1/214 patches 1 replySuperseded
  3. v314 patches 4 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v214 patches4 repliesSuperseded
v114 patches3 repliesSuperseded

Changes in v4 from the cover letter

Patches in v4 posting 2/2 All 14 applied

#Subject and filesSizeRepliesApplied
1/14net: enetc: extract common helpers for MAC promiscuous mode settingdrivers/net/ethernet/freescale/enetc/enetc4_hw.h drivers/net/ethernet/freescale/enetc/enetc4_pf.c drivers/net/ethernet/freescale/enetc/enetc_ethtool.c +4 more+56 -331 replyApplied
2/14net: enetc: extract common helpers for MAC hash filter configurationdrivers/net/ethernet/freescale/enetc/enetc4_pf.c drivers/net/ethernet/freescale/enetc/enetc_pf.c drivers/net/ethernet/freescale/enetc/enetc_pf_common.c +1 more+73 -630 repliesApplied
3/14net: enetc: convert ndo_set_rx_mode() to ndo_set_rx_mode_async()drivers/net/ethernet/freescale/enetc/enetc.h drivers/net/ethernet/freescale/enetc/enetc4_pf.c+58 -1220 repliesApplied
4/14net: enetc: improve MAFT entry management with bitmap trackingdrivers/net/ethernet/freescale/enetc/enetc4_debugfs.c drivers/net/ethernet/freescale/enetc/enetc4_pf.c drivers/net/ethernet/freescale/enetc/enetc_pf.h +1 more+96 -360 repliesApplied
5/14net: enetc: use PCI device name for debugfs directorydrivers/net/ethernet/freescale/enetc/enetc4_debugfs.c+1 -21 replyApplied
6/14net: enetc: simplify enetc4_set_port_speed()drivers/net/ethernet/freescale/enetc/enetc4_hw.h drivers/net/ethernet/freescale/enetc/enetc4_pf.c+10 -170 repliesApplied
7/14net: enetc: differentiate phylink capabilities for pseudo-MAC and standalone MACdrivers/net/ethernet/freescale/enetc/enetc.h drivers/net/ethernet/freescale/enetc/enetc4_pf.c drivers/net/ethernet/freescale/enetc/enetc_pf_common.c+32 -151 replyApplied
8/14net: enetc: remove invalid code from enetc4_pl_mac_link_up()drivers/net/ethernet/freescale/enetc/enetc4_hw.h drivers/net/ethernet/freescale/enetc/enetc4_pf.c drivers/net/ethernet/freescale/enetc/enetc_pf.h+1 -400 repliesApplied
9/14net: enetc: open-code enetc4_set_default_si_vlan_promisc()drivers/net/ethernet/freescale/enetc/enetc4_pf.c+3 -121 replyApplied
10/14net: enetc: refactor SI VLAN promiscuous mode configurationdrivers/net/ethernet/freescale/enetc/enetc_hw.h drivers/net/ethernet/freescale/enetc/enetc_pf.c drivers/net/ethernet/freescale/enetc/enetc_pf.h+16 -262 repliesApplied
11/14net: enetc: move enetc_set_si_vlan_promisc() to enetc_pf_common.cdrivers/net/ethernet/freescale/enetc/enetc4_pf.c drivers/net/ethernet/freescale/enetc/enetc_pf.c drivers/net/ethernet/freescale/enetc/enetc_pf_common.c +1 more+25 -311 replyApplied
12/14net: enetc: remove redundant num_vsi field from enetc_port_capsdrivers/net/ethernet/freescale/enetc/enetc4_debugfs.c drivers/net/ethernet/freescale/enetc/enetc4_pf.c drivers/net/ethernet/freescale/enetc/enetc_pf.h+68 -320 repliesApplied
13/14net: enetc: use alloc_etherdev_mqs() to create netdev for VF driverdrivers/net/ethernet/freescale/enetc/enetc_vf.c+8 -13 repliesApplied
14/14net: enetc: use kzalloc_flex() for enetc_psfp_gate allocationdrivers/net/ethernet/freescale/enetc/enetc_qos.c+1 -31 replyApplied

Reviews trailers per patch

10 of 14 patches have a Reviewed-by or Acked-by.

PatchMaxime ChevallierJoe Damato
1/14R-b
2/14
3/14
4/14
5/14R-b
6/14R-b
7/14R-b
8/14R-b
9/14R-b
10/14R-b
11/14R-b
12/14
13/14R-b
14/14R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH RESEND v4 net-next 00/14] net: enetc: cleanups and improvements

From: Wei Fang <[email protected]>

The first group of patches (1, 2, 5-7) eliminates code duplication between the ENETC v1 and v4 drivers. Since both hardware generations share identical register layouts for MAC promiscuous mode, MAC hash filters, and VLAN promiscuous mode - differing only in register address offsets - common helper functions are extracted into enetc_pf_common.c and shared by both drivers.

Patch 3 converts ndo_set_rx_mode() to ndo_set_rx_mode_async(), removing the dedicated workqueue that was previously needed to defer MAC address list updates to a sleepable context.

Patch 4 replaces counter-based MAFT entry tracking with a bitmap, which keeps hardware and software state in sync and avoids partial failures during entry allocation.

Patches 8 and 9 fix phylink-related issues: removing invalid code from enetc4_pl_mac_link_up() and properly differentiating phylink capabilities between pseudo-MAC and standalone MAC.

The remaining patches (10-14) are minor cleanups: removing a redundant VLAN promiscuous mode initialization in probe, using the PCI device name for the debugfs directory, simplifying port speed configuration, removing a redundant num_vsi field, using alloc_etherdev_mqs() for the VF driver, and using kzalloc_flex() for a flexible array allocation.

---
v4 link: https://lore.kernel.org/imx/[email protected]/
v4:
1. Improve enetc4_set_si_msix_num()
2. Update commit messages
v3 link: https://lore.kernel.org/imx/[email protected]/
v2 link: https://lore.kernel.org/imx/[email protected]/
v1 link: https://lore.kernel.org/imx/[email protected]/
---

Claudiu Manoil (1):
net: enetc: differentiate phylink capabilities for pseudo-MAC and
standalone MAC

Wei Fang (13):
net: enetc: extract common helpers for MAC promiscuous mode setting
net: enetc: extract common helpers for MAC hash filter configuration
net: enetc: convert ndo_set_rx_mode() to ndo_set_rx_mode_async()
net: enetc: improve MAFT entry management with bitmap tracking
net: enetc: use PCI device name for debugfs directory
net: enetc: simplify enetc4_set_port_speed()
net: enetc: remove invalid code from enetc4_pl_mac_link_up()
net: enetc: open-code enetc4_set_default_si_vlan_promisc()
net: enetc: refactor SI VLAN promiscuous mode configuration
net: enetc: move enetc_set_si_vlan_promisc() to enetc_pf_common.c
net: enetc: remove redundant num_vsi field from enetc_port_caps
net: enetc: use alloc_etherdev_mqs() to create netdev for VF driver
net: enetc: use kzalloc_flex() for enetc_psfp_gate allocation

 drivers/net/ethernet/freescale/enetc/enetc.h  |   4 +-
 .../ethernet/freescale/enetc/enetc4_debugfs.c |  42 +-
 .../net/ethernet/freescale/enetc/enetc4_hw.h  |   6 +-
 .../net/ethernet/freescale/enetc/enetc4_pf.c  | 471 ++++++++----------
 .../ethernet/freescale/enetc/enetc_ethtool.c  |   2 +-
 .../net/ethernet/freescale/enetc/enetc_hw.h   |  12 +-
 .../net/ethernet/freescale/enetc/enetc_pf.c   |  94 +---
 .../net/ethernet/freescale/enetc/enetc_pf.h   |   6 -
 .../freescale/enetc/enetc_pf_common.c         | 150 +++++-
 .../freescale/enetc/enetc_pf_common.h         |   5 +
 .../net/ethernet/freescale/enetc/enetc_qos.c  |   4 +-
 .../net/ethernet/freescale/enetc/enetc_vf.c   |   9 +-
 include/linux/fsl/ntmp.h                      |   2 +
 13 files changed, 411 insertions(+), 396 deletions(-)
Signature · 1 line
2.34.1