This is a multi-part message in MIME format.

------=_NextPart_000_000A_01C65ED9.F37A71C0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I have an SDIO core which works with WinCE 5, but not XP. The problem =
appears to be that after reading the CIS and Func1 FBR, XP SDBUS.SYS =
sends a CMD5. According to the spec, the CMD5 can only be sent after =
one of two conditions. Referring to page7 last paragraph of SDIO 1.10 =
standard specification:

"As shown in Figure3 and Figure4, and SDIO aware host shall send CMD5 =
arg=3D0 as part of the initialization sequence after either Power On or =
a CMD52 write write to I/O Reset. Sending CMD5 arg=3D0 that has not been =
preceded by one of these two reset conditions shall not result in either =
the host or card entering the initialization sequence."

I think the CMD5 is being sent during IRP_MJ_PNP.IRP_MN_START_DEVICE. =
My driver forwards the START_DEVICE IRP to SDBUS. SDBUS returns =
STATUS_DEVICE_BUSY (0x80000011), so my driver in turns completes the IRP =
with failure. As a result, my driver then gets unloaded.


Here is a partial trace of the SD Bus:

// Read the last byte of the CIS
SD I/O Command 0x34=20
MilliSecond No. Command Index R/W Function RAW Flag Stuff Bits =
Register Address Stuff Bits R/W Data CRC=20
0x1D 0x34 R 0x0 0x0 0x0 0x1010 0x0 0x0 0x29=20

// Last CIS byte =3D 0xFF =3D TUPLE_END
Response R0x5 ( SD Mode )=20
MilliSecond No. Command Index Stuff Bits Response Flag R/W Data CRC=20
0x1D 0x34 0x0 0x10 0xFF 0x62=20

// Read first register of Function 1 FBR
SD I/O Command 0x34=20
MilliSecond No. Command Index R/W Function RAW Flag Stuff Bits =
Register Address Stuff Bits R/W Data CRC=20
0x1D 0x34 R 0x0 0x0 0x0 0x100 0x0 0x0 0x36=20

// Data =3D 0x47 =3D CSA Disabled, Supports CSA, IO Device IF =3D 0x7
Response R0x5 ( SD Mode )=20
MilliSecond No. Command Index Stuff Bits Response Flag R/W Data CRC=20
0x1D 0x34 0x0 0x10 0x47 0x40=20

// I think this is where my driver is loaded and eventually =
IRP_MJ_PNP.IPR_MN_START_DEVICE is given to me and I forward it to SDBUS
Delay
6308 MilliSecond

// SDBUS issues CMD5 -- it should first issue a CMD52 to set the CCCR =
IO_ABORT.RES bit
SD I/O Command 0x5=20
MilliSecond No. Reserved I/O OCR Reserved CRC=20
0x18C2 0x5 0x0 0x0 0x2D=20

Delay
905 MilliSecond
Error
No data to display after analysis!!

So how do we get this fixed?

Thanks,

