Cardbus NDIS driver

Hello,
I have a PCI NDIS driver. When I tried to port it to CardBus I ran into a
problem where when reading the BAR addresses inside the PCI configuration
I am getting the wrong values.
My question is:
Why is this happening? How can you read Configuration BARs when using
CardBus?

Thanks,
Arik

Sorry if this is completely wrong, but AFAIK CardBus is related to
both PCMCIA and PCI somehow. So what are you actually trying to do
here?

If you need to read PCMCIA configuration information, see
NdisReadPcmciaAttributeMemory().

Stephan

On Wed, 27 Feb 2002 13:43:38 -0500, “arik halperin”
wrote:

>
>Hello,
>I have a PCI NDIS driver. When I tried to port it to CardBus I ran into a
>problem where when reading the BAR addresses inside the PCI configuration
>I am getting the wrong values.
>My question is:
>Why is this happening? How can you read Configuration BARs when using
>CardBus?
>
>Thanks,
> Arik

> Sorry if this is completely wrong, but AFAIK CardBus is related to

both PCMCIA and PCI somehow. So what are you actually trying to do
here?

Well Cardbus is more PCI like than PCMCIA like from a software perspective.
The only PCMCIA like part of a is the fact that CIS data can be referenced in
one of the BARs. A look in the resource manager of a Cardbus laptop always
shows Cardbus devices as PCI devices. They also appear this way from a low
level perspective as well.

>I have a PCI NDIS driver. When I tried to port it to CardBus I ran into a
>problem where when reading the BAR addresses inside the PCI configuration
>I am getting the wrong values.
>My question is:
>Why is this happening? How can you read Configuration BARs when using
>CardBus?
>
I would have thought that the PCI NDIS driver ought to just work. Why do you
need to access the BARs anyway? Can you not get all the information you need
with NdisMPCIAssignResources() instead of directly accessing the BARs?

Mike

Note: Better use NdisMQueryAdapterResources(), if available on the
target Windows platform (ie. NDIS 5.x supported).

Stephan

On Fri, 01 Mar 2002 16:28:10 +0000, Mike Pumford
wrote:

>
>> Sorry if this is completely wrong, but AFAIK CardBus is related to
>> both PCMCIA and PCI somehow. So what are you actually trying to do
>> here?
>>
>Well Cardbus is more PCI like than PCMCIA like from a software perspective.
>The only PCMCIA like part of a is the fact that CIS data can be referenced in
>one of the BARs. A look in the resource manager of a Cardbus laptop always
>shows Cardbus devices as PCI devices. They also appear this way from a low
>level perspective as well.
>
>> >I have a PCI NDIS driver. When I tried to port it to CardBus I ran into a
>> >problem where when reading the BAR addresses inside the PCI configuration
>> >I am getting the wrong values.
>> >My question is:
>> >Why is this happening? How can you read Configuration BARs when using
>> >CardBus?
>> >
>I would have thought that the PCI NDIS driver ought to just work. Why do you
>need to access the BARs anyway? Can you not get all the information you need
>with NdisMPCIAssignResources() instead of directly accessing the BARs?
>
>Mike

> Note: Better use NdisMQueryAdapterResources(), if available on the

target Windows platform (ie. NDIS 5.x supported).

Good point. The only example of this I had to go on was the Intel ethernet
sample in the 2k DDK which uses the other call. Your suggestion does seem
like a better choice for NDIS 5.

Mike