Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Jul 1999 16:19:39 -0600
From:      Warner Losh <imp@village.org>
To:        Scott Mitchell <s.mitchell@computer.org>
Cc:        obrien@NUXI.com, ade@lovett.com, phk@freebsd.org, freebsd-xircom@lovett.com, hackers@freebsd.org, mobile@freebsd.org
Subject:   Re: Reading CIS from kernel? 
Message-ID:  <199907142219.QAA58852@harmony.village.org>
In-Reply-To: Your message of "Wed, 14 Jul 1999 18:51:01 BST." <19990714185101.09845@goatsucker.org> 
References:  <19990714185101.09845@goatsucker.org>  <19990713182203.A68393@nuxi.com> <19990710162730.60563@goatsucker.org> <19990713182203.A68393@nuxi.com> <199907140652.AAA53151@harmony.village.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <19990714185101.09845@goatsucker.org> Scott Mitchell writes:
: Ugh.  In that case, can someone back out Poul-Henning's changes to the
: if_xe.c in the -STABLE tree?  That's (I hope) the only thing stopping it
: from working.  At least that way only my code will be bogus :-)  Believe
: me, I know it's ugly, but there's no getting around the fact that the
: driver needs to read the CIS, and right now there's no clean way to do that
: in -STABLE (is there?).

Can I get your comments on the following interface?

int pccard_map_cis(int slot)

Maps the slot's cis into memory.  You must call the before any of the
following.  It returns 0 on success, or an error from
/usr/include/sys/errno.h (most likely EBUSY if there are no memory
windows available).

int pccard_unmap_cis(int slot)

Unmaps the CIS.  This frees any resource used by the slot to map its
CIS.  It returns 0 on success, and an errno value if not.

vaddr_t pccard_cis_addr(int slot)

Return the virtual address of the CIS.  The CIS must be mapped before
call this function.  Drivers may read/write this memory.  Reading this
memory will get the CIS entries.  Drivers are responsible for
interpreting the CIS.  Writing to CIS locations generally is used to
configure the card and does not change the CIS stored on the card.  If
the card is not mapped, then 0 will be returned.  It is not valid to
access memory  returned by this call after a call to
pccard_unmap_cis.

Future interfaces may ease the burdon on driver writers, but this
interface will be supported for a while.

Does this fill your needs?




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




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