linux/drivers/net/ethernet/freescale/enetc
Vladimir Oltean 87614b931c net: enetc: create a common enetc_pf_to_port helper
Even though ENETC interfaces are exposed as individual PCIe PFs with
their own driver instances, the ENETC is still fundamentally a
multi-port Ethernet controller, and some parts of the IP take a port
number (as can be seen in the PSFP implementation).

Create a common helper that can be used outside of the TSN code for
retrieving the ENETC port number based on the PF number. This is only
correct for LS1028A, the only Linux-capable instantiation of ENETC thus
far.

Note that ENETC port 3 is PF 6. The TSN code did not care about this
because ENETC port 3 does not support TSN, so the wrong mapping done by
enetc_get_port for PF 6 could have never been hit.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-04-19 15:31:45 -07:00
..
enetc_cbdr.c net: enetc: pass bd_count as an argument to enetc_setup_cbdr 2021-03-10 13:14:15 -08:00
enetc_ethtool.c enetc: support PTP Sync packet one-step timestamping 2021-04-12 13:34:21 -07:00
enetc_hw.h enetc: support PTP Sync packet one-step timestamping 2021-04-12 13:34:21 -07:00
enetc_mdio.c enetc: reorder macros and functions 2021-01-05 15:19:19 -08:00
enetc_msg.c enetc: Add vf to pf messaging support 2019-01-24 21:55:53 -08:00
enetc_pci_mdio.c net: enetc: fix an issue about leak system resources 2020-05-04 10:51:20 -07:00
enetc_pf.c net: enetc: fetch MAC address from device tree 2021-04-14 14:04:36 -07:00
enetc_pf.h enetc: Migrate to PHYLINK and PCS_LYNX 2020-10-11 11:04:42 -07:00
enetc_ptp.c enetc: Add missing call to 'pci_free_irq_vectors()' in probe and remove functions 2019-08-31 23:53:17 -07:00
enetc_qos.c net: enetc: create a common enetc_pf_to_port helper 2021-04-19 15:31:45 -07:00
enetc_vf.c net: enetc: teardown CBDR during PF/VF unbind 2021-03-19 12:13:11 -07:00
enetc.c net: enetc: apply the MDIO workaround for XDP_REDIRECT too 2021-04-16 17:08:40 -07:00
enetc.h net: enetc: create a common enetc_pf_to_port helper 2021-04-19 15:31:45 -07:00
Kconfig enetc: auto select PHYLIB and MDIO_DEVRES 2021-02-11 18:12:47 -08:00
Makefile enetc: Make MDIO accessors more generic and export to include/linux/fsl 2020-01-05 23:22:32 -08:00