Re: Problem recognizing card

Mayank Sharma <[email protected]> Wed, 19 Mar 2003 13:38:38 +0530
Newsgroups gmane.linux.pcmcia.devel
Message-ID <[email protected]>
Hi David,
      sorry for being unclear, please forget what i told till now i'll 
try and explain the problem again here.
1. I tried increasing the unreset_limit to 100, does'nt work
2. i have a file sa1100_ipcom.c in which i have defined pcmcia low level 
functions (init,configure,state,shutdown etc..) In the configure_socket 
function of this file, if i add a printk in the begining of the 
function, which just prints socket, vcc, vpp and reset, then the 
following happens
    a. card is getting recognized/initialized and /dev/tts/1 is assigned 
for the card if inserted in slot 1
     b. card is not getting recognized and it hangs apparently in the 
function read_cis_mem (while calling bus_readb), if the card is inserted 
in slot 0.
3. If i comment out the printk described above, then the following happen
   a. card is not recognized in either of the slots and it prints 
message saying increase setup_delay. What is happening here is that when 
the cs does a get_status on the slot, my pcmcia_low_level socket_state 
function is returning not_ready.
   b. I return not_ready when the interrupt line for the corresponding 
slot is low (The interrupt is triggered when it goes low, hence when it 
is alredy low i return not_ready).
   c. I increase the setup_delay, reset_time, unreset_delay and 
unreset_limit. Nothing seems to be working.

Hope you are able to help me this time..
Mayank


David Hinds wrote:

>On Wed, Mar 19, 2003 at 09:49:17AM +0530, Mayank Sharma wrote:
>
>>    little update on the problem that i am facing. When the card is 
>>inserted, the pcmcia driver detects the insertion and tries to configure 
>>the card. uring configuration it first resets the card, calling the 
>>pcmcia_low_level function to reset the card.
>>
>
>But the reset failed, right?
>
>>After resetting the card it 
>>makes an ioctl on the ds driver with the command DS_VALIDATE_CIS. As 
>>part of this command it goes and reads the cis from the card 
>>(read_cis_mem() in cistpl.c). While executing this function it hangs the 
>>system and only card removal restores the system to sane state. 
>>
>
>Err... it only does this when you run "cardctl ident", right?  You
>said the system only hangs when you issue a command to read the CIS
>from a card that did not reset successfully, right?
>
>>Apparently looks like after reseting the card, the first command to read 
>>from the card is hanging(blocking). Any idea how can i debug this problem ?
>>
>
>I do not have any good ideas at the moment.
>
>>  The problem disappears if i put some random printk's in the code, 
>>moreover when the problem disappears, it appears on the other slot. 
>>
>
>Please explain; I don't understand what you're trying to say here at
>all.  Exactly what were the random printk's, what problem went away,
>and how did it appear on the "other slot"?  Didn't the problem affect
>both slots to begin with?  Do the bad cards now work fine??
>
>You also never responded to my suggestion:
>
>>>You could also try putting:
>>>
>>>CORE_OPTS="unreset_limit=100"
>>>
>>>in /etc/sysconfig/pcmcia.
>>>
>
>??
>
>-- Dave
>




-------------------------------------------------------
This SF.net email is sponsored by: Does your code think in ink? 
You could win a Tablet PC. Get a free Tablet PC hat just for playing. 
What are you waiting for?
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en