mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 06:01:57 +00:00
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. -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE/Q1c5nzg9ZpmiCaGYfOMkJGb/4EFAmbrSHIACgkQYfOMkJGb /4FzRA/+Kt2Yjp8er+Ap5fqGsRlRGjBOXcQFme3tB1fkM4iPOK9gbWt01YXD4XmX CQpsmUM6p1aSbWPxNmWuYQ7gyfxXCe7PujxlQ+H+g8sqRmYhd4Wgx7yI40vwyO8Y E71zzn7+C/OhbjYbT5Hfs/sEEYeMUgggTfuSRaVjqX86i7F3RnlR/SBcPkqneJDU UL/gCzzbTmDlTmfUsGo6rlXpe2GqZxlhWxoTrQ4YTG+AUT718iIhxR7QiwmYnIfA R8HWft/Rs7P3z+L3wYI0Gia/rdzFMRlLFF0njCr/ct73InV0yaG+Ie5UE6bQH1LC Eb87NcDP41I7bQXcZtAAwtm/EaVV80OxP8kSqsRT0Dw8745CNUEIbr62/j2oaRIK QO7ZQNCseweeth/ndW5mJuWXIe9h/U4f6ljoKDvxaMZ6euWgwKQ2Zvwz53rDs1h4 vgMQoEW9bDQqrjIsti9FfuqazniABaLccfcYuY2UO62URuKcT2WC9PQHjFxxO1Ne ZPM77JRkUvKAXA4Bh32LMgDCzbisAzGr3pC0y2TSpQxbJpYfphN5rav5AOUfCiFo fvLnYLCyaTWQwORI5k2d5zWqsfrutV01yI7Bhw+oqULXeIYrajTCM/tf24fhPqaC 8LShVQi9eabxXCEHKQuLRKbBJwvqP0f9JdKnI+h6GXtoUvcMa9M= =938Q -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
18aa0ddd4c
@ -540,7 +540,7 @@ at module load time (for a module) with::
|
||||
alerts_broken
|
||||
|
||||
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.
|
||||
name of the adapter, as shown in /sys/bus/i2c/devices/i2c-<n>/name.
|
||||
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
|
||||
|
@ -1368,8 +1368,20 @@ static int ssif_detect(struct i2c_client *client, struct i2c_board_info *info)
|
||||
rv = do_cmd(client, 2, msg, &len, resp);
|
||||
if (rv)
|
||||
rv = -ENODEV;
|
||||
else
|
||||
else {
|
||||
if (len < 3) {
|
||||
rv = -ENODEV;
|
||||
} else {
|
||||
struct ipmi_device_id id;
|
||||
|
||||
rv = ipmi_demangle_device_id(resp[0] >> 2, resp[1],
|
||||
resp + 2, len - 2, &id);
|
||||
if (rv)
|
||||
rv = -ENODEV; /* Error means a BMC probably isn't there. */
|
||||
}
|
||||
if (!rv && info)
|
||||
strscpy(info->type, DEVICE_NAME, I2C_NAME_SIZE);
|
||||
}
|
||||
kfree(resp);
|
||||
return rv;
|
||||
}
|
||||
@ -1704,6 +1716,16 @@ static int ssif_probe(struct i2c_client *client)
|
||||
ipmi_addr_src_to_str(ssif_info->addr_source),
|
||||
client->addr, client->adapter->name, slave_addr);
|
||||
|
||||
/*
|
||||
* Send a get device id command and validate its response to
|
||||
* make sure a valid BMC is there.
|
||||
*/
|
||||
rv = ssif_detect(client, NULL);
|
||||
if (rv) {
|
||||
dev_err(&client->dev, "Not present\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* Now check for system interface capabilities */
|
||||
msg[0] = IPMI_NETFN_APP_REQUEST << 2;
|
||||
msg[1] = IPMI_GET_SYSTEM_INTERFACE_CAPABILITIES_CMD;
|
||||
@ -2085,6 +2107,7 @@ static const struct platform_device_id ssif_plat_ids[] = {
|
||||
{ "dmi-ipmi-ssif", 0 },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(platform, ssif_plat_ids);
|
||||
|
||||
static struct platform_driver ipmi_driver = {
|
||||
.driver = {
|
||||
|
Loading…
Reference in New Issue
Block a user