linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] ipmi: Reset response handler when failing to send the command
@ 2020-09-07 16:25 Markus Boehme
  2020-09-07 16:25 ` [PATCH 2/3] ipmi: Add timeout waiting for device GUID Markus Boehme
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Markus Boehme @ 2020-09-07 16:25 UTC (permalink / raw)
  To: Corey Minyard, openipmi-developer
  Cc: Arnd Bergmann, Greg Kroah-Hartman, linux-kernel,
	Stefan Nuernberger, SeongJae Park, Amit Shah, Markus Boehme

When failing to send a command we don't expect a response. Clear the
`null_user_handler` like is done in the success path.

Signed-off-by: Markus Boehme <markubo@amazon.com>
---
 drivers/char/ipmi/ipmi_msghandler.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
index 737c0b6..2b213c9 100644
--- a/drivers/char/ipmi/ipmi_msghandler.c
+++ b/drivers/char/ipmi/ipmi_msghandler.c
@@ -2433,7 +2433,7 @@ static int __get_device_id(struct ipmi_smi *intf, struct bmc_device *bmc)
 
 	rv = send_get_device_id_cmd(intf);
 	if (rv)
-		return rv;
+		goto out_reset_handler;
 
 	wait_event(intf->waitq, bmc->dyn_id_set != 2);
 
@@ -2443,6 +2443,7 @@ static int __get_device_id(struct ipmi_smi *intf, struct bmc_device *bmc)
 	/* dyn_id_set makes the id data available. */
 	smp_rmb();
 
+out_reset_handler:
 	intf->null_user_handler = NULL;
 
 	return rv;
@@ -3329,6 +3330,7 @@ static int __scan_channels(struct ipmi_smi *intf, struct ipmi_device_id *id)
 			dev_warn(intf->si_dev,
 				 "Error sending channel information for channel 0, %d\n",
 				 rv);
+			intf->null_user_handler = NULL;
 			return -EIO;
 		}
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-10-07 18:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-07 16:25 [PATCH 1/3] ipmi: Reset response handler when failing to send the command Markus Boehme
2020-09-07 16:25 ` [PATCH 2/3] ipmi: Add timeout waiting for device GUID Markus Boehme
2020-09-08  0:07   ` Corey Minyard
2020-09-07 16:25 ` [PATCH 3/3] ipmi: Add timeout waiting for channel information Markus Boehme
2020-09-08  0:34   ` Corey Minyard
2020-09-10 11:08     ` Boehme, Markus
2020-10-07 18:42       ` [Openipmi-developer] " Corey Minyard
2020-09-08  0:03 ` [PATCH 1/3] ipmi: Reset response handler when failing to send the command Corey Minyard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).