unexpected value into
Holger Schurig
hs4233 at mail.mn-solutions.de
Thu May 29 09:21:17 EDT 2008
I added some printk's to libertas_cs.c which are quite short, so
that the time taken for printk doesn't disturb things too much.
I used
* "ei"/"li" for enter/leave if_cs_interrupt
* "ec"/"lc" for enter/leave if_cs_send_cmd
* "ep"/"lp" for enter/leave if_cs_receive_cmdres (p=resPonse)
* "et"/"lt" for enter/leave if_cs_send_data (t=Tx)
* "er"/"lr" for enter/leave if_cs_receive_data
Now, I see something strange happen:
[ 7.563737] ec
[ 7.565455] cs 0x0005
[ 7.570044] lc
We enter if_cs_send_cmd() and check if I'm allowed to send a
command by checking IF_CS_CARD_STATUS. I get 0x0005 back, which
is IF_CS_BIT_COMMAND and IF_CS_BIT_TX, so I might either send a
tx frame or send a command.
I do the latter and write IF_CS_BIT_COMMAND in both
IF_CS_HOST_STATUS and IF_CS_HOST_IN_CAUSE. Then
[ 7.571805] ei, hic 0x0008
[ 7.574082] ep
[ 7.575759] lp
[ 7.577511] li
And sure enought, the if_cs_interrupt() get's called.
IF_CS_CARD_INT_CAUSE is 0x0008 and this is IF_CS_BIT_RESP, so I
can get my response back.
[ 7.579410] ec
[ 7.580024] cs 0x0005
[ 7.584767] lc
[ 7.630000] ei, hic 0x0008
[ 7.630000] ep
[ 7.630000] lp
[ 7.630000] li
Here both steps from above happened again.
[ 7.630000] ec
[ 7.630000] cs 0x0007
[ 7.632436] lc
[ 7.960038] libertas: command 0x001f timed out
[ 7.964568] libertas: requeueing command 0x001f due to timeout
(#1)
And here I have the start of a problem. IF_CS_CARD_STATUS is
suddenly 0x0007, which is IF_CS_BIT_TX, IF_CS_BIT_RX and
IF_CS_BIT_COMMAND.
Not sure if the IF_CS_BIT_RX means that we could receive a frame
now. And not sure why we didn't get a call into
if_cs_interrupt() with (IF_CS_HOST_IN_CAUSE | IF_CS_BIT_RX) ==
true.
I also noticed that I sometimes use a 16 bit write to
IF_CS_HOST_STATUS and sometimes an 8 bit write. We'll look into
this more ...
More information about the libertas-dev
mailing list