Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 04 May 1999 17:32:39 +0900
From:      Mitsuru IWASAKI <iwasaki@jp.FreeBSD.org>
To:        freebsd-mobile@freebsd.org
Cc:        dcarmich@xnet.com, hosokawa@jp.freebsd.org, tung@turtle.ee.ncku.edu.tw, jedgar@fxp.dhs.org
Subject:   Re: PAO3 is the cause of my modem problems (it works with PAO-971211+2.2.5R and Slackware Linux v3.6)
Message-ID:  <199905040833.RAA11421@tasogare.imasy.or.jp>
In-Reply-To: Your message of "Mon, 3 May 1999 03:41:27 -0500 (CDT)" <Pine.BSF.4.05.9905030258390.289-100000@dcarmich.xnet.com>
References:  <Pine.BSF.4.05.9905030258390.289-100000@dcarmich.xnet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hello. My name is Iwasaki.
I noticed this problem on PAO3 few days before, and trying to fix it now.
It seems that the bugs in sioinit() and sioprobe() of 
sys/i386/isa/sio.c (PAO3).

sioinit():  In /etc/pccard.conf of PAO3, flags 0x40000 is specified by 
            digital communication cards entry.  For normal modems this 
            flags is not given.  However sioinit() always overrides 
            this flags to COM_C_NOPROBE (0x40000). (If COM_C_NOPROBE 
            bit is enabled, initialization procedue will be skipped 
            in sioprobe().)

sioprobe(): Code for device with COM_C_NOPROBE flags is duplicated.  
            I suspect that first one must be deleted because the 
            initialization procedue starts after this block.  

The following patch works well for me.  So far so good.
But I'm not sure this is correct solution because I don't have 
any digital communication cards which specified 0x40000 flags in
/etc/pccard.conf, and don't understand clearly why COM_C_NOPROBE
bit can be set in sioinit().

Can anyone test this patch or review it?

--- /usr/PAO3/src/sys/i386/isa/sio.c-	Mon May  3 15:20:37 1999
+++ /usr/PAO3/src/sys/i386/isa/sio.c	Mon May  3 22:41:38 1999
@@ -489,8 +489,16 @@
 	if (com_addr(unit))
 		return(EBUSY);
 
+#if 0
+	/*
+	 * XXX This line overrides device flags specified
+	 * in /etc/pccard.conf on COM_C_NOPROBE (0x40000).  
+	 * iwasaki@jp.FreeBSD.org
+	 */
+
 	/* It's already probed as serial by Upper */
 	devi->isahd.id_flags |= COM_C_NOPROBE; 
+#endif
 
 	/*
 	 * Probe the device. If a value is returned, the
@@ -652,37 +660,6 @@
 
 	bzero(failures, sizeof failures);
 	iobase = dev->id_iobase;
-
-    /*
-	 * It's a definitly Serial PCMCIA(16550A), but still be required
-	 * for IIR_TXRDY implementation ( Palido 321s, DC-1S... )
-	 */
-	if ( COM_NOPROBE(dev) ) {
-		/* Reading IIR register twice */
-		for ( fn = 0; fn < 2; fn ++ ) {
-			DELAY(10000);
-			failures[6] = inb(iobase + com_iir);
-		}
-		/* Check IIR_TXRDY clear ? */
-		result = IO_COMSIZE;
-		if ( failures[6] & IIR_TXRDY ) {
-			/* Nop, Double check with clearing IER */
-			outb(iobase + com_ier, 0);
-			if ( inb(iobase + com_iir) & IIR_NOPEND ) {
-				/* Ok. we're familia this gang */
-				dev->id_flags |= COM_C_IIR_TXRDYBUG; /* Set IIR_TXRDYBUG */
-			} else {
-				/* Unknow, Just omit this chip.. XXX*/
-				result = 0;
-			}
-		} else {
-			/* OK. this is well-known guys */
-			dev->id_flags &= ~COM_C_IIR_TXRDYBUG; /*Clear IIR_TXRDYBUG*/
-		}
-		outb(iobase + com_cfcr, CFCR_8BITS);
-		enable_intr();
-		return( result );
-	}
 
 	/*
 	 * We don't want to get actual interrupts, just masked ones.




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-mobile" in the body of the message




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