Skip to content

Commit

Permalink
Fix a mlnx hardware-management issue (#61)
Browse files Browse the repository at this point in the history
Change the attribute of mlxsw_qsfp_dmi_set_cpld_num and
mlxsw_qsfp_dmi_table, let them could be called for multiple times during
kernel boot up.

Signed-off-by: Kevin Wang <[email protected]>
  • Loading branch information
kevinwangsk authored and lguohan committed Sep 22, 2018
1 parent a910776 commit 90c4cdb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ index 3bc6cf8..07cc7ea 100644
return sprintf(buf, "%u\n", version);
}

+static int __init mlxsw_qsfp_dmi_set_cpld_num(const struct dmi_system_id *dmi)
+static int mlxsw_qsfp_dmi_set_cpld_num(const struct dmi_system_id *dmi)
+{
+ mlxsw_qsfp_cpld_num = MLXSW_QSFP_MAX_CPLD_NUM;
+
+ return 1;
+};
+
+static struct dmi_system_id mlxsw_qsfp_dmi_table[] __initdata = {
+static const struct dmi_system_id mlxsw_qsfp_dmi_table[] = {
+ {
+ .callback = mlxsw_qsfp_dmi_set_cpld_num,
+ .matches = {
Expand Down

0 comments on commit 90c4cdb

Please sign in to comment.