StorPortGetBusData return 0 on Windows Server 2008

Dear All,

I called StorPortGetBusData in the storport miniport
driver’s HwFindAdapter HwFindAdapter routine. But this API return 0.
According to WDK document, 0 means “The PCI bus does not exist.”
But I can get PCI configuration data using some tools such as rw, so there
is no problem with the hardware.

And the same code works well on Windows Server 2008 R2.

Is there any difference of this API on the 2008/2008R2 platform?
Anyone can give me some suggestions on this problem?

Code:
dataLen = StorPortGetBusData(pDevExtension,
PCIConfiguration,
ConfigInfo->SystemIoBusNumber,
ConfigInfo->SlotNumber,
pPciConfInfo,
PCI_EXTENDED_CONFIG_LENGTH);

Best regards,
David Zeng

This problem has fixed. I changed the last parameter of this API(Length)
to 256 Bytes, and it works.
I think PCI_EXTENDED_CONFIG_LENGTH is too large for this API under window
2008.

On Mon, Aug 27, 2012 at 10:13 AM, zeng xiaohua wrote:

> Dear All,
>
> I called StorPortGetBusData in the storport miniport
> driver’s HwFindAdapter HwFindAdapter routine. But this API return 0.
> According to WDK document, 0 means “The PCI bus does not exist.”
> But I can get PCI configuration data using some tools such as rw, so there
> is no problem with the hardware.
>
> And the same code works well on Windows Server 2008 R2.
>
> Is there any difference of this API on the 2008/2008R2 platform?
> Anyone can give me some suggestions on this problem?
>
> Code:
> dataLen = StorPortGetBusData(pDevExtension,
> PCIConfiguration,
> ConfigInfo->SystemIoBusNumber,
> ConfigInfo->SlotNumber,
> pPciConfInfo,
> PCI_EXTENDED_CONFIG_LENGTH);
>
> –
>
> Best regards,
> David Zeng
>
>



Best regards,
David Zeng