Date: Sun, 10 Aug 2003 15:16:59 -0400 From: Don Bowman <don@sandvine.com> To: Don Bowman <don@sandvine.com>, "'freebsd-hackers@freebsd.org'" <freebsd-hackers@freebsd.org> Subject: RE: hang in sio driver when interrupt occurs while in siocnputc() Message-ID: <FE045D4D9F7AED4CBFF1B3B813C8533702742207@mail.sandvine.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?FE045D4D9F7AED4CBFF1B3B813C8533702742207>