Skip to content

Commit d91f6a7

Browse files
committed
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
2 parents fc2e58b + d080766 commit d91f6a7

File tree

3 files changed

+9
-26
lines changed

3 files changed

+9
-26
lines changed

drivers/char/ipmi/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,8 @@ config IPMI_KCS_BMC_SERIO
162162

163163
config ASPEED_BT_IPMI_BMC
164164
depends on ARCH_ASPEED || COMPILE_TEST
165-
depends on REGMAP && REGMAP_MMIO && MFD_SYSCON
165+
depends on MFD_SYSCON
166+
select REGMAP_MMIO
166167
tristate "BT IPMI bmc driver"
167168
help
168169
Provides a driver for the BT (Block Transfer) IPMI interface

drivers/char/ipmi/ipmi_poweroff.c

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -659,20 +659,6 @@ static struct ctl_table ipmi_table[] = {
659659
{ }
660660
};
661661

662-
static struct ctl_table ipmi_dir_table[] = {
663-
{ .procname = "ipmi",
664-
.mode = 0555,
665-
.child = ipmi_table },
666-
{ }
667-
};
668-
669-
static struct ctl_table ipmi_root_table[] = {
670-
{ .procname = "dev",
671-
.mode = 0555,
672-
.child = ipmi_dir_table },
673-
{ }
674-
};
675-
676662
static struct ctl_table_header *ipmi_table_header;
677663
#endif /* CONFIG_PROC_FS */
678664

@@ -689,7 +675,7 @@ static int __init ipmi_poweroff_init(void)
689675
pr_info("Power cycle is enabled\n");
690676

691677
#ifdef CONFIG_PROC_FS
692-
ipmi_table_header = register_sysctl_table(ipmi_root_table);
678+
ipmi_table_header = register_sysctl("dev/ipmi", ipmi_table);
693679
if (!ipmi_table_header) {
694680
pr_err("Unable to register powercycle sysctl\n");
695681
rv = -ENOMEM;

drivers/char/ipmi/ipmi_ssif.c

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -557,8 +557,10 @@ static void retry_timeout(struct timer_list *t)
557557

558558
if (waiting)
559559
start_get(ssif_info);
560-
if (resend)
560+
if (resend) {
561561
start_resend(ssif_info);
562+
ssif_inc_stat(ssif_info, send_retries);
563+
}
562564
}
563565

564566
static void watch_timeout(struct timer_list *t)
@@ -784,9 +786,9 @@ static void msg_done_handler(struct ssif_info *ssif_info, int result,
784786
} else if (data[0] != (IPMI_NETFN_APP_REQUEST | 1) << 2
785787
|| data[1] != IPMI_GET_MSG_FLAGS_CMD) {
786788
/*
787-
* Don't abort here, maybe it was a queued
788-
* response to a previous command.
789+
* Recv error response, give up.
789790
*/
791+
ssif_info->ssif_state = SSIF_IDLE;
790792
ipmi_ssif_unlock_cond(ssif_info, flags);
791793
dev_warn(&ssif_info->client->dev,
792794
"Invalid response getting flags: %x %x\n",
@@ -1279,11 +1281,8 @@ static void ssif_remove(struct i2c_client *client)
12791281
struct ssif_info *ssif_info = i2c_get_clientdata(client);
12801282
struct ssif_addr_info *addr_info;
12811283

1282-
if (!ssif_info)
1283-
return;
1284-
12851284
/*
1286-
* After this point, we won't deliver anything asychronously
1285+
* After this point, we won't deliver anything asynchronously
12871286
* to the message handler. We can unregister ourself.
12881287
*/
12891288
ipmi_unregister_smi(ssif_info->intf);
@@ -2071,9 +2070,6 @@ static int ssif_platform_remove(struct platform_device *dev)
20712070
{
20722071
struct ssif_addr_info *addr_info = dev_get_drvdata(&dev->dev);
20732072

2074-
if (!addr_info)
2075-
return 0;
2076-
20772073
mutex_lock(&ssif_infos_mutex);
20782074
list_del(&addr_info->link);
20792075
kfree(addr_info);

0 commit comments

Comments
 (0)