From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59605) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebFZv-0007sW-E2 for qemu-devel@nongnu.org; Mon, 15 Jan 2018 19:58:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebFZu-0000mg-Hz for qemu-devel@nongnu.org; Mon, 15 Jan 2018 19:58:15 -0500 Received: from mail-ot0-x244.google.com ([2607:f8b0:4003:c0f::244]:36513) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ebFZu-0000mE-CP for qemu-devel@nongnu.org; Mon, 15 Jan 2018 19:58:14 -0500 Received: by mail-ot0-x244.google.com with SMTP id w4so12197186otg.3 for ; Mon, 15 Jan 2018 16:58:14 -0800 (PST) Sender: Corey Minyard From: minyard@acm.org Date: Mon, 15 Jan 2018 18:57:58 -0600 Message-Id: <1516064279-14816-7-git-send-email-minyard@acm.org> In-Reply-To: <1516064279-14816-1-git-send-email-minyard@acm.org> References: <1516064279-14816-1-git-send-email-minyard@acm.org> Subject: [Qemu-devel] [PATCH 6/7] ipmi: disable IRQ and ATN on an external disconnect List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Eric Blake , Corey Minyard From: Corey Minyard Otherwise there's no way to clear them without an external command, and it could lock the OS in the VM if they were stuck. Signed-off-by: Corey Minyard --- hw/ipmi/ipmi_bmc_extern.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/ipmi/ipmi_bmc_extern.c b/hw/ipmi/ipmi_bmc_extern.c index abab3bb..58ade79 100644 --- a/hw/ipmi/ipmi_bmc_extern.c +++ b/hw/ipmi/ipmi_bmc_extern.c @@ -424,6 +424,11 @@ static void chr_event(void *opaque, int event) return; } ibe->connected = false; + /* + * Don't hang the OS trying to handle the ATN bit, other end will + * resend on a reconnect. + */ + k->set_atn(s, 0, 0); if (ibe->waiting_rsp) { ibe->waiting_rsp = false; ibe->inbuf[1] = ibe->outbuf[1] | 0x04; -- 2.7.4