Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic back date this file to version 1.155 which works ...



details:   https://anonhg.NetBSD.org/src/rev/0f067118c856
branches:  trunk
changeset: 467942:0f067118c856
user:      mrg <mrg%NetBSD.org@localhost>
date:      Wed Mar 31 12:44:04 1999 +0000

description:
back date this file to version 1.155 which works on the shark.

diffstat:

 sys/dev/ic/com.c |  27 +++++++++++++--------------
 1 files changed, 13 insertions(+), 14 deletions(-)

diffs (54 lines):

diff -r 8203973de115 -r 0f067118c856 sys/dev/ic/com.c
--- a/sys/dev/ic/com.c  Wed Mar 31 12:29:51 1999 +0000
+++ b/sys/dev/ic/com.c  Wed Mar 31 12:44:04 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: com.c,v 1.158 1999/03/29 13:40:41 mycroft Exp $        */
+/*     $NetBSD: com.c,v 1.159 1999/03/31 12:44:04 mrg Exp $    */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -223,10 +223,6 @@
 #define        COM_ISALIVE(sc) ((sc)->enabled != 0 && \
                         ISSET((sc)->sc_dev.dv_flags, DVF_ACTIVE))
 
-#define        BR      BUS_SPACE_BARRIER_READ
-#define        BW      BUS_SPACE_BARRIER_WRITE
-#define COM_BARRIER(t, h, f) bus_space_barrier((t), (h), 0, COM_NPORTS, (f))
-
 int
 comspeed(speed, frequency)
        long speed, frequency;
@@ -2174,21 +2170,24 @@
        int c;
 {
        int s = splserial();
+       u_char stat;
        int timo;
 
        /* wait for any pending transmission to finish */
-       timo = 1500;
-       while (!ISSET(bus_space_read_1(iot, ioh, com_lsr), LSR_TXRDY) && --timo)
-               delay(100);
+       timo = 50000;
+       while (!ISSET(stat = bus_space_read_1(iot, ioh, com_lsr), LSR_TXRDY)
+           && --timo)
+               ;
 
        bus_space_write_1(iot, ioh, com_data, c);
-       COM_BARRIER(iot, ioh, BR | BW);
+       /* wait for this transmission to complete */
+       timo = 1500000;
+       while (!ISSET(stat = bus_space_read_1(iot, ioh, com_lsr), LSR_TXRDY)
+           && --timo)
+               ;
 
-       /* wait for this transmission to complete */
-       timo = 15000;
-       while (!ISSET(bus_space_read_1(iot, ioh, com_lsr), LSR_TXRDY) && --timo)
-               delay(100);
-
+       /* clear any interrupts generated by this transmission */
+       stat = bus_space_read_1(iot, ioh, com_iir);
        splx(s);
 }
 



Home | Main Index | Thread Index | Old Index