Loading Documentation/IPMI.txt +4 −1 Original line number Diff line number Diff line Loading @@ -505,7 +505,10 @@ at module load time (for a module) with: The addresses are normal I2C addresses. The adapter is the string name of the adapter, as shown in /sys/class/i2c-adapter/i2c-<n>/name. It is *NOT* i2c-<n> itself. It is *NOT* i2c-<n> itself. Also, the comparison is done ignoring spaces, so if the name is "This is an I2C chip" you can say adapter_name=ThisisanI2cchip. This is because it's hard to pass in spaces in kernel parameters. The debug flags are bit flags for each BMC found, they are: IPMI messages: 1, driver state: 2, timing: 4, I2C probe: 8 Loading drivers/char/ipmi/ipmi_ssif.c +22 −3 Original line number Diff line number Diff line Loading @@ -1258,6 +1258,23 @@ static const struct file_operations smi_stats_proc_ops = { .release = single_release, }; static int strcmp_nospace(char *s1, char *s2) { while (*s1 && *s2) { while (isspace(*s1)) s1++; while (isspace(*s2)) s2++; if (*s1 > *s2) return 1; if (*s1 < *s2) return -1; s1++; s2++; } return 0; } static struct ssif_addr_info *ssif_info_find(unsigned short addr, char *adapter_name, bool match_null_name) Loading @@ -1272,8 +1289,10 @@ static struct ssif_addr_info *ssif_info_find(unsigned short addr, /* One is NULL and one is not */ continue; } if (strcmp(info->adapter_name, adapter_name)) /* Names to not match */ if (adapter_name && strcmp_nospace(info->adapter_name, adapter_name)) /* Names do not match */ continue; } found = info; Loading Loading
Documentation/IPMI.txt +4 −1 Original line number Diff line number Diff line Loading @@ -505,7 +505,10 @@ at module load time (for a module) with: The addresses are normal I2C addresses. The adapter is the string name of the adapter, as shown in /sys/class/i2c-adapter/i2c-<n>/name. It is *NOT* i2c-<n> itself. It is *NOT* i2c-<n> itself. Also, the comparison is done ignoring spaces, so if the name is "This is an I2C chip" you can say adapter_name=ThisisanI2cchip. This is because it's hard to pass in spaces in kernel parameters. The debug flags are bit flags for each BMC found, they are: IPMI messages: 1, driver state: 2, timing: 4, I2C probe: 8 Loading
drivers/char/ipmi/ipmi_ssif.c +22 −3 Original line number Diff line number Diff line Loading @@ -1258,6 +1258,23 @@ static const struct file_operations smi_stats_proc_ops = { .release = single_release, }; static int strcmp_nospace(char *s1, char *s2) { while (*s1 && *s2) { while (isspace(*s1)) s1++; while (isspace(*s2)) s2++; if (*s1 > *s2) return 1; if (*s1 < *s2) return -1; s1++; s2++; } return 0; } static struct ssif_addr_info *ssif_info_find(unsigned short addr, char *adapter_name, bool match_null_name) Loading @@ -1272,8 +1289,10 @@ static struct ssif_addr_info *ssif_info_find(unsigned short addr, /* One is NULL and one is not */ continue; } if (strcmp(info->adapter_name, adapter_name)) /* Names to not match */ if (adapter_name && strcmp_nospace(info->adapter_name, adapter_name)) /* Names do not match */ continue; } found = info; Loading