Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Dec 1996 22:34:14 PST
From:      fenner@parc.xerox.com
To:        freebsd-bugs@freebsd.org
Subject:   (fwd) <Synopsis of the problem (one line)>cy.c cyclades driver does not detect DCD drop on cuac* (mgetty)
Message-ID:  <96Dec1.223425pst.177711@crevenia.parc.xerox.com>

next in thread | raw e-mail | index | archive | help
>Number:         2127
>Category:       kern
>Synopsis:       cy.c cyclades driver does not detect DCD drop on cuac* (mgetty)
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 29 17:30:01 PST 1996
>Last-Modified:  Sun Dec  1 22:31:50 PST 1996
>Originator:     Julian Assange
>Organization:
>Release:        FreeBSD 3.0-CURRENT i386
>Environment:

	

Cyclades 16Ye PCI

>Description:

	

The cy.c driver does not detect DCD drop when using callout devices.
This is a problem for outgoing ppp connections and for mgetty, which
listens for modem RING's on cuac* rather than listening for a carrier
on ttyc*. It is also possible that DCD drops are not followed on ttyc*
(haven't tested). The problem is definately with the cy.c driver as an
otherwise identical configuration works without problem with
16550A ports and sio.c.

>How-To-Repeat:

	at&c1 (follow remote carrier)
	open line via /dev/cuac*
	make remote connection
	hang up remote modem.

	

>Fix:
	
	

I am unfamiliar with cy.c, but a few potential problems noted are (the unified diff marks are against sio.c):

-static void
-cd1400_channel_cmd(iobase, cmd, cy_align)
-       cy_addr iobase;
-       int     cmd;
-       int     cy_align;
-{
-       /* XXX hsu@clinet.fi: This is always more dependent on ISA bus speed,
-          as the card is probed every round?  Replaced delaycount with 8k.
-          Either delaycount has to be implemented in FreeBSD or more sensible
-          way of doing these should be implemented.  DELAY isn't enough here.
-          */
-       u_int   maxwait = 5 * 8 * 1024; /* approx. 5 ms */
+

-       /* wait for processing of previous command to complete */
-       while (cd_inb(iobase, CD1400_CCR, cy_align) && maxwait--)
-               ;
+

Timing is going to be considerably different on PCI vs ISA - however,
however if anything the delay/retry should be over forgiving in its
new (PCI) enviroment rather than the other way around.

In several places, sio.c has had variations on the following code
added:

+       if (com->gone)
+               return(0);
 
But com->gone is used to indicate a uart that has disappeared,
rather than a DCD drop.

There does not seem to be any great differences in the DCD or HUPCL code
between sio.c and cy.c, although there is lots for RTS/CTS. Perhaps there
is some interplay here I am not seeing.
>Audit-Trail:
Responsible-Changed-From-To: gnats-admin->freebsd-bugs 
Responsible-Changed-By: fenner 
Responsible-Changed-When: Sun Dec 1 22:31:17 PST 1996 
Responsible-Changed-Why:  
Submitter did not intend for PR to be confidential. 
>Unformatted:




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?96Dec1.223425pst.177711>