((&->




------=_NextPart_000_000A_01C65ED9.F37A71C0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2802" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>I have an SDIO core which works with =
WinCE 5, but=20
not XP.&nbsp; The problem appears to be that after reading the CIS and =
Func1=20
FBR, XP SDBUS.SYS sends a CMD5.&nbsp; According to the spec, the CMD5 =
can only=20
be sent after one of two conditions.&nbsp;&nbsp;Referring to page7 last=20
paragraph of SDIO 1.10 standard specification:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>=93As shown in Figure3 and Figure4, and =
SDIO aware=20
host shall send CMD5 arg=3D0 as part of the initialization sequence =
after either=20
Power On or a CMD52 write write to I/O Reset. Sending CMD5 arg=3D0 that =
has not=20
been preceded by one of these two reset conditions shall not result in =
either=20
the host or card entering the initialization sequence.=94</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV><FONT face=3DArial =
size=3D2>
<DIV><FONT face=3DArial size=3D2>I think the CMD5 is being sent during=20
IRP_MJ_PNP.IRP_MN_START_DEVICE.&nbsp; My driver forwards the =
START_DEVICE IRP to=20
SDBUS.&nbsp; SDBUS returns STATUS_DEVICE_BUSY (0x80000011), so my driver =
in=20
turns completes the IRP with failure.&nbsp;&nbsp;As a result, my driver =
then=20
gets unloaded.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Here is a partial trace of the SD Bus:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
<DIV><FONT face=3DCourier size=3D2>// Read the last byte of the =
CIS</FONT></DIV>
<DIV><FONT face=3DCourier size=3D2>SD I/O Command 0x34 </FONT></DIV>
<DIV><FONT face=3DCourier size=3D2>MilliSecond No. Command Index R/W =
Function RAW=20
Flag Stuff Bits Register Address Stuff Bits R/W Data CRC </FONT></DIV>
<DIV><FONT face=3DCourier size=3D2>0x1D 0x34 R 0x0 0x0 0x0 0x1010 0x0 =
0x0 0x29=20
</FONT></DIV>
<DIV><FONT face=3DCourier size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier size=3D2>// Last CIS byte =3D 0xFF =3D=20
TUPLE_END</FONT></DIV>
<DIV><FONT face=3DCourier size=3D2>Response R0x5 ( SD Mode ) =
</FONT></DIV>
<DIV><FONT face=3DCourier size=3D2>MilliSecond No. Command Index Stuff =
Bits=20
Response Flag R/W Data CRC </FONT></DIV>
<DIV><FONT face=3DCourier size=3D2>0x1D 0x34 0x0 0x10 0xFF 0x62 =
</FONT></DIV>
<DIV><FONT face=3DCourier size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier size=3D2>// Read first register of Function =
1=20
FBR</FONT></DIV>
<DIV><FONT face=3DCourier size=3D2>SD I/O Command 0x34 </FONT></DIV>
<DIV><FONT face=3DCourier size=3D2>MilliSecond No. Command Index R/W =
Function RAW=20
Flag Stuff Bits Register Address Stuff Bits R/W Data CRC </FONT></DIV>
<DIV><FONT face=3DCourier size=3D2>0x1D 0x34 R 0x0 0x0 0x0 0x100 0x0 =
0x0 0x36=20
</FONT></DIV>
<DIV><FONT face=3DCourier size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier size=3D2>// Data =3D 0x47 =3D CSA Disabled, =
Supports CSA, IO=20
Device IF =3D 0x7</FONT></DIV>
<DIV><FONT face=3DCourier size=3D2>Response R0x5 ( SD Mode ) =
</FONT></DIV>
<DIV><FONT face=3DCourier size=3D2>MilliSecond No. Command Index Stuff =
Bits=20
Response Flag R/W Data CRC </FONT></DIV>
<DIV><FONT face=3DCourier size=3D2>0x1D 0x34 0x0 0x10 0x47 0x40 =
</FONT></DIV>
<DIV><FONT face=3DCourier size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier size=3D2>// I think this is where my driver =
is loaded=20
and eventually IRP_MJ_PNP.IPR_MN_START_DEVICE is given to me and I =
forward=20
it&nbsp;to SDBUS</FONT></DIV>
<DIV><FONT face=3DCourier size=3D2>Delay</FONT></DIV>
<DIV><FONT face=3DCourier size=3D2>&nbsp;6308 MilliSecond</FONT></DIV>
<DIV><FONT face=3DCourier size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#ff0000 size=3D2><STRONG>// SDBUS =
issues CMD5 --=20
it should first&nbsp;issue a CMD52&nbsp;to set the CCCR IO_ABORT.RES=20
bit</STRONG></FONT></DIV>
<DIV><FONT face=3DCourier size=3D2>SD I/O Command 0x5 </FONT></DIV>
<DIV><FONT face=3DCourier size=3D2>MilliSecond No. Reserved I/O OCR =
Reserved CRC=20
</FONT></DIV>
<DIV><FONT face=3DCourier size=3D2>0x18C2 0x5 0x0 0x0 0x2D =
</FONT></DIV>
<DIV><FONT face=3DCourier size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier size=3D2>Delay</FONT></DIV>
<DIV><FONT face=3DCourier size=3D2>&nbsp;905 MilliSecond</FONT></DIV>
<DIV><FONT face=3DCourier size=3D2>Error</FONT></DIV>
<DIV><FONT face=3DCourier size=3D2>&nbsp;No data to display after=20
analysis!!</FONT></DIV></BLOCKQUOTE>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>So how do we get this =
fixed?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>((&amp;-&gt;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_000A_01C65ED9.F37A71C0--