Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Feb 2003 10:13:12 -0700 (MST)
From:      <fred@clift.org>
To:        <freebsd-alpha@freebsd.org>
Subject:   problem with pcmcia isa adaptor on alpha
Message-ID:  <20030213093531.K26346-100000@vespa.dmz.orem.verio.net>
In-Reply-To: <3E498737.22D2187A@mindspring.com>

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

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030213093531.K26346-100000>