From: Patrick on
Hello Eshanye,

I face the same problem when I try to write SDIO driver, can you share your
experince about how to solve it ?

Thanks in adcance.

"Eshanye_kp" wrote:

> Hi,
>
> I'm working on a SDIO drivers on XP SP2. Anybody has any idea why the
> call to SdBusSubmitRequest() for command 52, hangs ? It looks like, as
> if the bus driver/hardware is busy.. if i eject the sdio card then the
> call returns with 0xC0000001 status. I have done the usual
> SDBusOpenInterface and initializing the bus interface etc properly. All
> these calls are returning status success. Also, i can see (using LA)
> that when the card is being booted, bus driver is doing several CMD52
> read and write successfully. But when i issue the first CMD52 using
> SdBusSubmitRequest() it hangs.... and i do not see any CMD52 going to
> the hardware in LA.
>
> The same card works fine with the linux sdio driver properly.
>
> My sdio init is something like this (which is done in create dispatcher) :-
>
> status = SdBusOpenInterface(fdoData->UnderlyingPDO,
> &fdoData->SDBusInterface,
> sizeof(SDBUS_INTERFACE_STANDARD),
> SDBUS_INTERFACE_VERSION);
>
> SdioDbgPrint(TRACE,"Create:SDBusInterface status 0x%x\n",status,);
>
> if (NT_SUCCESS(status))
> {
> SDBUS_INTERFACE_PARAMETERS interfaceParameters = {0};
>
> interfaceParameters.Size = sizeof(SDBUS_INTERFACE_PARAMETERS);
> interfaceParameters.TargetObject = fdoData->NextLowerDriver;
> interfaceParameters.DeviceGeneratesInterrupts = TRUE;
> //Run the call back at PASSIVE_LEVEL
> interfaceParameters.CallbackAtDpcLevel = FALSE;
> interfaceParameters.CallbackRoutine =
> (PSDBUS_CALLBACK_ROUTINE)SdioDriverCallback;
> interfaceParameters.CallbackRoutineContext = DeviceObject;
>
> status = STATUS_UNSUCCESSFUL;
> if (fdoData->SDBusInterface.InitializeInterface)
> {
> status =
> fdoData->SDBusInterface.InitializeInterface(fdoData->SDBusInterface.Context,
>
> &interfaceParameters);
> SdioDbgPrint(TRACE,"AddDevice:initializeinterface status 0x%x\n", status);
> if(!NT_SUCCESS(status))
> goto createend;
>
> } else
> goto createend;
>
> }else
> goto createend;
>
> }
>
>
> //just for testing
> Data = 0;
> status =
> SdioReadWriteByte(DeviceObject,FN0,&Data,CARD_CAPABILITY_REG,FALSE);
> ----------------------------------------------------------------------
> My sdioReadWriteByte() function is :-
> Exactly same as what given in the DDK help for Direct command.
>
>
> Regards
> Esha
>
>