- SdBusOpenInterface() bug?
- Posted by iwub on June 13th, 2005
Hi,
I use SdBusOpenInterface(). it seems successful.
but the return of the SdBusInterfaceStandard structure seems wrong.
Why size and version is 0 all the ways?
THX,
SdBusOpenInterface() Status = 0
00000031 3.26347315 SdBusOpenInterface() size = 0
00000032 3.26347455 ver = 0
00000033 3.26347622 Context = 823ee990
00000034 3.26348433 SdBusOpenInterface() ---interfReference = f810e4f0
00000035 3.26348600 interfDereference = f810e522
00000036 3.26348768 InitializeInterface = f811775c
00000037 3.26348907 AcknowledgeInt = f810e776
00000038 3.26349327 SdBusOpenInterface() success
THANKS,
- Posted by Eliyas Yakub [MSFT] on June 14th, 2005
Don't you have to initialize the Version and Size field of
SDBUS_INTERFACE_DATA before calling SdBusOpenInterface?
Here is the usage I see in one of the drivers:
NTSTATUS status;
SDBUS_INTERFACE_DATA interfaceData;
RtlZeroMemory(&interfaceData, sizeof(SDBUS_INTERFACE_DATA));
interfaceData.Size = sizeof(SDBUS_INTERFACE_DATA);
interfaceData.Version = SDBUS_INTERFACE_VERSION;
interfaceData.TargetObject = sffdiskExtension->TargetObject;
status = SdBusOpenInterface(&interfaceData,
&sffdiskExtension->SdbusInterfaceContext);
if (!NT_SUCCESS(status)) {
return status;
}
The bug is that the bus driver doesn't seem to validate the Size and Version
field before filling information in the InterfaceData structure. I will let
the SD driver developers know.
--
-Eliyas
This posting is provided "AS IS" with no warranties, and confers no rights.
http://www.microsoft.com/whdc/hwdev/driver/kb-drv.mspx
- Posted by iwub on June 15th, 2005
but ,what is SDBUS_INTERFACE_DATA ? I have the structure named
SDBUS_INTERFACE_STANDARD, how about it?
Which version is for SDBUS_INTERFACE_DATA?
and my prototype call is
Status = SdBusOpenInterface(
pDevice,//Adapter->PhyDeviceObject,//Adapter->hDevice,//UnderlyingPDO
&Adapter->SdBusIfStd,
sizeof(SDBUS_INTERFACE_STANDARD),
SDBUS_INTERFACE_VERSION);
there is four parameters, not 2.
Thanks,
"Eliyas Yakub [MSFT]" <eliyasy@online.microsoft.com> дÈëÏûÏ¢ÐÂÎÅ:eHnE2dQcFHA.2420@TK2MSFTNGP12.phx.gbl ...
- Posted by iwub on June 15th, 2005
Hi,
How about sffdiskExtension->TargetObject,
How can I get it?
and How about CMD53 SdIoArgument setup?
Which SD_RW_EXTENDED_ARGUMENT sdIoArgument;
//SD_RW_DIRECT_ARGUMENT sdIoArgument;
I should use?
DDK seems the second one , and I use it and SdBusSubmitRequest() successfully returned.
but the HW seems not coorect, because I can not get a register that we design to specify the FW is ready.
Why?
THanks,
"Eliyas Yakub [MSFT]" <eliyasy@online.microsoft.com> дÈëÏûÏ¢ÐÂÎÅ:eHnE2dQcFHA.2420@TK2MSFTNGP12.phx.gbl ...
- Posted by iwub on June 15th, 2005
and what will it happen then?
what can I do ?
THX
"Eliyas Yakub [MSFT]" <eliyasy@online.microsoft.com> дÈëÏûÏ¢ÐÂÎÅ:eHnE2dQcFHA.2420@TK2MSFTNGP12.phx.gbl ...