Re: How can I get PCI card Slot Number in my WDM driver?
From: Gary G. Little (gary.g.little.nospam_at_seagate.com)
Date: 06/02/04
- Next message: Raj: "pagefile.sys"
- Previous message: Arkady Frenkel: "Re: How to include ntddk.h in NDIS Intermediate Driver"
- In reply to: paullee: "Re: How can I get PCI card Slot Number in my WDM driver?"
- Next in thread: Maxim S. Shatskih: "Re: How can I get PCI card Slot Number in my WDM driver?"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 02 Jun 2004 13:25:31 GMT
It's a WDM driver and HalGetBusData is deprecated in 2000 and above. The
next question he's going to ask is why slot number in an XYZ motherboard is
not the same as the slot number on an ABC motherboard. Slot number in WDM
drivers is not needed since you get your resources in IRP_MN_START_DEVICE.
Typical bad assumptions assosicated with this is that the number by the PCI
adapter is not the same as the number assigned by the BIOS. Slot number is
an archaic hold over from NT4.
--
Gary G. Little
Seagate Technologies, LLC
"paullee" <paullee@iei.com.tw> wrote in message
news:b308514d.0406020443.4df4792@posting.google.com...
> Hi
>
> struct
> {
> USHORT VendorID;
> USHORT DeviceID;
> USHORT Command;
> USHORT Status;
> UCHAR RevisionID;
> UCHAR filler1[7];
> ULONG Bar0;
> ULONG Bar1;
> ULONG Bar2;
> ULONG filler2[4];
> USHORT SubsystemVendorID;
> USHORT SubsystemID;
> ULONG filler3[3];
> UCHAR InterruptLine;
> UCHAR InterruptPin;
> UCHAR Max_Gnt;
> UCHAR Max_Lat;
> UCHAR TRDY_Timeout;
> UCHAR Retry_Timeout;
> UCHAR filler4[0x9a];
> UCHAR CapabilityID;
> UCHAR NextItemPtr;
> USHORT PowerMgtCapability;
> USHORT PowerMgtCSR;
> }PciConfigData;
>
> int slot;
> int bus;
> for(bus=0; bus<13; bus++)
> {
> for(slot=0; slot<255; slot++)
> {
> // To save time, only read the first two words
> HalGetBusData(PCIConfiguration, bus, slot, &PciConfigData, sizeof(USHORT)
* 2);
> if ((PciConfigData.VendorID == VENDOR_ID) && (PciConfigData.DeviceID ==
DEVICE_ID ))
> { get your card}
> }
> }
>
> you also can see
> Q253232 HOWTO: Get Configuration and Location Information of PCI
Device
>
> I also work for Advantech In taiwan^^
> ==========================================================================
- Next message: Raj: "pagefile.sys"
- Previous message: Arkady Frenkel: "Re: How to include ntddk.h in NDIS Intermediate Driver"
- In reply to: paullee: "Re: How can I get PCI card Slot Number in my WDM driver?"
- Next in thread: Maxim S. Shatskih: "Re: How can I get PCI card Slot Number in my WDM driver?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|