Patchwork [meta-fsl-ppc,5/6] udev-extraconf: update udev rules for fsl dpaa board

login
register
mail settings
Submitter Ting Liu
Date Oct. 9, 2013, 7:33 a.m.
Message ID <1381303991-11600-6-git-send-email-b28495@freescale.com>
Download mbox | patch
Permalink /patch/59555/
State Accepted
Headers show

Comments

Ting Liu - Oct. 9, 2013, 7:33 a.m.
From: Zhenhua Luo <zhenhua.luo@freescale.com>

* For PCIe ports, renaming breaks the ability to look at the PCIe driver's boot
  output to determine what its ethN is, disable it.
* For macless ports, rename to maclessN instead of ethN
* extend renaming rules to fsl_dpa* as shared-mac driver may be named
  as fsl_dpa_shared. macless interfaces will not match on this rule as they
  do not have device address. legacy interfaces' names are not affected by
  this change.

Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
Signed-off-by: Cristian Sovaiala <cristian.sovaiala@freescale.com>
---
 .../71-fsl-dpaa-persistent-networking.rules        |   38 ++++++---------
 .../72-fsl-dpaa-persistent-networking.rules        |   50 +++++++++-----------
 2 files changed, 38 insertions(+), 50 deletions(-)

Patch

diff --git a/recipes-core/udev/udev-extraconf/71-fsl-dpaa-persistent-networking.rules b/recipes-core/udev/udev-extraconf/71-fsl-dpaa-persistent-networking.rules
index 9bd6785..6c6dc35 100644
--- a/recipes-core/udev/udev-extraconf/71-fsl-dpaa-persistent-networking.rules
+++ b/recipes-core/udev/udev-extraconf/71-fsl-dpaa-persistent-networking.rules
@@ -1,26 +1,20 @@ 
 # 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"
+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"
+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"
+# Rename macless0 port to "macless0"
+SUBSYSTEM=="net", ATTR{device_type}=="macless0", NAME="macless0"
diff --git a/recipes-core/udev/udev-extraconf/72-fsl-dpaa-persistent-networking.rules b/recipes-core/udev/udev-extraconf/72-fsl-dpaa-persistent-networking.rules
index 3529bc4..d0eec9c 100644
--- a/recipes-core/udev/udev-extraconf/72-fsl-dpaa-persistent-networking.rules
+++ b/recipes-core/udev/udev-extraconf/72-fsl-dpaa-persistent-networking.rules
@@ -1,30 +1,24 @@ 
 # Rules for handling naming the DPAA FMan ethernet ports in a consistent way
-SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e0000", NAME="fm1-mac1"
-SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e2000", NAME="fm1-mac2"
-SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e4000", NAME="fm1-mac3"
-SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e6000", NAME="fm1-mac4"
-SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4e8000", NAME="fm1-mac5"
-SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4ea000", NAME="fm1-mac6"
-SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4ec000", NAME="fm1-mac7"
-SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4ee000", NAME="fm1-mac8"
-SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4f0000", NAME="fm1-mac9"
-SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe4f2000", NAME="fm1-mac10"
-SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e0000", NAME="fm2-mac1"
-SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e2000", NAME="fm2-mac2"
-SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e4000", NAME="fm2-mac3"
-SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e6000", NAME="fm2-mac4"
-SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5e8000", NAME="fm2-mac5"
-SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5ea000", NAME="fm2-mac6"
-SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5ec000", NAME="fm2-mac7"
-SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5ee000", NAME="fm2-mac8"
-SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5f0000", NAME="fm2-mac9"
-SUBSYSTEM=="net", DRIVERS=="fsl_dpa", ATTR{device_addr}=="ffe5f2000", NAME="fm2-mac10"
+SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e0000", NAME="fm1-mac1"
+SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e2000", NAME="fm1-mac2"
+SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e4000", NAME="fm1-mac3"
+SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e6000", NAME="fm1-mac4"
+SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4e8000", NAME="fm1-mac5"
+SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4ea000", NAME="fm1-mac6"
+SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4ec000", NAME="fm1-mac7"
+SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4ee000", NAME="fm1-mac8"
+SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4f0000", NAME="fm1-mac9"
+SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe4f2000", NAME="fm1-mac10"
+SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e0000", NAME="fm2-mac1"
+SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e2000", NAME="fm2-mac2"
+SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e4000", NAME="fm2-mac3"
+SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e6000", NAME="fm2-mac4"
+SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5e8000", NAME="fm2-mac5"
+SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5ea000", NAME="fm2-mac6"
+SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5ec000", NAME="fm2-mac7"
+SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5ee000", NAME="fm2-mac8"
+SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5f0000", NAME="fm2-mac9"
+SUBSYSTEM=="net", DRIVERS=="fsl_dpa*", ATTR{device_addr}=="ffe5f2000", NAME="fm2-mac10"
 
-# Unify the PCIe Etherenet port, maxinum PCIe slots is 4
-SUBSYSTEM=="net", KERNEL=="eth*", KERNELS=="ffe240000.pcie", DRIVERS=="fsl-pci", NAME="eth0"
-SUBSYSTEM=="net", KERNEL=="eth*", KERNELS=="ffe250000.pcie", DRIVERS=="fsl-pci", NAME="eth1"
-SUBSYSTEM=="net", KERNEL=="eth*", KERNELS=="ffe260000.pcie", DRIVERS=="fsl-pci", NAME="eth2"
-SUBSYSTEM=="net", KERNEL=="eth*", KERNELS=="ffe270000.pcie", DRIVERS=="fsl-pci", NAME="eth3"
-
-# Rename macless0 to "eth4"
-SUBSYSTEM=="net", ATTR{device_type}=="macless0", NAME="eth4"
+# Rename macless0 to "macless0"
+SUBSYSTEM=="net", ATTR{device_type}=="macless0", NAME="macless0"