From owner-freebsd-mobile Thu Apr 19 15:39:42 2001 Delivered-To: freebsd-mobile@freebsd.org Received: from yog-sothoth.sgi.com (eugate.sgi.com [192.48.160.10]) by hub.freebsd.org (Postfix) with ESMTP id 641B637B423 for ; Thu, 19 Apr 2001 15:39:35 -0700 (PDT) (envelope-from gwk@hunter.munich.sgi.com) Received: from sgiger.munich.sgi.com (sgiger.munich.sgi.com [144.253.192.2]) by yog-sothoth.sgi.com (980305.SGI.8.8.8-aspam-6.2/980304.SGI-aspam-europe) via SMTP id AAA5976729; Fri, 20 Apr 2001 00:39:33 +0200 (CEST) mail_from (gwk@hunter.munich.sgi.com) Received: from cuckoo.munich.sgi.com (cuckoo.munich.sgi.com [144.253.192.109]) by sgiger.munich.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id AAA16738; Fri, 20 Apr 2001 00:38:28 +0200 Received: from hunter.munich.sgi.com ([192.26.53.179]) by cuckoo.munich.sgi.com (SGI-8.9.3/8.9.3) with ESMTP id AAA81296; Fri, 20 Apr 2001 00:38:25 +0200 (CEST) Received: (from gwk@localhost) by hunter.munich.sgi.com (8.11.3/8.11.3) id f3JMdJa01265; Fri, 20 Apr 2001 00:39:19 +0200 (CEST) (envelope-from gwk) Date: Fri, 20 Apr 2001 00:22:10 +0200 From: "Georg-W. Koltermann" To: Warner Losh Cc: mobile@freebsd.org Subject: Re: Cardbus status Message-ID: <20010420002209.A911@hunter.munich.sgi.com> Mail-Followup-To: Warner Losh , mobile@freebsd.org 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> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="bp/iNruPH9dso1Pn" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200103210328.f2L3StZ48205@billy-club.village.org>; from imp@village.org on Tue, Mar 20, 2001 at 08:28:55PM -0700 Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org --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