From owner-freebsd-mobile Tue May 4 1:33:48 1999 Delivered-To: freebsd-mobile@freebsd.org Received: from tasogare.imasy.or.jp (tasogare.imasy.or.jp [202.227.24.5]) by hub.freebsd.org (Postfix) with ESMTP id 1BD7314A2E for ; Tue, 4 May 1999 01:33:45 -0700 (PDT) (envelope-from iwasaki@jp.FreeBSD.org) Received: from localhost (ppp2.imasy.or.jp [202.227.24.12]) by tasogare.imasy.or.jp (8.9.3+3.2W/3.7W-tasogare/smtpfeed 1.00) with ESMTP id RAA11421; Tue, 4 May 1999 17:33:35 +0900 (JST) (envelope-from iwasaki@jp.FreeBSD.org) Message-Id: <199905040833.RAA11421@tasogare.imasy.or.jp> 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) In-Reply-To: Your message of "Mon, 3 May 1999 03:41:27 -0500 (CDT)" References: X-Mailer: Mew version 1.93 on Emacs 19.34 / Mule 2.3 (SUETSUMUHANA) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Tue, 04 May 1999 17:32:39 +0900 From: Mitsuru IWASAKI X-Dispatcher: imput version 980905(IM100) Lines: 83 Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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