diff options
author | Vadim Pasternak <vadimp@mellanox.com> | 2019-06-23 12:16:27 +0000 |
---|---|---|
committer | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2019-07-03 15:37:33 +0300 |
commit | cb636bb1dcfb514e85b70ff482b6c583f3eb7960 (patch) | |
tree | 3d2d6ea0ec856d390b3f92e1cb53a3ed7343b5a4 /drivers/platform | |
parent | a7ff2f99eb547867377f4db7eeae853804d78d96 (diff) | |
download | linux-cb636bb1dcfb514e85b70ff482b6c583f3eb7960.tar.bz2 |
platform/x86: mlx-platform: Modify DMI matching order
Modify DMI matching order: perform matching based on DMI_BOARD_NAME
before matching based on DMI_BOARD_VENDOR and DMI_PRODUCT_NAME in order
to reduce the number of ‘dmi_table’ entries necessary for new systems
support and keep matching order in logical way.
For example, the existing check for DMI_PRODUCT_NAME with prefixes
“MSN27", “MSN24”, "MSB” matches systems MSN2700-BXXXX, MSN2700-XXXX,
MSN2410-BXXXX, MSB7800-XXXX, where ‘XXXX’ specifies some systems
hardware flavors.
At the same time these systems also matched by DMI_BOARD_NAME
“VMOD0001”, because they all have the same platform configuration (LED,
interrupt control, mux etcetera).
New systems with different platform configuration, but with similar
DMI_PRODUCT_NAME MSN2700-2XXXX, MSN2700-2XXXX, MSB7800-2XXXX are about
to be added. These system have similar DMI_PRODUCT_NAME, since they
have same ports configuration as their predecessors. All new systems
will be matched by DMI_BOARD_NAME “VMOD0008”.
With the change provided in the patch it is enough just to add
“VMOD0008” match following natural after “VMOD0007”, otherwise
“VMOD0008” or all “MSN2700-2XXXX”, “MSN2700-2XXXX”, “MSB7800-2XXXX”
should be added on top of ‘mlxplat_dmi_table” in order to be matched
before “MSN27", “MSN24”, "MSB”.
Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/x86/mlx-platform.c | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/drivers/platform/x86/mlx-platform.c b/drivers/platform/x86/mlx-platform.c index b166fe100935..858156deff45 100644 --- a/drivers/platform/x86/mlx-platform.c +++ b/drivers/platform/x86/mlx-platform.c @@ -1882,6 +1882,42 @@ static int __init mlxplat_dmi_qmb7xx_matched(const struct dmi_system_id *dmi) static const struct dmi_system_id mlxplat_dmi_table[] __initconst = { { + .callback = mlxplat_dmi_default_matched, + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "VMOD0001"), + }, + }, + { + .callback = mlxplat_dmi_msn21xx_matched, + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "VMOD0002"), + }, + }, + { + .callback = mlxplat_dmi_msn274x_matched, + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "VMOD0003"), + }, + }, + { + .callback = mlxplat_dmi_msn201x_matched, + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "VMOD0004"), + }, + }, + { + .callback = mlxplat_dmi_qmb7xx_matched, + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "VMOD0005"), + }, + }, + { + .callback = mlxplat_dmi_qmb7xx_matched, + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "VMOD0007"), + }, + }, + { .callback = mlxplat_dmi_msn274x_matched, .matches = { DMI_MATCH(DMI_BOARD_VENDOR, "Mellanox Technologies"), @@ -1958,42 +1994,6 @@ static const struct dmi_system_id mlxplat_dmi_table[] __initconst = { DMI_MATCH(DMI_PRODUCT_NAME, "MSN38"), }, }, - { - .callback = mlxplat_dmi_default_matched, - .matches = { - DMI_MATCH(DMI_BOARD_NAME, "VMOD0001"), - }, - }, - { - .callback = mlxplat_dmi_msn21xx_matched, - .matches = { - DMI_MATCH(DMI_BOARD_NAME, "VMOD0002"), - }, - }, - { - .callback = mlxplat_dmi_msn274x_matched, - .matches = { - DMI_MATCH(DMI_BOARD_NAME, "VMOD0003"), - }, - }, - { - .callback = mlxplat_dmi_msn201x_matched, - .matches = { - DMI_MATCH(DMI_BOARD_NAME, "VMOD0004"), - }, - }, - { - .callback = mlxplat_dmi_qmb7xx_matched, - .matches = { - DMI_MATCH(DMI_BOARD_NAME, "VMOD0005"), - }, - }, - { - .callback = mlxplat_dmi_qmb7xx_matched, - .matches = { - DMI_MATCH(DMI_BOARD_NAME, "VMOD0007"), - }, - }, { } }; |