0006-stmmac-pci-Adjust-IOT2000-matching.patch 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. From e3ba8c4f83c6c206a20e4645a37612b1e10580c6 Mon Sep 17 00:00:00 2001
  2. From: Su Bao Cheng <baocheng.su@siemens.com>
  3. Date: Fri, 12 Oct 2018 15:08:11 +0200
  4. Subject: [PATCH 06/18] stmmac: pci: Adjust IOT2000 matching
  5. Since there are more IOT2040 variants with identical hardware but
  6. different asset tags, the asset tag matching should be adjusted to
  7. support them.
  8. For the board name "SIMATIC IOT2000", currently there are 2 types of
  9. hardware, IOT2020 and IOT2040. The IOT2020 is identified by its unique
  10. asset tag. Match on it first. If we then match on the board name only,
  11. we will catch all IOT2040 variants. In the future there will be no other
  12. devices with the "SIMATIC IOT2000" DMI board name but different
  13. hardware.
  14. Signed-off-by: Su Bao Cheng <baocheng.su@siemens.com>
  15. Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>
  16. ---
  17. drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 8 ++++++--
  18. 1 file changed, 6 insertions(+), 2 deletions(-)
  19. diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
  20. index 279a1355d75f..ac733d4d3ed4 100644
  21. --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
  22. +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
  23. @@ -149,11 +149,15 @@ static const struct dmi_system_id quark_pci_dmi[] = {
  24. },
  25. .driver_data = (void *)&galileo_stmmac_dmi_data,
  26. },
  27. + /*
  28. + * There are 2 types of SIMATIC IOT2000: IOT2020 and IOT2040.
  29. + * The asset tag "6ES7647-0AA00-0YA2" is only for IOT2020 which
  30. + * has only one pci network device while other asset tags are
  31. + * for IOT2040 which has two.
  32. + */
  33. {
  34. .matches = {
  35. DMI_EXACT_MATCH(DMI_BOARD_NAME, "SIMATIC IOT2000"),
  36. - DMI_EXACT_MATCH(DMI_BOARD_ASSET_TAG,
  37. - "6ES7647-0AA00-1YA2"),
  38. },
  39. .driver_data = (void *)&iot2040_stmmac_dmi_data,
  40. },
  41. --
  42. 2.16.4