From nobody  Tue Jan  7 13:16:19 1997
Received: (from nobody@localhost)
          by freefall.freebsd.org (8.8.4/8.8.4) id NAA11979;
          Tue, 7 Jan 1997 13:16:19 -0800 (PST)
Message-Id: <199701072116.NAA11979@freefall.freebsd.org>
Date: Tue, 7 Jan 1997 13:16:19 -0800 (PST)
From: pusateri@jnx.com
To: freebsd-gnats-submit@freebsd.org
Subject: PCMCIA support hangs input on non-PCMCIA serial ports
X-Send-Pr-Version: www-1.0

>Number:         2405
>Category:       kern
>Synopsis:       PCMCIA support hangs input on non-PCMCIA serial ports
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    nate
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan  7 13:20:00 PST 1997
>Closed-Date:    Sat Jan 11 09:41:44 PST 1997
>Last-Modified:  Sat Jan 11 09:43:41 PST 1997
>Originator:     Tom Pusateri
>Release:        2.2-961014-SNAP
>Organization:
Juniper Networks
>Environment:
>Description:
When I add the following lines to the kernel config file, the PCMCIA
serial port works (sio2) but the onboard serial port (sio1) no longer
works.
> controller    crd0
> controller    pcic0 at crd?
> controller    pcic1 at crd?
82a83
> device                sio2    at isa? port "IO_COM3" tty irq 11 vector siointr

The output to the onboard serial port works but input doesn't appear
to be accepted. It does appear to be transmitted correctly into the
serial port but remains buffered in the kernel.

If two machines are connected to each other using kermit, and a
backslash is typed on the machine with the broken kernel after
it has received data, the data is released from the buffer and
displayed.

If I recompile /sys/i386/isa/sio.c without PCMCIA support, the
onboard serial port works fine.
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->analyzed 
State-Changed-By: nate 
State-Changed-When: Tue Jan 7 13:48:16 PST 1997 
State-Changed-Why:  

This is a 'known' problem with the crd0 device, which by default uses 
IRQ3 (the same one used by sio1).  The solution is to be able to specify 
the IRQ on the config line and/or determine an unused IRQ after all the 
other devices have been probed.  I'm planning on getting to the problem 
this week sometime. 




Responsible-Changed-From-To: freebsd-bugs->nate 
Responsible-Changed-By: nate 
Responsible-Changed-When: Tue Jan 7 13:48:16 PST 1997 
Responsible-Changed-Why:  
My area. 
State-Changed-From-To: analyzed->feedback 
State-Changed-By: nate 
State-Changed-When: Wed Jan 8 12:41:13 PST 1997 
State-Changed-Why:  
Can you try out the following patch to see if it helps and get back to me? 

The comments about the ISA driver finding cards is pretty bogus, and by 
moving the pccard stuff after everyone else has a shot at grabbing 
interrupts should cause the PCIC controller to grab the *first* unused 
IRQ it can find, which now is truly going to be unused. 


Nate 
------- 
Index: autoconf.c 
=================================================================== 
RCS file: /home/CVS/src/sys/i386/i386/autoconf.c,v 
retrieving revision 1.59 
diff -c -r1.59 autoconf.c 
*** autoconf.c	1996/12/21 16:43:35	1.59 
--- autoconf.c	1997/01/08 20:40:48 
*************** 
*** 176,186 **** 
enable_intr(); 
INTREN(IRQ_SLAVE); 

- #if NCRD > 0 
- 	/* Before isa_configure to avoid ISA drivers finding our cards */ 
- 	pccard_configure(); 
- #endif 
-  
#if NEISA > 0 
eisa_configure(); 
#endif 
--- 176,181 ---- 
*************** 
*** 191,196 **** 
--- 186,195 ---- 

#if NISA > 0 
isa_configure(); 
+ #endif 
+  
+ #if NCRD > 0 
+ 	pccard_configure(); 
#endif 

if (setdumpdev(dumpdev) != 0) 


State-Changed-From-To: feedback->closed 
State-Changed-By: nate 
State-Changed-When: Sat Jan 11 09:41:44 PST 1997 
State-Changed-Why:  
Fix in autoconf.c rev. 1.60. 

The submitter writes: 
Thanks for the patch. That worked for me!  

Tom  
>Unformatted:
