home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / MISC / NETWORK / DRIVERSS.ZIP / SLIP8250.NOT / text0000.txt < prev   
Encoding:
Text File  |  1991-01-29  |  4.1 KB  |  168 lines

  1. For what it's worth, the following patches seem to fix my problem.  I
  2. don't propose this as something that I'd actually want to give out to
  3. people, but it may give you an idea of what is going on.  I don't
  4. think the hardware is simply dropping the interrupt, because then KA9Q
  5. would fail also.  So I think it's a problem in SLIP8250, but I sure
  6. can't tell where.
  7.  
  8. *** slip8250.org    Mon Jan 28 22:09:36 1980
  9. --- slip8250.asm    Tue Jan 29 01:15:10 1980
  10. ***************
  11. *** 2,7
  12.   
  13.       include    defs.asm
  14.   
  15.   ;Ported from Phil Karn's asy.c and slip.c, a C-language driver for the IBM-PC
  16.   ;8250 by Russell Nelson.  Any bugs are due to Russell Nelson.
  17.   ;16550 support ruthlessly stolen from Phil Karn's 8250.c. Bugs by Denis DeLaRoca
  18.  
  19. --- 2,9 -----
  20.   
  21.       include    defs.asm
  22.   
  23. + debug = 1
  24.   ;Ported from Phil Karn's asy.c and slip.c, a C-language driver for the IBM-PC
  25.   ;8250 by Russell Nelson.  Any bugs are due to Russell Nelson.
  26.   ;16550 support ruthlessly stolen from Phil Karn's 8250.c. Bugs by Denis DeLaRoca
  27. ***************
  28. *** 151,157
  29.   recv_pkt_ready    dw    0        ; flag indicating a packet is ready
  30.   
  31.     ifdef debug
  32. !     public send_buf
  33.     endif
  34.   send_buf_size    dw    3000,0        ;send buffer size
  35.   send_buf    dw    ?        ;->send buffer
  36.  
  37. --- 153,159 -----
  38.   recv_pkt_ready    dw    0        ; flag indicating a packet is ready
  39.   
  40.     ifdef debug
  41. !     public send_buf, send_buf_end, send_buf_head, send_buf_tail
  42.     endif
  43.   send_buf_size    dw    3000,0        ;send buffer size
  44.   send_buf    dw    ?        ;->send buffer
  45. ***************
  46. *** 160,166
  47.   send_buf_tail    dw    ?        ;->next character to store
  48.   
  49.     ifdef debug
  50. !     public packet_sem, pkt_send_sem, xmit_time
  51.     endif
  52.   packet_sem    dw    0        ; semaphore for    packets received
  53.   pkt_send_sem    dw    0        ; semaphore for    packets xmitted
  54.  
  55. --- 162,168 -----
  56.   send_buf_tail    dw    ?        ;->next character to store
  57.   
  58.     ifdef debug
  59. !     public packet_sem, pkt_send_sem, xmit_time, send_keep, keep_failed
  60.     endif
  61.   packet_sem    dw    0        ; semaphore for    packets received
  62.   pkt_send_sem    dw    0        ; semaphore for    packets xmitted
  63. ***************
  64. *** 166,171
  65.   pkt_send_sem    dw    0        ; semaphore for    packets xmitted
  66.   asyrxint_cnt    dw    0        ; loop counter in asyrxint
  67.   xmit_time    dw    0        ; loop timer for asyrxint
  68.   
  69.       public    rcv_modes
  70.   rcv_modes    dw    4        ;number    of receive modes in our table.
  71.  
  72. --- 168,175 -----
  73.   pkt_send_sem    dw    0        ; semaphore for    packets xmitted
  74.   asyrxint_cnt    dw    0        ; loop counter in asyrxint
  75.   xmit_time    dw    0        ; loop timer for asyrxint
  76. + send_keep    dw    0        ; keepalive counter for send
  77. + keep_failed    dw    0        ; number of keepalive failures
  78.   
  79.       public    rcv_modes
  80.   rcv_modes    dw    4        ;number    of receive modes in our table.
  81. ***************
  82. *** 240,245
  83.       loop    send_pkt_1
  84.       mov    al,FR_END        ;terminate it with a FR_END
  85.       call    send_char
  86.       mov    send_buf_tail,di
  87.   
  88.       inc    pkt_send_sem        ; increment the semaphore
  89.  
  90. --- 244,252 -----
  91.       loop    send_pkt_1
  92.       mov    al,FR_END        ;terminate it with a FR_END
  93.       call    send_char
  94. +     cli
  95.       mov    send_buf_tail,di
  96.   
  97.       inc    send_keep        ; keepalive count
  98. ***************
  99. *** 242,247
  100.       call    send_char
  101.       mov    send_buf_tail,di
  102.   
  103.       inc    pkt_send_sem        ; increment the semaphore
  104.       cmp    pkt_send_sem, 1        ; see if we need to enable
  105.                       ; xmit buffer empty interrupt
  106.  
  107. --- 249,263 -----
  108.   
  109.       mov    send_buf_tail,di
  110.   
  111. +     inc    send_keep        ; keepalive count
  112. +     cmp    send_keep, 3        ; 3 packets without one xmt done
  113. +     jna    keep_ok
  114. + ; we seem to be hung, probably due to a dropped tx done int.  restart
  115. +     mov    pkt_send_sem, 0        ; indicate we're finished    
  116. +     inc    keep_failed        ; count errors
  117. + keep_ok:
  118.       inc    pkt_send_sem        ; increment the semaphore
  119.       cmp    pkt_send_sem, 1        ; see if we need to enable
  120.                       ; xmit buffer empty interrupt
  121. ***************
  122. *** 265,271
  123.       loadport
  124.       setport    IER
  125.       call    setbit            ; enable
  126. !     cli
  127.   send_pkt_end:
  128.       clc
  129.       ret
  130.  
  131. --- 281,292 -----
  132.       loadport
  133.       setport    IER
  134.       call    setbit            ; enable
  135. !     push ds
  136. !     push cs
  137. !     pop ds
  138. !     call    asytxint
  139. !     pop ds
  140.   send_pkt_end:
  141.       clc
  142.       ret
  143. ***************
  144. *** 668,673
  145.   ;
  146.   
  147.   asytxint:
  148.   
  149.   asytxint_2:
  150.   
  151.  
  152. --- 689,695 -----
  153.   ;
  154.   
  155.   asytxint:
  156. +     mov    send_keep, 0        ; restart keepalive
  157.   
  158.   asytxint_2:
  159.   
  160.  
  161.  
  162.