Re: about SdBusOpenInterface() and SDIO

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Yes, I think that there is wrong.It should be detected by system when
inserting.
I now open the SD bus interface by scanning by hand, then system find the
new device, I use the setup guide to setup.
but when I got the SdBusIfStd structure, the
Adapter->SdBusIfStd.InitializeInterface() failed.
I called such as the sdbusapi.doc said.please check the below.

THX.

pDevice = Adapter->PhyDeviceObject;
KdPrint( ("SdBusOpenInterface pDevice = %x\n", pDevice));
Status = SdBusOpenInterface(
pDevice,//Adapter->PhyDeviceObject,//Adapter->hDevice,//UnderlyingPDO
&Adapter->SdBusIfStd,
sizeof(SDBUS_INTERFACE_STANDARD),
SDBUS_INTERFACE_VERSION);
KdPrint( ("SdBusOpenInterface() Status = %x\n", Status));
KdPrint( ("SdBusOpenInterface() size = %x\n ver = %x\nContext =
%x\n",
Adapter->SdBusIfStd.Size,
Adapter->SdBusIfStd.Version,
Adapter->SdBusIfStd.Context));
KdPrint( ("SdBusOpenInterface() interfRefer =
%x\nInitializeInterface = %x\nAcknowledgeInt = %x\n",
Adapter->SdBusIfStd.InterfaceReference,
Adapter->SdBusIfStd.InitializeInterface,
Adapter->SdBusIfStd.AcknowledgeInterrupt));



if(NT_SUCCESS(Status)) {
SDBUS_INTERFACE_PARAMETERS interfaceParameters = {0};
interfaceParameters.Size = sizeof(SDBUS_INTERFACE_PARAMETERS);
interfaceParameters.TargetObject =
Adapter->LowerDeviceObject;//Adapter->TargetObject;
interfaceParameters.DeviceGeneratesInterrupts = FALSE;//TRUE;
interfaceParameters.CallbackAtDpcLevel = TRUE;//if TRUE,low latency time
of interrupt delivery
//callback will be entered at DPC level,FALSE,at passive level.
//interfaceParameters.CallbackRoutine =
MrvEventCallback;//pMyDriverCallback;
KdPrint(("SdBusOpenInterface() success\n"));
//Status = STATUS_UNSUCCESSFUL;
KdPrint(("before SdBusIfStd.InitializeInterface() Status =
%x\n",Status));

//Status = STATUS_SUCCESS;
if(Adapter->SdBusIfStd.InitializeInterface) {
Status = (Adapter->SdBusIfStd.InitializeInterface)(
Adapter->SdBusIfStd.Context,
&interfaceParameters);


if(NT_SUCCESS(Status)) {
KdPrint(("SdBusIfStd.InitializeInterface() success\n"));
}//if
else
KdPrint(("SdBusIfStd.InitializeInterface() failed
Status = %x\n",Status));
}//if
}//if
else
KdPrint(("SdBusOpenInterface() failed\n"));



"Doron Holan [MS]" <doronh@xxxxxxxxxxxxxxxxxxxx> дÈëÏûÏ¢ÐÂÎÅ:uvGTK3nYFHA.3272@xxxxxxxxxxxxxxxxxxxxxxx
> there is probably something wrong about your card. The SD bus is a pnp
> bus, it will auto detect your card upon insertion.
>
> d
>
> --
> Please do not send e-mail directly to this alias. this alias is for
> newsgroup purposes only.
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
>
> "iwub" <iwub@xxxxxxxxx> wrote in message
> news:OTBkC9dYFHA.2128@xxxxxxxxxxxxxxxxxxxxxxx
>> Then how to let the system know I insert the device?
>> the system did not find the device insert when I insert the SDIO card.
>>
>>
>> the HW ID is correct. I think.
>>
>>
>> "Doron Holan [MS]" <doronh@xxxxxxxxxxxxxxxxxxxx> дÈëÏûÏ¢ÐÂÎÅ:%230u7M7PYFHA.616@xxxxxxxxxxxxxxxxxxxxxxx
>>> yes. you must let the system find the device and your INF must match the
>>> SDBUS hardware ID generated for your device.
>>>
>>> d
>>>
>>> --
>>> Please do not send e-mail directly to this alias. this alias is for
>>> newsgroup purposes only.
>>> This posting is provided "AS IS" with no warranties, and confers no
>>> rights.
>>>
>>>
>>> "iwub" <iwub@xxxxxxxxx> wrote in message
>>> news:%23cKc1aMYFHA.3356@xxxxxxxxxxxxxxxxxxxxxxx
>>>> the driver is intalled by hand, it is not detected by host.(is it the
>>>> device problem?)
>>>> My device is intalled PCI-SDIO (sdbus.sys), SDIO device(my function
>>>> driver).
>>>> what will hanppen then? the device must be find by system itself?
>>>>
>>>> thanks
>>>>
>>>> "Pavel A." <pavel_a@xxxxxxxxxxxxxxx> дÈëÏûÏ¢ÐÂÎÅ:2448E027-9EFA-4E2A-8DA5-318875EF6F5C@xxxxxxxxxxxxxxxx
>>>>> Your driver is installed for the SD device ID, it isn't root
>>>>> enumerated?
>>>>> NdisMGetDeviceProperty returns valid pointer in
>>>>> Adapter->PhyDeviceObject ?
>>>>>
>>>>> --PA
>>>>>
>>>>> "iwub" wrote:
>>>>>> the sdbusapi.doc said, the SdBusOpenInterface() should be called in
>>>>>> AddDevice(), but I develop a driver for NDIS NIC, then I have no this
>>>>>> callback routine , I call it in my MiniportInitialize(),but it failed
>>>>>> all
>>>>>> the time,I have no idea.
>>>>>> please help me, if you know this.
>>>>>>
>>>>>> and it said, SD function drivers are WDM drivers that are linked to
>>>>>> the SD
>>>>>> bus driver lib.they are not minport driver like NDIS or SCSI driver.
>>>>>> How to understand it?who can explain for me. thanks!
>>>>>>
>>>>>> THX very much!
>>>>>>
>>>>>> AMon
>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>


.



Relevant Pages

  • Re: P5/Celeron comments?
    ... type of video capture card require. ... That restriction is caused by the mix of PCI Express and PCI ... which means a PCI bus card may get the "short straw". ... and you only get time slices from each camera. ...
    (alt.comp.periphs.mainboard.asus)
  • My First Posted Trip Report... Day 6 of 8
    ... This is the first time I've actually POSTED a trip report on radp although I've made up several and put them on my web site lame though it may be. ... Didn't bother to go back to BWV since the bus that goes there also comes here. ... When we got to the Dolphin, some little girl tried to reach up to the hand grips for standing passengers and missed it by a good four inches. ... Now, earlier in the day, I had gotten a new room card because I've had so many problems with vendors not being able to swipe the card and get the info off the magnetic stripe. ...
    (rec.arts.disney.parks)
  • Why SGPoreans so fierce and violent?
    ... She claws driver till he BLEEDS ... concession card ... But inside his bus cabin, the 33-year-old driver was helpless against ... concession card. ...
    (soc.culture.singapore)
  • Re: Why SGPoreans so fierce and violent?
    ... She claws driver till he BLEEDS ... concession card ... But inside his bus cabin, the 33-year-old driver was helpless against ... concession card. ...
    (soc.culture.singapore)
  • Re: Why SGPoreans so fierce and violent?
    ... She claws driver till he BLEEDS ... concession card ... But inside his bus cabin, the 33-year-old driver was helpless against ... concession card. ...
    (soc.culture.singapore)