# Rules for handling naming the DPAA FMan ethernet ports in a consistent way
SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e0000", NAME="fm1-gb0"
SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e2000", NAME="fm1-gb1"
SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e4000", NAME="fm1-gb2"
SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e6000", NAME="fm1-gb3"
SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e8000", NAME="fm1-gb4"
SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4f0000", NAME="fm1-10g"
SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e0000", NAME="fm2-gb0"
SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e2000", NAME="fm2-gb1"
SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e4000", NAME="fm2-gb2"
SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e6000", NAME="fm2-gb3"
SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e8000", NAME="fm2-gb4"
SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5f0000", NAME="fm2-10g"

# P1023 has its Fman @ different offsets
SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ff7e0000", NAME="fm1-gb0"
SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ff7e2000", NAME="fm1-gb1"

# Unify the PCIe Etherenet port, maxinum PCIe slots is 4
SUBSYSTEM=="net", KERNEL=="eth*", KERNELS=="ffe200000.pcie", DRIVERS=="fsl-pci", NAME="eth0"
SUBSYSTEM=="net", KERNEL=="eth*", KERNELS=="ffe201000.pcie", DRIVERS=="fsl-pci", NAME="eth1"
SUBSYSTEM=="net", KERNEL=="eth*", KERNELS=="ffe202000.pcie", DRIVERS=="fsl-pci", NAME="eth2"
SUBSYSTEM=="net", KERNEL=="eth*", KERNELS=="ffe203000.pcie", DRIVERS=="fsl-pci", NAME="eth3"

# Rename macless0 port to "eth4"
SUBSYSTEM=="net", ATTR{device_type}=="macless0", NAME="eth4"
