From owner-freebsd-alpha Thu Feb 13 9: 5:49 2003 Delivered-To: freebsd-alpha@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 27EBF37B401 for ; Thu, 13 Feb 2003 09:05:47 -0800 (PST) Received: from gatekeeper.oremut01.us.wh.verio.net (gatekeeper.oremut01.us.wh.verio.net [198.65.168.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 79CA343FAF for ; Thu, 13 Feb 2003 09:05:46 -0800 (PST) (envelope-from fclift@verio.net) Received: from mx.dmz.orem.verio.net (mx.dmz.orem.verio.net [10.1.1.10]) by gatekeeper.oremut01.us.wh.verio.net (Postfix) with ESMTP id 2CBAA3BF150 for ; Thu, 13 Feb 2003 10:05:44 -0700 (MST) Received: from vespa.dmz.orem.verio.net (vespa.dmz.orem.verio.net [10.1.1.59]) by mx.dmz.orem.verio.net (8.11.6/8.11.6) with ESMTP id h1DH5h323134 for ; Thu, 13 Feb 2003 10:05:43 -0700 (MST) Date: Thu, 13 Feb 2003 10:13:12 -0700 (MST) From: X-X-Sender: To: Subject: problem with pcmcia isa adaptor on alpha In-Reply-To: <3E498737.22D2187A@mindspring.com> Message-ID: <20030213093531.K26346-100000@vespa.dmz.orem.verio.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org I've read the archives, and I've seen a large amount of 'no this doesn't work' so I'm not suprised when I put in a lucent ISA pcmcia adaptor and when I try a dumpcis on the card I get: # pccardc dumpcis Read return -1 bytes (expected 2) pccardc: CIS code read: Bad address Read return -1 bytes (expected 10) Configuration data for card in slot 0 2 slots found (oh, I'm running 4.7 stable) I was pretty sure it wouldn't work because at least three other people have tried and posted to the alpha mailing list over the last two years - one was an ISA adaptor and the others were multias with built in slots... In particular http://www.freebsd.org/cgi/getmsg.cgi?fetch=55853+59013+/usr/local/www/db/text/2001/freebsd-alpha/20010506.freebsd-alpha Michael Wu talks about a conversation he had with Warner Losh in which the case seemed hopeless. Being a machoist, and wanting to have some goad to learn about kernel internals, and having one of these cards that I'd like to use in my pws500au, I decided to waste a bunch of my time figuring out some things about this problem :). So, I figured out the easy stuff quickly -- truss of pccardc dumpcis shows that the error is generated when the userland stuff, after doing a few ioctls tries to do a read on /dev/card0 - just tracking down the part of the code that gets called for this read was a great learning experience, and I ended up /usr/src/sys/pccard/pccard.c at about line 403 in crdread(). error = uiomove(p, count, uio); This call returns and EFAULT. uiomove can only EFAULT on a copyin or copyout, (I presuem copyout in this case since we are trying to read). So, something is wrong with p right? p in this case is pccard_kmem + some offset. My problem is that I can't really find where pccard_kmem is set -- I do see in the ioctl interface if you call the PIOCRWMEM ioctl that this value can be set, but otherwise, it appears to be uninitialized. Can anyone tell me where this is being initialized? or what else might be wrong with the uiomove? That ioctl is not being done in the userland program, so is there some internal call to this ioctl? # truss pccardc dumpcis |& grep ioctl ioctl(3,PIOCGSTATE,0x11ffba98) = 0 (0x0) ioctl(3,PIOCRWFLAG,0x11ffb9d8) = 0 (0x0) ioctl(3,PIOCRWFLAG,0x11ffb9e0) = 0 (0x0) ioctl(4,PIOCGSTATE,0x11ffba98) = 0 (0x0) I'm more looking for pointers of where to look rather than someone just telling me what is wrong -- though I wouldn't mind that. Or feel freel to point out to me why this is a hopless or unreasonable thing to even put time and effor in to :). It was suggested to me recently that the if_dc driver could use busDMA-ing and perhaps I should be wasting my time there instead. Either way, I barely know what I'm doing :). Fred -- Fred Clift - fred@clift.org -- Remember: If brute force doesn't work, you're just not using enough. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message