Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Dec 1998 12:34:17 +0200 (SAT)
From:      John Hay <jhay@mikom.csir.co.za>
To:        mike@smith.net.au (Mike Smith)
Cc:        current@FreeBSD.ORG
Subject:   Re: PAO Integration?
Message-ID:  <199812151034.MAA10471@zibbi.mikom.csir.co.za>
In-Reply-To: <199812150930.BAA04087@dingo.cdrom.com> from Mike Smith at "Dec 15, 98 01:30:31 am"

next in thread | previous in thread | raw e-mail | index | archive | help
> > > >   I think that Mike's card does not have Memory descriptor..  Is
> > > > that right?
> > > 
> > > Yes; there's a long-standing bug in the way that the stock pccardd 
> > > deals with memory blocks < 4096 bytes, where it tries to allocate a 
> > > zero-sized window, which fails and thus the card is rejected.
> > > 
> > > The memory region in question's not actually used for the card's 
> > > operation; the simplest fix would be to correct pccardd to either 
> > > expand any window < 4096 to 4096 or to just not map it (bad but 
> > > simpler).
> > 
> > Why not just check if there is a next (second) region defined that
> > consumes the first one and use that for the mapping? All the cards
> > that I have seen and all the complaints in the mailinglists with
> > printouts of the CIS have a second memory region that totally
> > overlaps the first, if you look at the host addr and blk length.
> 
> Memory regions don't work that way; two regions based at 0 of length X 
> and Y are separate regions that have to be mapped separately into the 
> system memory space.

Even if like in this example, it says that both of these regions use
"host addr = 0xd4000"? I would think that you only have one region through
which you talk to the card and have some other way (like an io register
that you set) to differentiate between the two regions on the card, but
that doesn't mean you need more than one system memory space to talk to
the card. Note, this doesn't mean you won't have other kinds of cards
that need more than one region, but we are not talking about them at
the moment, we are just talking about pccard devices with a CIS that is
different from what we expect them to be. What is happenning is that
they give us more detailed information about what they look like inside
and that confuse pccardd.

The same kind of thing should be done for the IO space. In this example
it says it needs two adjacent regions and there pccardd should just be
clever enough to combine it into one region.

> >         Config index = 0x1(default)
> >         Interface byte = 0x81 (I/O)  wait signal supported
> >         Card decodes 10 address lines, limited 8/16 Bit I/O
> >                 I/O address # 1: block start = 0x300 block length = 0x10
> >                 I/O address # 2: block start = 0x310 block length = 0x10
> >                 IRQ modes: Level
> >                 IRQs:  2 3 4 5 6 7 9 10 11 12 13 15
> >         Memory descriptor 1         <-------------------
> >                  blk length = 0x400 card addr = 0x000 host addr = 0xd4000
> >         Memory descriptor 2         <-------------------
> >                  blk length = 0x4000 card addr = 0x4000 host addr = 0xd4000

John
-- 
John Hay -- John.Hay@mikom.csir.co.za

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



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