]>
Commit | Line | Data |
---|---|---|
3f06e861 GKH |
1 | From foo@baz Tue 30 Apr 2019 09:51:57 AM CEST |
2 | From: Su Bao Cheng <baocheng.su@siemens.com> | |
3 | Date: Thu, 18 Apr 2019 11:14:56 +0200 | |
4 | Subject: stmmac: pci: Adjust IOT2000 matching | |
5 | ||
6 | From: Su Bao Cheng <baocheng.su@siemens.com> | |
7 | ||
8 | [ Upstream commit e0c1d14a1a3211dccf0540a6703ffbd5d2a75bdb ] | |
9 | ||
10 | Since there are more IOT2040 variants with identical hardware but | |
11 | different asset tags, the asset tag matching should be adjusted to | |
12 | support them. | |
13 | ||
14 | For the board name "SIMATIC IOT2000", currently there are 2 types of | |
15 | hardware, IOT2020 and IOT2040. The IOT2020 is identified by its unique | |
16 | asset tag. Match on it first. If we then match on the board name only, | |
17 | we will catch all IOT2040 variants. In the future there will be no other | |
18 | devices with the "SIMATIC IOT2000" DMI board name but different | |
19 | hardware. | |
20 | ||
21 | Signed-off-by: Su Bao Cheng <baocheng.su@siemens.com> | |
22 | Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com> | |
23 | Signed-off-by: David S. Miller <davem@davemloft.net> | |
24 | Signed-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 | }, |