NetBSD Problem Report #15448

Received: (qmail 1948 invoked from network); 31 Jan 2002 21:01:05 -0000
Message-Id: <20020131210139.C3BAA11110@www.netbsd.org>
Date: Thu, 31 Jan 2002 13:01:39 -0800 (PST)
From: wojtek@chylonia.3miasto.net
Sender: nobody@netbsd.org
Reply-To: wojtek@chylonia.3miasto.net
To: gnats-bugs@gnats.netbsd.org
Subject: com at isa can't cope well >230kbps
X-Send-Pr-Version: www-1.0

>Number:         15448
>Category:       kern
>Synopsis:       com at isa can't cope well >230kbps
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Jan 31 21:02:00 +0000 2002
>Closed-Date:    Sat Sep 23 01:57:34 +0000 2006
>Last-Modified:  Sat Sep 23 08:30:01 +0000 2006
>Originator:     Wojciech Puchar
>Release:        1.5.2
>Organization:
TENSOR ap
>Environment:
NetBSD router.posejdon.3miasto.net 1.5.2 NetBSD 1.5.2 (router.posejdon) #3: Thu Jan 31 21:40:44 CET 2002     root@chylonia.3miasto.net:/usr/src/sys/arch/i386/compile/router.posejdon i386

>Description:
ISA com driver con't cope with interrupt load on ISA based 16550A
cards with speed 460kbps or more (in contrast to 16650 based PCI
cards which works perfect)

>How-To-Repeat:
Use pppd on 460kbps link with ISA RS-232 card.
system works SLOOOOW and lots of silo overflows appear

It does not depend much of CPU speed (similar on 486/25 with slow
RAM and 486/80 with 60ns RAM and even on pentium)

>Fix:
it looks like original com code author though that on high speed
CPU reaction can be slow and he/she turns threshold lower on high
speed.

this patch turns this highest possible (at 14 of 16 bytes) as CPU
is enough fast to react, but this generates 14/4=3.5 times less
interrupts on ISA

however i did no test on REALLY slow machine (386SX).
maybe it should be option for this.


--- com.c.orig  Thu Jan 31 21:33:40 2002
+++ com.c       Thu Jan 31 21:40:16 2002
@@ -1414,7 +1414,8 @@
        else if (ISSET(sc->sc_hwflags, COM_HW_FIFO))
                sc->sc_fifo = FIFO_ENABLE |
                    (t->c_ospeed <= 1200 ? FIFO_TRIGGER_1 :
-                    t->c_ospeed <= 38400 ? FIFO_TRIGGER_8 : FIFO_TRIGGER_4);
+//                  t->c_ospeed <= 38400 ? FIFO_TRIGGER_8 : FIFO_TRIGGER_4);
+                    FIFO_TRIGGER_14);
        else
                sc->sc_fifo = 0;

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: kern-bug-people->mycroft 
Responsible-Changed-By: mycroft 
Responsible-Changed-When: Sun Jul 4 07:02:33 UTC 2004 
Responsible-Changed-Why:  
. 
State-Changed-From-To: open->feedback 
State-Changed-By: mycroft 
State-Changed-When: Sun Jul 4 08:09:16 UTC 2004 
State-Changed-Why:  
Incorporated a change similar to this in com.c 1.228. 

From: "Charles M. Hannum" <mycroft@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:  
Subject: pr/15448 CVS commit: src/sys/dev/ic
Date: Sun,  4 Jul 2004 08:09:03 +0000 (UTC)

 Module Name:	src
 Committed By:	mycroft
 Date:		Sun Jul  4 08:09:03 UTC 2004

 Modified Files:
 	src/sys/dev/ic: com.c

 Log Message:
 Incorporate 4 changes that have been suggested:
 * At high speed, set the FIFO trigger to the maximum value to reduce interrupt
   load.  PR 15448.
 * Handler the case of IIR=RXRDY and LSR=!LSR_RCV_MASK differently, to avoid a
   hang with some chips.  PR 21184, and possibly PR 10974 and PR 8248.
 * Remove the extra wait at the end of com_common_putc(), after writing a
   character out, so that we get another TXRDY interrupt.  This prevents stalls
   when normal output and kernel output are mixed.  PR 4263.
 * Do not "preload" the TX FIFO; wait for a TXRDY interrupt to come in after
   enabling it.


 To generate a diff of this commit:
 cvs rdiff -r1.227 -r1.228 src/sys/dev/ic/com.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.


From: Havard Eidnes <he@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:  
Subject: pr/15448 CVS commit: [netbsd-2-0] src/sys/dev/ic
Date: Mon,  5 Jul 2004 21:57:46 +0000 (UTC)

 Module Name:	src
 Committed By:	he
 Date:		Mon Jul  5 21:57:45 UTC 2004

 Modified Files:
 	src/sys/dev/ic [netbsd-2-0]: com.c

 Log Message:
 Pull up revisions 1.228-1.230 (requested by mycroft in ticket #603):
   Incorporate 4 changes:
    o At high speed, set the FIFO trigger to a higher
      value to reduce interrupt load.  Fixes PR#15448.
    o Handle the case of IIR=RXRDY and LSR=!LSR_RCV_MASK
      differently, to avoid a hang with some chips.  Fixes
      PR#21184, and possibly PR#10974 and PR#8248.
    o Remove the extra wait at the end of com_common_putc(),
      after writing a character out, so that we get another
      TXRDY interrupt.  This prevents stalls when normal
      output and kernel output are mixed.  Fixes PR#4263.
    o Do not ``preload'' the TX FIFO; wait for a TXRDY
      interrupt to come in after enabling it.


 To generate a diff of this commit:
 cvs rdiff -r1.224.2.1 -r1.224.2.2 src/sys/dev/ic/com.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

Responsible-Changed-From-To: mycroft->kern-bug-people
Responsible-Changed-By: wiz@netbsd.org
Responsible-Changed-When: Sun, 03 Sep 2006 01:13:32 +0000
Responsible-Changed-Why:
Back to role account, mycroft doesn't have commit access any longer.


State-Changed-From-To: feedback->closed
State-Changed-By: jmcneill@netbsd.org
State-Changed-When: Sat, 23 Sep 2006 01:57:34 +0000
State-Changed-Why:
Feedback timeout; the issue should be fixed now, though.


From: David Laight <david@l8s.co.uk>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/15448 (com at isa can't cope well >230kbps)
Date: Sat, 23 Sep 2006 09:25:41 +0100

 On Sat, Sep 23, 2006 at 01:57:36AM +0000, jmcneill@netbsd.org wrote:
 > Synopsis: com at isa can't cope well >230kbps
 > 
 > State-Changed-From-To: feedback->closed
 > State-Changed-By: jmcneill@netbsd.org
 > State-Changed-When: Sat, 23 Sep 2006 01:57:34 +0000
 > State-Changed-Why:
 > Feedback timeout; the issue should be fixed now, though.

 I doubt that anything has actually changed since the problem is (probably)
 one of interrupt latency, FIFO size and the shere (lack of) speed of
 the ISA bus.

 I actually suspect thing are getting worse!

 OTOH keeping the PR open is rather pointless!

 	David

 -- 
 David Laight: david@l8s.co.uk

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.