diff --git a/patches.suse/net-davinci_emac-match-the-mdio-device-against-its-c.patch b/patches.suse/net-davinci_emac-match-the-mdio-device-against-its-c.patch new file mode 100644 index 0000000..4674081 --- /dev/null +++ b/patches.suse/net-davinci_emac-match-the-mdio-device-against-its-c.patch @@ -0,0 +1,38 @@ +From 10e6479325ce46aa3f670bad4a127b194dcd60c2 Mon Sep 17 00:00:00 2001 +From: Bartosz Golaszewski +Date: Wed, 20 Jun 2018 10:03:56 +0200 +Subject: [PATCH 4/7] net: davinci_emac: match the mdio device against its + compatible if possible +References: git-fixes +Patch-mainline: v4.18-rc3 +Git-commit: ea0820bb771175c7d4192fc6f5b5c56b3c6d5239 + +Device tree based systems without of_dev_auxdata will have the mdio +device named differently than "davinci_mdio(.0)". In this case use the +device's parent's compatible string for matching + +Signed-off-by: Bartosz Golaszewski +Signed-off-by: David S. Miller +Signed-off-by: Denis Kirjanov +--- + drivers/net/ethernet/ti/davinci_emac.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/drivers/net/ethernet/ti/davinci_emac.c b/drivers/net/ethernet/ti/davinci_emac.c +index ab2c7bad7089..0fc5a15f2b8a 100644 +--- a/drivers/net/ethernet/ti/davinci_emac.c ++++ b/drivers/net/ethernet/ti/davinci_emac.c +@@ -1387,6 +1387,10 @@ static int emac_devioctl(struct net_device *ndev, struct ifreq *ifrq, int cmd) + + static int match_first_device(struct device *dev, void *data) + { ++ if (dev->parent && dev->parent->of_node) ++ return of_device_is_compatible(dev->parent->of_node, ++ "ti,davinci_mdio"); ++ + return !strncmp(dev_name(dev), "davinci_mdio", 12); + } + +-- +2.16.4 + diff --git a/series.conf b/series.conf index 06fc5de..88db0a6 100644 --- a/series.conf +++ b/series.conf @@ -35391,6 +35391,7 @@ patches.suse/x86-microcode-intel-fix-memleak-in-save_microcode_patch patches.suse/x86-cpu-amd-fix-llc-id-bit-shift-calculation patches.suse/uprobes-x86-Remove-incorrect-WARN_ON-in-uprobe_init_.patch + patches.suse/net-davinci_emac-match-the-mdio-device-against-its-c.patch patches.suse/bpf-enforce-correct-alignment-for-instructions.patch patches.suse/sctp-fix-erroneous-inc-of-snmp-SctpFragUsrMsgs.patch patches.suse/ipvlan-fix-IFLA_MTU-ignored-on-NEWLINK.patch