From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 10 12:17:02 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 50F6737B401 for ; Sun, 10 Aug 2003 12:17:02 -0700 (PDT) Received: from mail.sandvine.com (sandvine.com [199.243.201.138]) by mx1.FreeBSD.org (Postfix) with ESMTP id 93D2043FB1 for ; Sun, 10 Aug 2003 12:17:01 -0700 (PDT) (envelope-from don@sandvine.com) Received: by mail.sandvine.com with Internet Mail Service (5.5.2653.19) id <305LH4AN>; Sun, 10 Aug 2003 15:17:00 -0400 Message-ID: From: Don Bowman To: Don Bowman , "'freebsd-hackers@freebsd.org'" Date: Sun, 10 Aug 2003 15:16:59 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" Subject: RE: hang in sio driver when interrupt occurs while in siocnputc() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Aug 2003 19:17:02 -0000 I propose this patch, which solves my issue. Comments? $ cvs diff -U3 sio.c Index: sio.c =================================================================== RCS file: /usr/cvs/src/sys/isa/Attic/sio.c,v retrieving revision 1.291.2.33.1000.4 diff -U3 -r1.291.2.33.1000.4 sio.c --- sio.c 13 May 2003 23:51:23 -0000 1.291.2.33.1000.4 +++ sio.c 10 Aug 2003 18:11:37 -0000 @@ -274,6 +274,7 @@ struct termios lt_in; /* should be in struct tty */ struct termios lt_out; + bool_t in_polled_mode; bool_t do_timestamp; bool_t do_dcd_timestamp; struct timeval timestamp; @@ -1985,6 +1986,10 @@ struct timecounter *tc; u_int count; + if (com->in_polled_mode) { + return; + } + int_ctl = inb(com->intr_ctl_port); int_ctl_new = int_ctl; @@ -3085,6 +3090,9 @@ sp->ier = inb(iobase + com_ier); outb(iobase + com_ier, 0); /* spltty() doesn't stop siointr() */ siocntxwait(iobase); + if (com_addr(comconsole)) { + (com_addr(comconsole))->in_polled_mode = TRUE; + } sp->cfcr = inb(iobase + com_cfcr); outb(iobase + com_cfcr, CFCR_DLAB | CFCR_8BITS); sp->dlbl = inb(iobase + com_dlbl); @@ -3132,6 +3140,9 @@ */ outb(iobase + com_mcr, sp->mcr | MCR_DTR | MCR_RTS); outb(iobase + com_ier, sp->ier); + if (com_addr(comconsole)) { + (com_addr(comconsole))->in_polled_mode = FALSE; + } } static void