Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Apr 2001 00:22:10 +0200
From:      "Georg-W. Koltermann" <gwk@sgi.com>
To:        Warner Losh <imp@village.org>
Cc:        mobile@freebsd.org
Subject:   Re: Cardbus status
Message-ID:  <20010420002209.A911@hunter.munich.sgi.com>
In-Reply-To: <200103210328.f2L3StZ48205@billy-club.village.org>; from imp@village.org on Tue, Mar 20, 2001 at 08:28:55PM -0700
References:  <20010320121110.B912@hunter.munich.sgi.com> <20010319154450.A10084@hunter.munich.sgi.com> <200010220509.XAA44604@harmony.village.org> <20010319154450.A10084@hunter.munich.sgi.com> <200103200218.f2K2I4Z43387@billy-club.village.org> <20010320121110.B912@hunter.munich.sgi.com> <200103210328.f2L3StZ48205@billy-club.village.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--bp/iNruPH9dso1Pn
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Warner,

thanks for your help.  I have the modem part of my Xircom CBEM56G
working, coming in via this card right now.

In addition to the lines that you indicated I also had to
re-initialize the cfcr register to 8 bit mode, after the initial tests
have passed.  If I didn't do that, I got an error from the probe 0
test and the modem would not attach.

I've appended the complete patch to this mail.  Please commit if you
like, so others can benefit.

Thanks again,
Georg.
----------------------------------------------------------------------
Who in the world needs 2000 Windows?

On Tue, Mar 20, 2001 at 08:28:55PM -0700, Warner Losh wrote:
> In message <20010320121110.B912@hunter.munich.sgi.com> "Georg-W. Koltermann" writes:
> : OK, so maybe you could hint me at where to find those two lines..
> 
> The patch would look something like the following with XXXX replaced
> by the ID of the card.  Note, it also has an unrelated patch and
> doesn't do detach, but it would get you going.
> 
> Warner
> 
> 
> Index: sio.c
> ===================================================================
> RCS file: /home/imp/FreeBSD/CVS/src/sys/isa/sio.c,v
> retrieving revision 1.328
> diff -u -r1.328 sio.c
> +++ sio.c	2001/03/21 03:20:55
> @@ -555,6 +555,7 @@
>  		bus_release_resource(dev, SYS_RES_IOPORT, 0, com->ioportres);
>  	if (com->tp && (com->tp->t_state & TS_ISOPEN)) {
>  		device_printf(dev, "still open, forcing close\n");
> +		(*linesw[com->tp->t_line].l_close)(com->tp, 0);
>  		com->tp->t_gen++;
>  		ttyclose(com->tp);
>  		ttwakeup(com->tp);
> @@ -577,7 +578,8 @@
>  
>  static struct pci_ids pci_ids[] = {
>  	{ 0x100812b9, "3COM PCI FaxModem", 0x10 },
> -	{ 0x048011c1, "ActionTec 56k FAX PCI Modem", 0x14 },
> +	{ 0x048011c1, "Lucent kermit based PCI Modem", 0x14 },
> +	{ 0xXXXXXXXX, "Xircom Cardbus modem", 0x10 },
>  	{ 0x00000000, NULL, 0 }
>  };
>  
> @@ -3352,4 +3354,5 @@
>  #endif
>  #if NPCI > 0
>  DRIVER_MODULE(sio, pci, sio_pci_driver, sio_devclass, 0, 0);
> +DRIVER_MODULE(sio, cardbus, sio_pci_driver, sio_devclass, 0, 0);
>  #endif

--bp/iNruPH9dso1Pn
Content-Type: text/plain; charset=us-ascii
Content-Description: Patch to enable modem part of Xircom CBEM56G (Cardbus)
Content-Disposition: attachment; filename="sio.c.diff"

--- /home/hunter/gwk/sio.c.1.329	Thu Apr 19 22:47:43 2001
+++ sys/isa/sio.c	Thu Apr 19 23:00:22 2001
@@ -30,7 +30,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: /c/ncvs/src/sys/isa/sio.c,v 1.329 2001/03/26 12:40:58 phk Exp $
+ * $FreeBSD: src/sys/isa/sio.c,v 1.329 2001/03/26 12:40:58 phk Exp $
  *	from: @(#)com.c	7.5 (Berkeley) 5/16/91
  *	from: i386/isa sio.c,v 1.234
  */
@@ -554,6 +554,7 @@
 		bus_release_resource(dev, SYS_RES_IOPORT, 0, com->ioportres);
 	if (com->tp && (com->tp->t_state & TS_ISOPEN)) {
 		device_printf(dev, "still open, forcing close\n");
+		(*linesw[com->tp->t_line].l_close)(com->tp, 0);
 		com->tp->t_gen++;
 		ttyclose(com->tp);
 		ttwakeup(com->tp);
@@ -576,7 +577,8 @@
 
 static struct pci_ids pci_ids[] = {
 	{ 0x100812b9, "3COM PCI FaxModem", 0x10 },
-	{ 0x048011c1, "ActionTec 56k FAX PCI Modem", 0x14 },
+	{ 0x048011c1, "Lucent kermit based PCI Modem", 0x14 },
+	{ 0x0103115d, "Xircom Cardbus modem", 0x10 },
 	{ 0x00000000, NULL, 0 }
 };
 
@@ -925,6 +927,13 @@
 	sio_setreg(com, com_mcr, mcr_image);
 
 	/*
+	 * It seems my Xircom CBEM56G Cardbus modem wants to be reset
+	 * to 8 bits *again*, or else probe test 0 will fail.
+	 * gwk@sgi.com, 4/19/2001
+	 */
+	sio_setreg(com, com_cfcr, CFCR_8BITS);
+
+	/*
 	 * Some pcmcia cards have the "TXRDY bug", so we check everyone
 	 * for IIR_TXRDY implementation ( Palido 321s, DC-1S... )
 	 */
@@ -3351,4 +3360,5 @@
 #endif
 #if NPCI > 0
 DRIVER_MODULE(sio, pci, sio_pci_driver, sio_devclass, 0, 0);
+DRIVER_MODULE(sio, cardbus, sio_pci_driver, sio_devclass, 0, 0);
 #endif

--bp/iNruPH9dso1Pn--

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?20010420002209.A911>