From owner-freebsd-mobile@FreeBSD.ORG Thu Apr 24 05:53:10 2003 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 80BB337B401 for ; Thu, 24 Apr 2003 05:53:10 -0700 (PDT) Received: from mta01-svc.ntlworld.com (mta01-svc.ntlworld.com [62.253.162.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3572443FAF for ; Thu, 24 Apr 2003 05:53:09 -0700 (PDT) (envelope-from scott@fishballoon.org) Received: from fishballoon.org ([81.104.195.199]) by mta01-svc.ntlworld.com (InterMail vM.4.01.03.37 201-229-121-137-20020806) with ESMTP id <20030424125307.OHSJ2283.mta01-svc.ntlworld.com@fishballoon.org>; Thu, 24 Apr 2003 13:53:07 +0100 Received: from tuatara.fishballoon.org (tuatara [192.168.1.6]) by fishballoon.org (8.12.8p1/8.12.8) with ESMTP id h3OCqQ4o037850; Thu, 24 Apr 2003 13:52:26 +0100 (BST) (envelope-from scott@tuatara.fishballoon.org) Received: (from scott@localhost) by tuatara.fishballoon.org (8.12.9/8.12.9/Submit) id h3OCqQC6090379; Thu, 24 Apr 2003 13:52:26 +0100 (BST) (envelope-from scott) Date: Thu, 24 Apr 2003 13:52:26 +0100 From: Scott Mitchell To: "M. Warner Losh" Message-ID: <20030424125226.GB89997@tuatara.fishballoon.org> References: <20030423220837.GD521@tuatara.fishballoon.org> <20030423.162614.23012781.imp@bsdimp.com> <20030423230906.GU572@tuatara.fishballoon.org> <20030423.212847.19952078.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030423.212847.19952078.imp@bsdimp.com> User-Agent: Mutt/1.4i X-Operating-System: FreeBSD 4.8-STABLE i386 cc: freebsd-mobile@freebsd.org Subject: Re: [PATCH] CE2 support added to xe driver X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Apr 2003 12:53:10 -0000 On Wed, Apr 23, 2003 at 09:28:47PM -0600, M. Warner Losh wrote: > Oh wait, looking at the CIS for the Xircom CreditCard Ethernet+Modem > 28.8, CEM28, 3.00 that I have shows that it is just a modem. > > Looking at the code: > > bus_space_write_1(bst, bsh, DINGO_ECOR, DINGO_ECOR_IRQ_LEVEL | > DINGO_ECOR_INT_ENABLE | > DINGO_ECOR_IOB_ENABLE | > DINGO_ECOR_ETH_ENABLE); > Set 0x800 to 0x47 (This looks a lot like MFC cards: Enable function, > enable I/O and enable IRQ, but the startup software writes 0x41) > ioport = bus_get_resource_start(dev, SYS_RES_IOPORT, sc->port_rid); > bus_space_write_1(bst, bsh, DINGO_EBAR0, ioport & 0xff); > bus_space_write_1(bst, bsh, DINGO_EBAR1, (ioport >> 8) & 0xff); > Set 0x80a and 0x80c to the ioport we want to use. This corresponds to > the I/O base registers in the standard. > > bus_space_write_1(bst, bsh, DINGO_DCOR0, DINGO_DCOR0_SF_INT); > 0x820 to 0x1 (enable function, if it follows the MFC) > bus_space_write_1(bst, bsh, DINGO_DCOR1, DINGO_DCOR1_INT_LEVEL | > DINGO_DCOR1_EEDIO); > 0x822 to 0xc (comments don't correspond to the standard meanings) > bus_space_write_1(bst, bsh, DINGO_DCOR2, 0x00); > bus_space_write_1(bst, bsh, DINGO_DCOR3, 0x00); > bus_space_write_1(bst, bsh, DINGO_DCOR4, 0x00); I'm hoping that something similar to this, along with an offset to the base address used in the XE_IN* and XE_OUT* macros, will be enough to get these cards working. They're really just earlier iterations of the Dingo (CEM56) hardware, so I'd expect a similar hack to be effective. The DINGO_DCOR* registers are Dingo-specific; I'll have to reread the Xircom docs to find out exactly what's going on there. Very likely that code will be redundant on the older cards. > CISTPL_DEVICE type=null speed=null > 01 02 00 ff > CISTPL_DEVICE_A type=null speed=null > 17 02 00 ff > CISTPL_VERS_1 > 15 34 04 01 58 69 72 63 6f 6d 00 43 72 65 64 69 > 74 43 61 72 64 20 45 74 68 65 72 6e 65 74 2b 4d > 6f 64 65 6d 20 32 38 2e 38 00 43 45 4d 32 38 00 > 33 2e 30 30 00 ff > >>> pccard0: CIS version PCCARD 2.0 or 2.1 > >>> pccard0: CIS info: Xircom, CreditCard Ethernet+Modem 28.8, CEM28, 3.00 > unhandled CISTPL 88 > 88 08 7f 31 3d 00 00 00 00 00 > >>> Vendor Specific tuple > unhandled CISTPL 89 > 89 08 04 06 00 80 c7 7f 31 3d > >>> Vendor Specific tuple Notice that the MAC address is for some reason in tuple 89 on this card (my CEM28 is exactly the same). Another quirk will be required there... Scott -- =========================================================================== Scott Mitchell | PGP Key ID | "Eagles may soar, but weasels Cambridge, England | 0x54B171B9 | don't get sucked into jet engines" scott at fishballoon.org | 0xAA775B8B | -- Anon