getting PCI slot number from NDIS miniport Driver

Dear All,
I am writing an IOCTL in the NDIS miniport NIC driver for returning the Bus and Slot number of PCI bus on which the card is inserted. All the NDIS supported PCI Bus functions are the ones that takes Bus No. or Slot No. as input whereas I want them as output. Can you please tell me if there is a way of knowing the Bus No. and Slot No. information for the NIC.

thanks in advance,
Abhishek


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

for ( bus = 0; bus < 256; bus++ )
for ( slot = 0l slot < 256; slot++ )
if ( match )
return with bus, slot

That’s the only way I know.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of abhishek rastogi
Sent: Tuesday, July 31, 2001 5:58 AM
To: NT Developers Interest List
Subject: [ntdev] getting PCI slot number from NDIS miniport Driver

Dear All,
I am writing an IOCTL in the NDIS miniport NIC driver for returning the
Bus and Slot number of PCI bus on which the card is inserted. All the NDIS
supported PCI Bus functions are the ones that takes Bus No. or Slot No. as
input whereas I want them as output. Can you please tell me if there is a
way of knowing the Bus No. and Slot No. information for the NIC.

thanks in advance,
Abhishek


You are currently subscribed to ntdev as: xxxxx@pdq.net
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

I don’t understand why your app needs location information of a nic.
However, on Win2K, you can find the location information using SetupDi
function. You don’t need to provide an IOCTL for that.

SetupDiSetDeviceRegistryProperty (SPDRP_LOCATION_INFORMATION) - will
give you bus, device and function number.
SetupDiSetDeviceRegistryProperty (SPDRP_UI_NUMBER) - will give you slot
number for the device that are not on the root bus.

Search DDk samples on how to use this api.

There is no need to specify bus or slot number to any NDIS functions on
Win2K. So those arguments are no-ops.

-Eliyas

-----Original Message-----
From: abhishek rastogi [mailto:xxxxx@malkauns.nsc.com]
Sent: Tuesday, July 31, 2001 3:58 AM
To: NT Developers Interest List
Subject: [ntdev] getting PCI slot number from NDIS miniport Driver

Dear All,
I am writing an IOCTL in the NDIS miniport NIC driver for returning the
Bus and Slot number of PCI bus on which the card is?inserted. All the
NDIS supported PCI Bus functions are the ones ?that takes Bus No. or
Slot No. as input whereas I want them as output. Can you please tell me
if there is a way of knowing the Bus No. and Slot No. information?for
the NIC.
?
thanks in advance,
Abhishek
?

You are currently subscribed to ntdev as: xxxxx@microsoft.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

What OS? NT4 or w2k?

----- Original Message -----
From: abhishek rastogi
To: NT Developers Interest List
Sent: Tuesday, July 31, 2001 2:58 PM
Subject: [ntdev] getting PCI slot number from NDIS miniport Driver

Dear All,
I am writing an IOCTL in the NDIS miniport NIC driver for returning the Bus and Slot number of PCI bus on which the card is inserted. All the NDIS supported PCI Bus functions are the ones that takes Bus No. or Slot No. as input whereas I want them as output. Can you please tell me if there is a way of knowing the Bus No. and Slot No. information for the NIC.

thanks in advance,
Abhishek


You are currently subscribed to ntdev as: xxxxx@storagecraft.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com