]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/5.0.11/stmmac-pci-adjust-iot2000-matching.patch
4.14-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 5.0.11 / stmmac-pci-adjust-iot2000-matching.patch
CommitLineData
3f06e861
GKH
1From foo@baz Tue 30 Apr 2019 09:51:57 AM CEST
2From: Su Bao Cheng <baocheng.su@siemens.com>
3Date: Thu, 18 Apr 2019 11:14:56 +0200
4Subject: stmmac: pci: Adjust IOT2000 matching
5
6From: Su Bao Cheng <baocheng.su@siemens.com>
7
8[ Upstream commit e0c1d14a1a3211dccf0540a6703ffbd5d2a75bdb ]
9
10Since there are more IOT2040 variants with identical hardware but
11different asset tags, the asset tag matching should be adjusted to
12support them.
13
14For the board name "SIMATIC IOT2000", currently there are 2 types of
15hardware, IOT2020 and IOT2040. The IOT2020 is identified by its unique
16asset tag. Match on it first. If we then match on the board name only,
17we will catch all IOT2040 variants. In the future there will be no other
18devices with the "SIMATIC IOT2000" DMI board name but different
19hardware.
20
21Signed-off-by: Su Bao Cheng <baocheng.su@siemens.com>
22Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>
23Signed-off-by: David S. Miller <davem@davemloft.net>
24Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
25---
26 drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 8 ++++++--
27 1 file changed, 6 insertions(+), 2 deletions(-)
28
29--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
30+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
31@@ -159,6 +159,12 @@ static const struct dmi_system_id quark_
32 },
33 .driver_data = (void *)&galileo_stmmac_dmi_data,
34 },
35+ /*
36+ * There are 2 types of SIMATIC IOT2000: IOT20202 and IOT2040.
37+ * The asset tag "6ES7647-0AA00-0YA2" is only for IOT2020 which
38+ * has only one pci network device while other asset tags are
39+ * for IOT2040 which has two.
40+ */
41 {
42 .matches = {
43 DMI_EXACT_MATCH(DMI_BOARD_NAME, "SIMATIC IOT2000"),
44@@ -170,8 +176,6 @@ static const struct dmi_system_id quark_
45 {
46 .matches = {
47 DMI_EXACT_MATCH(DMI_BOARD_NAME, "SIMATIC IOT2000"),
48- DMI_EXACT_MATCH(DMI_BOARD_ASSET_TAG,
49- "6ES7647-0AA00-1YA2"),
50 },
51 .driver_data = (void *)&iot2040_stmmac_dmi_data,
52 },