Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Sep 1996 03:45:07 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        freebsd-hackers@FreeBSD.org, housley@pr-comm.com
Subject:   Re: Problem with sio0
Message-ID:  <199609061745.DAA12014@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>I have a Compaq Contura 430C laptop.  On boot I get a message:
>
>sio0 not found at 0x3f8
>
>The computers BIOS, DOS/Windoze and OS/2 all are able to find it at 0x3f8
>with IRQ 4 and think it is a NS16550AF.  I modified 
>/usr/src/sys/i386/isa/sio.c to print the contents of the array "failures".  
>On boot all locations contained 0 except #5 and #8.  
>
>I would like to fix this problem.  I is there more testing I can do to help?
>I tried ignoring, commented out, the lines that set #5 & 8.  That caused 
>"65 events on a device without a tp" (basically).

In, -current, try increasing the delays.  I guess this would work because
the failure messages show that the expected interrupt arrived a little
late.  Also try the CFCR change in the enclosed diffs.

The delays somehow didn't make it into 2.1.5.  Try the enclosed patch
for 2.1.5.  It might work for earlier versions too.

Bruce

diff -c -2 -r1.99.4.3 sio.c
*** sio.c	1996/04/13 15:01:25	1.99.4.3
--- sio.c	1996/09/02 16:54:38
***************
*** 444,448 ****
  	 * We don't want to to wait long enough to drain at 2 bps.
  	 */
! 	outb(iobase + com_cfcr, CFCR_DLAB);
  	outb(iobase + com_dlbl, COMBRD(9600) & 0xff);
  	outb(iobase + com_dlbh, (u_int) COMBRD(9600) >> 8);
--- 619,623 ----
  	 * We don't want to to wait long enough to drain at 2 bps.
  	 */
! 	outb(iobase + com_cfcr, CFCR_DLAB | CFCR_8BITS);
  	outb(iobase + com_dlbl, COMBRD(9600) & 0xff);
  	outb(iobase + com_dlbh, (u_int) COMBRD(9600) >> 8);
***************
*** 507,513 ****
--- 682,690 ----
  	failures[1] = inb(iobase + com_ier) - IER_ETXRDY;
  	failures[2] = inb(iobase + com_mcr) - mcr_image;
+ 	DELAY(10000);		/* Some internal modems need this time */
  	if (idev->id_irq != 0)
  		failures[3] = isa_irq_pending(idev) ? 0 : 1;
  	failures[4] = (inb(iobase + com_iir) & IIR_IMASK) - IIR_TXRDY;
+ 	DELAY(1000);		/* XXX */
  	if (idev->id_irq != 0)
  		failures[5] = isa_irq_pending(idev) ? 1	: 0;
***************
*** 526,534 ****
  	outb(iobase + com_cfcr, CFCR_8BITS);	/* dummy to avoid bus echo */
  	failures[7] = inb(iobase + com_ier);
  	if (idev->id_irq != 0)
  		failures[8] = isa_irq_pending(idev) ? 1	: 0;
  	failures[9] = (inb(iobase + com_iir) & IIR_IMASK) - IIR_NOPEND;
  
  	outb(IO_ICU1 + 1, imen);	/* XXX */
  	enable_intr();
  
--- 703,712 ----
  	outb(iobase + com_cfcr, CFCR_8BITS);	/* dummy to avoid bus echo */
  	failures[7] = inb(iobase + com_ier);
+ 	DELAY(1000);		/* XXX */
  	if (idev->id_irq != 0)
  		failures[8] = isa_irq_pending(idev) ? 1	: 0;
  	failures[9] = (inb(iobase + com_iir) & IIR_IMASK) - IIR_NOPEND;
  
  	outb(IO_ICU1 + 1, imen);	/* XXX */
  	enable_intr();
  



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199609061745.DAA12014>