ULONG ScsiPortGetBusData(DeviceExtension, BusDataType, SystemIoBusNumber,
Slotnumber, Buffer, Offset, Length)
IN PVOID DeviceExtension;
IN ULONG BusDataType;
IN ULONG SystemIoBusNumber;
IN ULONG SlotNumber;
IN PVOID Buffer;
IN ULONG Length;
Sets bus-type-specific information for the specified bus and slot.
This function can be called only from a miniport driver's HwFindAdapter routine. Calls to ScsiPortGetBusData from other miniport driver functions will result in system failure or an incorrect operation.
If Length is zero, the buffer is treated as a pointer to where the pointer to the buffer should be stored. The port driver will allocate a buffer for the data. The pointer to this buffer is returned in the location pointed to by Buffer. This data is valid only until this function is called again or HwFindAdapter returns.
In the case of the PCI bus, you can also access its configuration space using CONFIGMG_Call_Enumerator_Function. See KB article Q140730 (Accessing PCI Device's Configuration Space from Device Driver).
PORT_CONFIGURATION_INFORMATION, HwFindAdapter