diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-04-27 11:07:18 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-04-27 11:07:18 -0700 |
commit | d91f6a7307d27eae7b954c82bebf55071914c3f2 (patch) | |
tree | e5723b4e8d38931a62e3851583347b24798614a5 | |
parent | fc2e58b8b7c94b8fe23977775550de00472f6a74 (diff) | |
parent | d08076678ce72140a40553d226f90d189fbe06d1 (diff) |
Merge tag 'for-linus-6.4-1' of https://github.com/cminyard/linux-ipmi
Pull IPMI updates from Corey Minyard:
"Minor bug fixes for the IPMI driver
There was a bug in the SSIF driver where in certain conditions it
could stop working.
Outside of that: spelling fixes, removing some dead code, re-adding a
missing statistic increment, and removal of register_sysctl_table()"
* tag 'for-linus-6.4-1' of https://github.com/cminyard/linux-ipmi:
ipmi:ssif: Drop if blocks with always false condition
ipmi: fix SSIF not responding under certain cond.
ipmi:ssif: Add send_retries increment
char:ipmi:Fix spelling mistake "asychronously" -> "asynchronously"
ipmi: simplify sysctl registration
ipmi: ASPEED_BT_IPMI_BMC: select REGMAP_MMIO instead of depending on it
-rw-r--r-- | drivers/char/ipmi/Kconfig | 3 | ||||
-rw-r--r-- | drivers/char/ipmi/ipmi_poweroff.c | 16 | ||||
-rw-r--r-- | drivers/char/ipmi/ipmi_ssif.c | 16 |
3 files changed, 9 insertions, 26 deletions
diff --git a/drivers/char/ipmi/Kconfig b/drivers/char/ipmi/Kconfig index b6c0d35fc1a5..f4adc6feb3b2 100644 --- a/drivers/char/ipmi/Kconfig +++ b/drivers/char/ipmi/Kconfig @@ -162,7 +162,8 @@ config IPMI_KCS_BMC_SERIO config ASPEED_BT_IPMI_BMC depends on ARCH_ASPEED || COMPILE_TEST - depends on REGMAP && REGMAP_MMIO && MFD_SYSCON + depends on MFD_SYSCON + select REGMAP_MMIO tristate "BT IPMI bmc driver" help Provides a driver for the BT (Block Transfer) IPMI interface diff --git a/drivers/char/ipmi/ipmi_poweroff.c b/drivers/char/ipmi/ipmi_poweroff.c index 163ec9749e55..870659d91db2 100644 --- a/drivers/char/ipmi/ipmi_poweroff.c +++ b/drivers/char/ipmi/ipmi_poweroff.c @@ -659,20 +659,6 @@ static struct ctl_table ipmi_table[] = { { } }; -static struct ctl_table ipmi_dir_table[] = { - { .procname = "ipmi", - .mode = 0555, - .child = ipmi_table }, - { } -}; - -static struct ctl_table ipmi_root_table[] = { - { .procname = "dev", - .mode = 0555, - .child = ipmi_dir_table }, - { } -}; - static struct ctl_table_header *ipmi_table_header; #endif /* CONFIG_PROC_FS */ @@ -689,7 +675,7 @@ static int __init ipmi_poweroff_init(void) pr_info("Power cycle is enabled\n"); #ifdef CONFIG_PROC_FS - ipmi_table_header = register_sysctl_table(ipmi_root_table); + ipmi_table_header = register_sysctl("dev/ipmi", ipmi_table); if (!ipmi_table_header) { pr_err("Unable to register powercycle sysctl\n"); rv = -ENOMEM; diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c index a5ddebb1edea..3b921c78ba08 100644 --- a/drivers/char/ipmi/ipmi_ssif.c +++ b/drivers/char/ipmi/ipmi_ssif.c @@ -557,8 +557,10 @@ static void retry_timeout(struct timer_list *t) if (waiting) start_get(ssif_info); - if (resend) + if (resend) { start_resend(ssif_info); + ssif_inc_stat(ssif_info, send_retries); + } } static void watch_timeout(struct timer_list *t) @@ -784,9 +786,9 @@ static void msg_done_handler(struct ssif_info *ssif_info, int result, } else if (data[0] != (IPMI_NETFN_APP_REQUEST | 1) << 2 || data[1] != IPMI_GET_MSG_FLAGS_CMD) { /* - * Don't abort here, maybe it was a queued - * response to a previous command. + * Recv error response, give up. */ + ssif_info->ssif_state = SSIF_IDLE; ipmi_ssif_unlock_cond(ssif_info, flags); dev_warn(&ssif_info->client->dev, "Invalid response getting flags: %x %x\n", @@ -1279,11 +1281,8 @@ static void ssif_remove(struct i2c_client *client) struct ssif_info *ssif_info = i2c_get_clientdata(client); struct ssif_addr_info *addr_info; - if (!ssif_info) - return; - /* - * After this point, we won't deliver anything asychronously + * After this point, we won't deliver anything asynchronously * to the message handler. We can unregister ourself. */ ipmi_unregister_smi(ssif_info->intf); @@ -2071,9 +2070,6 @@ static int ssif_platform_remove(struct platform_device *dev) { struct ssif_addr_info *addr_info = dev_get_drvdata(&dev->dev); - if (!addr_info) - return 0; - mutex_lock(&ssif_infos_mutex); list_del(&addr_info->link); kfree(addr_info); |