Initializing SDIO WDM bus driver RRS feed

  • Question

  • Hi <o:p></o:p>

    I've encountered some issues while trying to enable bus driver for SDIO network device.<o:p></o:p>

    My driver is an old WDM bus driver that uses a PCI bus.<o:p></o:p>

    Recently I needed to change this driver to support SDIO bus.<o:p></o:p>

    On the initialization process, when I run ‘AddDevice’ to connect the device, I call ‘ SdBusOpenInterface’ with the relevant  parameters and it return a ‘STATUS_SUCCESS’ , but when i try to run ‘PSDBUS_INITIALIZE_INTERFACE_ROUTINE’ after filling the ‘SDBUS_INTERFACE_PARAMETERS’ struct it returns ‘STATUS_UNSUCCESSFUL’.  <o:p></o:p>


    The code looks like this:<o:p></o:p>


    status = SdBusOpenInterface(pdx->Pdo,&pSdioDevice->BusInterface,sizeof(SDBUS_INTERFACE_STANDARD),SDBUS_INTERFACE_VERSION);<o:p></o:p>

    if (!NT_SUCCESS(status))<o:p></o:p>


    KdPrint (("failed to Open device")) ; <o:p></o:p>

    return FALSE;<o:p></o:p>



    interfaceParameters.Size                        = sizeof(SDBUS_INTERFACE_PARAMETERS);<o:p></o:p>

    interfaceParameters.TargetObject                = pdx->LowerDeviceObject;<o:p></o:p>

    interfaceParameters.DeviceGeneratesInterrupts   = TRUE; <o:p></o:p>

    interfaceParameters.CallbackAtDpcLevel = FALSE;<o:p></o:p>


    if( NULL != callbackRoutine && callbackRoutineContext != NULL)<o:p></o:p>


    interfaceParameters.CallbackRoutine           = callbackRoutine;<o:p></o:p>

    interfaceParameters.CallbackRoutineContext    = callbackRoutineContext;<o:p></o:p>



    status = STATUS_UNSUCCESSFUL;<o:p></o:p>

    if (pSdioDevice->BusInterface.InitializeInterface && pSdioDevice->BusInterface.InterfaceDereference && pSdioDevice->BusInterface.AcknowledgeInterrupt && pSdioDevice->BusInterface.Context ) <o:p></o:p>


    status = (pSdioDevice->BusInterface.InitializeInterface)(pSdioDevice->BusInterface.Context, &interfaceParameters); <o:p></o:p>


    <o:p> </o:p>Will appreciate any help.

    Tuesday, October 2, 2012 3:33 PM


  • try doing that during START_DEVICE not AddDevice.

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Tuesday, October 2, 2012 4:45 PM

All replies