From owner-freebsd-mobile Tue Nov 10 02:49:24 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id CAA08175 for freebsd-mobile-outgoing; Tue, 10 Nov 1998 02:49:24 -0800 (PST) (envelope-from owner-freebsd-mobile@FreeBSD.ORG) Received: from hotpoint.dcs.qmw.ac.uk (hotpoint.dcs.qmw.ac.uk [138.37.88.162]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id CAA08160 for ; Tue, 10 Nov 1998 02:49:03 -0800 (PST) (envelope-from scott@dcs.qmw.ac.uk) Received: from brunos-sun.dcs.qmw.ac.uk [138.37.88.185]; by hotpoint.dcs.qmw.ac.uk (8.8.7/8.8.5/S-4.0) with SMTP; for ""; id KAA11710; Tue, 10 Nov 1998 10:48:43 GMT Received: locally by brunos-sun (SMI-8.6/QMW-client-3.2b); for "freebsd-mobile@freebsd.org"; poster "scott"; id KAA09910; Tue, 10 Nov 1998 10:47:56 GMT Message-ID: <19981110104755.E11520@dcs.qmw.ac.uk> Date: Tue, 10 Nov 1998 10:47:55 +0000 From: Scott Mitchell To: freebsd-mobile@FreeBSD.ORG Subject: Reading CIS in kernel Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.2i Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi all, I have (foolishly?) embarked on a quest to get my Xircom Ethernet card working on FreeBSD, by porting the Linux xirc2_ps driver. Of course this means that I have to learn both how the Linux driver works and how to write a FreeBSD/PCMCIA driver... Anyhow, the Linux code supports a whole raft of different Xircom cards, which it tells apart by checking various CIS tuples using the Linux Card Services stuff. This is (as far as I can tell) all done inside the kernel, and there doesn't seem to be an easy way of doing that in FreeBSD, from my reading of the /sys/pccard code. So, the question is, how do I parse the CIS from inside a kernel driver? The only alternative approaches I can think of are to 1)hardwire details of all the supported cards into the driver, so we can tell what card we have by reading one magic location in card memory or 2)have the parsing done by userland code and somehow pass this back down to the driver. Both of these seem incredibly ugly to me. Anyone who answers this, beware -- you'll be letting yourself in for plenty more questions! TIA, Scott -- =========================================================================== Scott Mitchell | PGP Key ID |"If I can't have my coffee, I'm just | 0x54B171B9 | like a dried up piece of roast goat" QMW College, London, UK | 0xAA775B8B | -- J. S. Bach. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message