diff options
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/cy/cy.c | 38 | ||||
-rw-r--r-- | sys/dev/cy/cy_isa.c | 38 | ||||
-rw-r--r-- | sys/dev/sio/sio.c | 60 |
3 files changed, 31 insertions, 105 deletions
diff --git a/sys/dev/cy/cy.c b/sys/dev/cy/cy.c index 65647d3..62a3598 100644 --- a/sys/dev/cy/cy.c +++ b/sys/dev/cy/cy.c @@ -27,7 +27,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: cy.c,v 1.49 1997/08/20 06:16:44 fsmp Exp $ + * $Id: cy.c,v 1.4 1997/08/30 01:23:40 smp Exp smp $ */ #include "cy.h" @@ -756,26 +756,22 @@ open_top: } disable_intr(); - COM_LOCK(); (void) inb(com->line_status_port); (void) inb(com->data_port); com->prev_modem_status = com->last_modem_status = inb(com->modem_status_port); outb(iobase + com_ier, IER_ERXRDY | IER_ETXRDY | IER_ERLS | IER_EMSC); - COM_UNLOCK(); enable_intr(); #else /* !0 */ /* XXX raise RTS too */ (void)commctl(com, TIOCM_DTR | TIOCM_RTS, DMSET); disable_intr(); - COM_LOCK(); com->prev_modem_status = com->last_modem_status = cd_inb(iobase, CD1400_MSVR2, com->cy_align); cd_outb(iobase, CD1400_SRER, com->cy_align, com->intr_enable = CD1400_SRER_MDMCH | CD1400_SRER_RXDATA); - COM_UNLOCK(); enable_intr(); #endif /* 0 */ /* @@ -877,9 +873,7 @@ comhardclose(com) outb(iobase + com_ier, 0); #else disable_intr(); - COM_LOCK(); cd_outb(iobase, CD1400_SRER, com->cy_align, com->intr_enable = 0); - COM_UNLOCK(); enable_intr(); #endif tp = com->tp; @@ -994,6 +988,8 @@ siointr(unit) int baseu, cyu, cy_align; u_char status; + MPINTR_LOCK(); /* XXX could this be placed down lower in the loop? */ + baseu = unit * CY_MAX_PORTS; cy_iobase = com_addr(baseu)->cy_iobase; cy_align = com_addr(baseu)->cy_align; @@ -1340,6 +1336,8 @@ cont: cd_outb(cy_iobase, CY_CLEAR_INTR, cy_align, 0); schedsofttty(); + + MPINTR_UNLOCK(); } #if 0 @@ -1537,7 +1535,6 @@ repeat: * loop. */ disable_intr(); - COM_LOCK(); incc = com->iptr - com->ibuf; com->iptr = com->ibuf; if (com->state & CS_CHECKMSR) { @@ -1545,7 +1542,6 @@ repeat: com->state &= ~CS_CHECKMSR; } com_events -= incc; - COM_UNLOCK(); enable_intr(); if (incc != 0) log(LOG_DEBUG, @@ -1561,7 +1557,6 @@ repeat: } else { buf = ibuf; disable_intr(); - COM_LOCK(); incc = com->iptr - buf; com_events -= incc; if (ibuf == com->ibuf1) @@ -1590,7 +1585,6 @@ repeat: cd_outb(iobase, CD1400_MSVR1, com->cy_align, com->mcr_image |= MCR_RTS); #endif - COM_UNLOCK(); enable_intr(); com->ibuf = ibuf; } @@ -1599,13 +1593,11 @@ repeat: u_char delta_modem_status; disable_intr(); - COM_LOCK(); delta_modem_status = com->last_modem_status ^ com->prev_modem_status; com->prev_modem_status = com->last_modem_status; com_events -= LOTS_OF_EVENTS; com->state &= ~CS_CHECKMSR; - COM_UNLOCK(); enable_intr(); if (delta_modem_status & MSR_DCD) (*linesw[tp->t_line].l_modem) @@ -1613,12 +1605,10 @@ repeat: } if (com->state & CS_ODONE) { disable_intr(); - COM_LOCK(); com_events -= LOTS_OF_EVENTS; com->state &= ~CS_ODONE; if (!(com->state & CS_BUSY)) com->tp->t_state &= ~TS_BUSY; - COM_UNLOCK(); enable_intr(); (*linesw[tp->t_line].l_start)(tp); } @@ -1961,7 +1951,6 @@ comparam(tp, t) * to change all atomically. */ disable_intr(); - COM_LOCK(); com->state &= ~CS_TTGO; if (!(tp->t_state & TS_TTSTOP)) @@ -2023,7 +2012,6 @@ comparam(tp, t) com->intr_enable &= ~CD1400_SRER_TXRDY); } - COM_UNLOCK(); enable_intr(); splx(s); comstart(tp); @@ -2053,7 +2041,6 @@ comstart(tp) #endif disable_intr(); - COM_LOCK(); cd_outb(iobase, CD1400_CAR, com->cy_align, unit & CD1400_CAR_CHAN); if (tp->t_state & TS_TTSTOP) { com->state &= ~CS_TTGO; @@ -2085,7 +2072,6 @@ comstart(tp) com->mcr_image |= MCR_RTS); #endif } - COM_UNLOCK(); enable_intr(); if (tp->t_state & (TS_TIMEOUT | TS_TTSTOP)) { splx(s); @@ -2105,7 +2091,6 @@ comstart(tp) com->obufs[0].l_next = NULL; com->obufs[0].l_queued = TRUE; disable_intr(); - COM_LOCK(); if (com->state & CS_BUSY) { qp = com->obufq.l_next; while ((next = qp->l_next) != NULL) @@ -2122,7 +2107,6 @@ comstart(tp) com->intr_enable |= CD1400_SRER_TXRDY); } - COM_UNLOCK(); enable_intr(); } if (tp->t_outq.c_cc != 0 && !com->obufs[1].l_queued) { @@ -2135,7 +2119,6 @@ comstart(tp) com->obufs[1].l_next = NULL; com->obufs[1].l_queued = TRUE; disable_intr(); - COM_LOCK(); if (com->state & CS_BUSY) { qp = com->obufq.l_next; while ((next = qp->l_next) != NULL) @@ -2152,7 +2135,6 @@ comstart(tp) com->intr_enable |= CD1400_SRER_TXRDY); } - COM_UNLOCK(); enable_intr(); } tp->t_state |= TS_BUSY; @@ -2163,10 +2145,8 @@ comstart(tp) #endif #if 0 disable_intr(); - COM_LOCK(); if (com->state >= (CS_BUSY | CS_TTGO)) siointr1(com); /* fake interrupt to start output */ - COM_UNLOCK(); enable_intr(); #endif ttwwakeup(tp); @@ -2182,7 +2162,6 @@ siostop(tp, rw) com = com_addr(DEV_TO_UNIT(tp->t_dev)); disable_intr(); - COM_LOCK(); if (rw & FWRITE) { com->obufs[0].l_queued = FALSE; com->obufs[1].l_queued = FALSE; @@ -2195,7 +2174,6 @@ siostop(tp, rw) com_events -= (com->iptr - com->ibuf); com->iptr = com->ibuf; } - COM_UNLOCK(); enable_intr(); comstart(tp); @@ -2266,7 +2244,6 @@ commctl(com, bits, how) if (bits & TIOCM_RTS) mcr |= MCR_RTS; disable_intr(); - COM_LOCK(); switch (how) { case DMSET: com->mcr_image = mcr; @@ -2284,7 +2261,6 @@ commctl(com, bits, how) cd_outb(iobase, CD1400_MSVR2, com->cy_align, mcr); break; } - COM_UNLOCK(); enable_intr(); return (0); } @@ -2347,9 +2323,7 @@ comwakeup(chan) if (com != NULL && (com->state >= (CS_BUSY | CS_TTGO) || com->poll)) { disable_intr(); - COM_LOCK(); siointr1(com); - COM_UNLOCK(); enable_intr(); } } @@ -2372,10 +2346,8 @@ comwakeup(chan) u_long total; disable_intr(); - COM_LOCK(); delta = com->delta_error_counts[errnum]; com->delta_error_counts[errnum] = 0; - COM_UNLOCK(); enable_intr(); if (delta == 0) continue; diff --git a/sys/dev/cy/cy_isa.c b/sys/dev/cy/cy_isa.c index 65647d3..62a3598 100644 --- a/sys/dev/cy/cy_isa.c +++ b/sys/dev/cy/cy_isa.c @@ -27,7 +27,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: cy.c,v 1.49 1997/08/20 06:16:44 fsmp Exp $ + * $Id: cy.c,v 1.4 1997/08/30 01:23:40 smp Exp smp $ */ #include "cy.h" @@ -756,26 +756,22 @@ open_top: } disable_intr(); - COM_LOCK(); (void) inb(com->line_status_port); (void) inb(com->data_port); com->prev_modem_status = com->last_modem_status = inb(com->modem_status_port); outb(iobase + com_ier, IER_ERXRDY | IER_ETXRDY | IER_ERLS | IER_EMSC); - COM_UNLOCK(); enable_intr(); #else /* !0 */ /* XXX raise RTS too */ (void)commctl(com, TIOCM_DTR | TIOCM_RTS, DMSET); disable_intr(); - COM_LOCK(); com->prev_modem_status = com->last_modem_status = cd_inb(iobase, CD1400_MSVR2, com->cy_align); cd_outb(iobase, CD1400_SRER, com->cy_align, com->intr_enable = CD1400_SRER_MDMCH | CD1400_SRER_RXDATA); - COM_UNLOCK(); enable_intr(); #endif /* 0 */ /* @@ -877,9 +873,7 @@ comhardclose(com) outb(iobase + com_ier, 0); #else disable_intr(); - COM_LOCK(); cd_outb(iobase, CD1400_SRER, com->cy_align, com->intr_enable = 0); - COM_UNLOCK(); enable_intr(); #endif tp = com->tp; @@ -994,6 +988,8 @@ siointr(unit) int baseu, cyu, cy_align; u_char status; + MPINTR_LOCK(); /* XXX could this be placed down lower in the loop? */ + baseu = unit * CY_MAX_PORTS; cy_iobase = com_addr(baseu)->cy_iobase; cy_align = com_addr(baseu)->cy_align; @@ -1340,6 +1336,8 @@ cont: cd_outb(cy_iobase, CY_CLEAR_INTR, cy_align, 0); schedsofttty(); + + MPINTR_UNLOCK(); } #if 0 @@ -1537,7 +1535,6 @@ repeat: * loop. */ disable_intr(); - COM_LOCK(); incc = com->iptr - com->ibuf; com->iptr = com->ibuf; if (com->state & CS_CHECKMSR) { @@ -1545,7 +1542,6 @@ repeat: com->state &= ~CS_CHECKMSR; } com_events -= incc; - COM_UNLOCK(); enable_intr(); if (incc != 0) log(LOG_DEBUG, @@ -1561,7 +1557,6 @@ repeat: } else { buf = ibuf; disable_intr(); - COM_LOCK(); incc = com->iptr - buf; com_events -= incc; if (ibuf == com->ibuf1) @@ -1590,7 +1585,6 @@ repeat: cd_outb(iobase, CD1400_MSVR1, com->cy_align, com->mcr_image |= MCR_RTS); #endif - COM_UNLOCK(); enable_intr(); com->ibuf = ibuf; } @@ -1599,13 +1593,11 @@ repeat: u_char delta_modem_status; disable_intr(); - COM_LOCK(); delta_modem_status = com->last_modem_status ^ com->prev_modem_status; com->prev_modem_status = com->last_modem_status; com_events -= LOTS_OF_EVENTS; com->state &= ~CS_CHECKMSR; - COM_UNLOCK(); enable_intr(); if (delta_modem_status & MSR_DCD) (*linesw[tp->t_line].l_modem) @@ -1613,12 +1605,10 @@ repeat: } if (com->state & CS_ODONE) { disable_intr(); - COM_LOCK(); com_events -= LOTS_OF_EVENTS; com->state &= ~CS_ODONE; if (!(com->state & CS_BUSY)) com->tp->t_state &= ~TS_BUSY; - COM_UNLOCK(); enable_intr(); (*linesw[tp->t_line].l_start)(tp); } @@ -1961,7 +1951,6 @@ comparam(tp, t) * to change all atomically. */ disable_intr(); - COM_LOCK(); com->state &= ~CS_TTGO; if (!(tp->t_state & TS_TTSTOP)) @@ -2023,7 +2012,6 @@ comparam(tp, t) com->intr_enable &= ~CD1400_SRER_TXRDY); } - COM_UNLOCK(); enable_intr(); splx(s); comstart(tp); @@ -2053,7 +2041,6 @@ comstart(tp) #endif disable_intr(); - COM_LOCK(); cd_outb(iobase, CD1400_CAR, com->cy_align, unit & CD1400_CAR_CHAN); if (tp->t_state & TS_TTSTOP) { com->state &= ~CS_TTGO; @@ -2085,7 +2072,6 @@ comstart(tp) com->mcr_image |= MCR_RTS); #endif } - COM_UNLOCK(); enable_intr(); if (tp->t_state & (TS_TIMEOUT | TS_TTSTOP)) { splx(s); @@ -2105,7 +2091,6 @@ comstart(tp) com->obufs[0].l_next = NULL; com->obufs[0].l_queued = TRUE; disable_intr(); - COM_LOCK(); if (com->state & CS_BUSY) { qp = com->obufq.l_next; while ((next = qp->l_next) != NULL) @@ -2122,7 +2107,6 @@ comstart(tp) com->intr_enable |= CD1400_SRER_TXRDY); } - COM_UNLOCK(); enable_intr(); } if (tp->t_outq.c_cc != 0 && !com->obufs[1].l_queued) { @@ -2135,7 +2119,6 @@ comstart(tp) com->obufs[1].l_next = NULL; com->obufs[1].l_queued = TRUE; disable_intr(); - COM_LOCK(); if (com->state & CS_BUSY) { qp = com->obufq.l_next; while ((next = qp->l_next) != NULL) @@ -2152,7 +2135,6 @@ comstart(tp) com->intr_enable |= CD1400_SRER_TXRDY); } - COM_UNLOCK(); enable_intr(); } tp->t_state |= TS_BUSY; @@ -2163,10 +2145,8 @@ comstart(tp) #endif #if 0 disable_intr(); - COM_LOCK(); if (com->state >= (CS_BUSY | CS_TTGO)) siointr1(com); /* fake interrupt to start output */ - COM_UNLOCK(); enable_intr(); #endif ttwwakeup(tp); @@ -2182,7 +2162,6 @@ siostop(tp, rw) com = com_addr(DEV_TO_UNIT(tp->t_dev)); disable_intr(); - COM_LOCK(); if (rw & FWRITE) { com->obufs[0].l_queued = FALSE; com->obufs[1].l_queued = FALSE; @@ -2195,7 +2174,6 @@ siostop(tp, rw) com_events -= (com->iptr - com->ibuf); com->iptr = com->ibuf; } - COM_UNLOCK(); enable_intr(); comstart(tp); @@ -2266,7 +2244,6 @@ commctl(com, bits, how) if (bits & TIOCM_RTS) mcr |= MCR_RTS; disable_intr(); - COM_LOCK(); switch (how) { case DMSET: com->mcr_image = mcr; @@ -2284,7 +2261,6 @@ commctl(com, bits, how) cd_outb(iobase, CD1400_MSVR2, com->cy_align, mcr); break; } - COM_UNLOCK(); enable_intr(); return (0); } @@ -2347,9 +2323,7 @@ comwakeup(chan) if (com != NULL && (com->state >= (CS_BUSY | CS_TTGO) || com->poll)) { disable_intr(); - COM_LOCK(); siointr1(com); - COM_UNLOCK(); enable_intr(); } } @@ -2372,10 +2346,8 @@ comwakeup(chan) u_long total; disable_intr(); - COM_LOCK(); delta = com->delta_error_counts[errnum]; com->delta_error_counts[errnum] = 0; - COM_UNLOCK(); enable_intr(); if (delta == 0) continue; diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index 62300b6..7555e2f 100644 --- a/sys/dev/sio/sio.c +++ b/sys/dev/sio/sio.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)com.c 7.5 (Berkeley) 5/16/91 - * $Id: sio.c,v 1.5 1997/08/21 06:08:45 smp Exp smp $ + * $Id: sio.c,v 1.8 1997/08/30 01:23:40 smp Exp smp $ */ #include "opt_comconsole.h" @@ -65,6 +65,11 @@ #endif #include <machine/clock.h> +#ifdef SMP +#include <machine/smp.h> +#else +#define POSTCODE_HI(X) +#endif #include <i386/isa/isa.h> #include <i386/isa/isa_device.h> @@ -559,11 +564,11 @@ static int card_intr(struct pccard_dev *dp) { struct com_s *com; - COM_LOCK(); + MPINTR_LOCK(); com = com_addr(dp->isahd.id_unit); if (com && !com_addr(dp->isahd.id_unit)->gone) siointr1(com_addr(dp->isahd.id_unit)); - COM_UNLOCK(); + MPINTR_UNLOCK(); return(1); } #endif /* NCRD > 0 */ @@ -644,7 +649,9 @@ sioprobe(dev) * but mask them in the processor as well in case there are some * (misconfigured) shared interrupts. */ + POSTCODE_HI(0x8); disable_intr(); + POSTCODE_HI(0x9); /* EXTRA DELAY? */ /* @@ -750,7 +757,9 @@ sioprobe(dev) failures[8] = isa_irq_pending(idev) ? 1 : 0; failures[9] = (inb(iobase + com_iir) & IIR_IMASK) - IIR_NOPEND; + POSTCODE_HI(0xa); enable_intr(); + POSTCODE_HI(0xb); result = IO_COMSIZE; for (fn = 0; fn < sizeof failures; ++fn) @@ -1185,14 +1194,12 @@ open_top: } disable_intr(); - COM_LOCK(); (void) inb(com->line_status_port); (void) inb(com->data_port); com->prev_modem_status = com->last_modem_status = inb(com->modem_status_port); outb(iobase + com_ier, IER_ERXRDY | IER_ETXRDY | IER_ERLS | IER_EMSC); - COM_UNLOCK(); enable_intr(); /* * Handle initial DCD. Callout devices get a fake initial @@ -1421,9 +1428,9 @@ siointr(unit) int unit; { #ifndef COM_MULTIPORT - COM_LOCK(); + MPINTR_LOCK(); siointr1(com_addr(unit)); - COM_UNLOCK(); + MPINTR_UNLOCK(); #else /* COM_MULTIPORT */ struct com_s *com; bool_t possibly_more_intrs; @@ -1435,11 +1442,15 @@ siointr(unit) * devices, then the edge from one may be lost because another is * on. */ - COM_LOCK(); + MPINTR_LOCK(); do { possibly_more_intrs = FALSE; for (unit = 0; unit < NSIO; ++unit) { com = com_addr(unit); + /* + * XXX MPINTR_LOCK(); + * would it work here, or be counter-productive? + */ if (com != NULL && !com->gone && (inb(com->int_id_port) & IIR_IMASK) @@ -1447,9 +1458,10 @@ siointr(unit) siointr1(com); possibly_more_intrs = TRUE; } + /* XXX MPINTR_UNLOCK(); */ } } while (possibly_more_intrs); - COM_UNLOCK(); + MPINTR_UNLOCK(); #endif /* COM_MULTIPORT */ } @@ -1829,7 +1841,6 @@ repeat: * loop. */ disable_intr(); - COM_LOCK(); incc = com->iptr - com->ibuf; com->iptr = com->ibuf; if (com->state & CS_CHECKMSR) { @@ -1837,7 +1848,6 @@ repeat: com->state &= ~CS_CHECKMSR; } com_events -= incc; - COM_UNLOCK(); enable_intr(); if (incc != 0) log(LOG_DEBUG, @@ -1853,7 +1863,6 @@ repeat: } else { buf = ibuf; disable_intr(); - COM_LOCK(); incc = com->iptr - buf; com_events -= incc; if (ibuf == com->ibuf1) @@ -1874,7 +1883,6 @@ repeat: && !(tp->t_state & TS_TBLOCK)) outb(com->modem_ctl_port, com->mcr_image |= MCR_RTS); - COM_UNLOCK(); enable_intr(); com->ibuf = ibuf; } @@ -1883,13 +1891,11 @@ repeat: u_char delta_modem_status; disable_intr(); - COM_LOCK(); delta_modem_status = com->last_modem_status ^ com->prev_modem_status; com->prev_modem_status = com->last_modem_status; com_events -= LOTS_OF_EVENTS; com->state &= ~CS_CHECKMSR; - COM_UNLOCK(); enable_intr(); if (delta_modem_status & MSR_DCD) (*linesw[tp->t_line].l_modem) @@ -1897,10 +1903,8 @@ repeat: } if (com->state & CS_ODONE) { disable_intr(); - COM_LOCK(); com_events -= LOTS_OF_EVENTS; com->state &= ~CS_ODONE; - COM_UNLOCK(); enable_intr(); if (!(com->state & CS_BUSY) && !(com->extra_state & CSE_BUSYCHECK)) { @@ -2056,11 +2060,9 @@ comparam(tp, t) * error bits, but that is acceptable here. */ disable_intr(); - COM_LOCK(); retry: com->state &= ~CS_TTGO; txtimeout = tp->t_timeout; - COM_UNLOCK(); enable_intr(); while ((inb(com->line_status_port) & (LSR_TSRE | LSR_TXRDY)) != (LSR_TSRE | LSR_TXRDY)) { @@ -2077,9 +2079,7 @@ retry: if (error != 0 && error != EAGAIN) { if (!(tp->t_state & TS_TTSTOP)) { disable_intr(); - COM_LOCK(); com->state |= CS_TTGO; - COM_UNLOCK(); enable_intr(); } splx(s); @@ -2088,7 +2088,6 @@ retry: } disable_intr(); /* very important while com_data is hidden */ - COM_LOCK(); /* * XXX - clearing CS_TTGO is not sufficient to stop further output, @@ -2184,7 +2183,6 @@ retry: if (com->state >= (CS_BUSY | CS_TTGO)) siointr1(com); - COM_UNLOCK(); enable_intr(); splx(s); comstart(tp); @@ -2203,7 +2201,6 @@ comstart(tp) com = com_addr(unit); s = spltty(); disable_intr(); - COM_LOCK(); if (tp->t_state & TS_TTSTOP) com->state &= ~CS_TTGO; else @@ -2216,7 +2213,6 @@ comstart(tp) && com->state & CS_RTS_IFLOW) outb(com->modem_ctl_port, com->mcr_image |= MCR_RTS); } - COM_UNLOCK(); enable_intr(); if (tp->t_state & (TS_TIMEOUT | TS_TTSTOP)) { splx(s); @@ -2233,7 +2229,6 @@ comstart(tp) com->obufs[0].l_next = NULL; com->obufs[0].l_queued = TRUE; disable_intr(); - COM_LOCK(); if (com->state & CS_BUSY) { qp = com->obufq.l_next; while ((next = qp->l_next) != NULL) @@ -2245,7 +2240,6 @@ comstart(tp) com->obufq.l_next = &com->obufs[0]; com->state |= CS_BUSY; } - COM_UNLOCK(); enable_intr(); } if (tp->t_outq.c_cc != 0 && !com->obufs[1].l_queued) { @@ -2255,7 +2249,6 @@ comstart(tp) com->obufs[1].l_next = NULL; com->obufs[1].l_queued = TRUE; disable_intr(); - COM_LOCK(); if (com->state & CS_BUSY) { qp = com->obufq.l_next; while ((next = qp->l_next) != NULL) @@ -2267,16 +2260,13 @@ comstart(tp) com->obufq.l_next = &com->obufs[1]; com->state |= CS_BUSY; } - COM_UNLOCK(); enable_intr(); } tp->t_state |= TS_BUSY; } disable_intr(); - COM_LOCK(); if (com->state >= (CS_BUSY | CS_TTGO)) siointr1(com); /* fake interrupt to start output */ - COM_UNLOCK(); enable_intr(); ttwwakeup(tp); splx(s); @@ -2293,7 +2283,6 @@ siostop(tp, rw) if (com->gone) return; disable_intr(); - COM_LOCK(); if (rw & FWRITE) { if (com->hasfifo) #ifdef COM_ESP @@ -2322,7 +2311,6 @@ siostop(tp, rw) com_events -= (com->iptr - com->ibuf); com->iptr = com->ibuf; } - COM_UNLOCK(); enable_intr(); comstart(tp); } @@ -2383,7 +2371,6 @@ commctl(com, bits, how) if (com->gone) return(0); disable_intr(); - COM_LOCK(); switch (how) { case DMSET: outb(com->modem_ctl_port, @@ -2396,7 +2383,6 @@ commctl(com, bits, how) outb(com->modem_ctl_port, com->mcr_image &= ~mcr); break; } - COM_UNLOCK(); enable_intr(); return (0); } @@ -2456,9 +2442,7 @@ comwakeup(chan) if (com != NULL && !com->gone && (com->state >= (CS_BUSY | CS_TTGO) || com->poll)) { disable_intr(); - COM_LOCK(); siointr1(com); - COM_UNLOCK(); enable_intr(); } } @@ -2482,10 +2466,8 @@ comwakeup(chan) u_long total; disable_intr(); - COM_LOCK(); delta = com->delta_error_counts[errnum]; com->delta_error_counts[errnum] = 0; - COM_UNLOCK(); enable_intr(); if (delta == 0) continue; |