Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'for-linus-6.12-1' of https://github.com/cminyard/linux-ipmi

Pull IPMI updates from Corey Minyard:
"Some minor fixes and cleanups for IPMI. Nothing big.

Handle a bogus BMC a little better, fix autoload on some systems,
remove some deprecated interfaces from the docs"

* tag 'for-linus-6.12-1' of https://github.com/cminyard/linux-ipmi:
ipmi: docs: don't advertise deprecated sysfs entries
ipmi:ssif: Improve detecting during probing
ipmi: ipmi_ssif: fix module autoloading

+25 -2
+1 -1
Documentation/driver-api/ipmi.rst
··· 540 540 alerts_broken 541 541 542 542 The addresses are normal I2C addresses. The adapter is the string 543 - name of the adapter, as shown in /sys/class/i2c-adapter/i2c-<n>/name. 543 + name of the adapter, as shown in /sys/bus/i2c/devices/i2c-<n>/name. 544 544 It is *NOT* i2c-<n> itself. Also, the comparison is done ignoring 545 545 spaces, so if the name is "This is an I2C chip" you can say 546 546 adapter_name=ThisisanI2cchip. This is because it's hard to pass in
+24 -1
drivers/char/ipmi/ipmi_ssif.c
··· 1368 1368 rv = do_cmd(client, 2, msg, &len, resp); 1369 1369 if (rv) 1370 1370 rv = -ENODEV; 1371 - else 1371 + else { 1372 + if (len < 3) { 1373 + rv = -ENODEV; 1374 + } else { 1375 + struct ipmi_device_id id; 1376 + 1377 + rv = ipmi_demangle_device_id(resp[0] >> 2, resp[1], 1378 + resp + 2, len - 2, &id); 1379 + if (rv) 1380 + rv = -ENODEV; /* Error means a BMC probably isn't there. */ 1381 + } 1382 + if (!rv && info) 1372 1383 strscpy(info->type, DEVICE_NAME, I2C_NAME_SIZE); 1384 + } 1373 1385 kfree(resp); 1374 1386 return rv; 1375 1387 } ··· 1715 1703 "Trying %s-specified SSIF interface at i2c address 0x%x, adapter %s, slave address 0x%x\n", 1716 1704 ipmi_addr_src_to_str(ssif_info->addr_source), 1717 1705 client->addr, client->adapter->name, slave_addr); 1706 + 1707 + /* 1708 + * Send a get device id command and validate its response to 1709 + * make sure a valid BMC is there. 1710 + */ 1711 + rv = ssif_detect(client, NULL); 1712 + if (rv) { 1713 + dev_err(&client->dev, "Not present\n"); 1714 + goto out; 1715 + } 1718 1716 1719 1717 /* Now check for system interface capabilities */ 1720 1718 msg[0] = IPMI_NETFN_APP_REQUEST << 2; ··· 2107 2085 { "dmi-ipmi-ssif", 0 }, 2108 2086 { } 2109 2087 }; 2088 + MODULE_DEVICE_TABLE(platform, ssif_plat_ids); 2110 2089 2111 2090 static struct platform_driver ipmi_driver = { 2112 2091 .driver = {