2008-12-04 04:56:51     SD Card read error

Document created by Aaronwu Employee on Aug 14, 2013
Version 1Show Document
  • View in full screen mode

2008-12-04 04:56:51     SD Card read error

P SENTHIL KUMAR (INDIA)

Message: 66338   

 

Dear All,

 

            I am using 2008R1.5 release,

 

In that released, I had enabled the SPI_MMC driver and vfat for our BF561 based custome board.

 

I can able to mount the vfat to spi_mmc driver and tried the below testing.

 

first i tried to read a 3.3MB file at a single from sdcard, at first i can able to read the complete file.

 

then again, i tried to read the same 3.3MB file from the same sdcard, i am getting below error.

 

BUG: failure at block/elevator.c:780/elv_dequeue_request()!

Kernel panic - not syncing: BUG!

 

Let me know, how to resolve the above issue.

 

Regards, Senthil

QuoteReplyEditDelete

 

 

2008-12-04 05:22:12     Re: SD Card read error

Yi Li (CHINA)

Message: 66342   

 

Senthil,

 

Sorry I cannot understand "

 

first i tried to read a 3.3MB file at a single from sdcard, at first i can able to read the complete file.

 

then again, i tried to read the same 3.3MB file from the same sdcard, i am getting below error."

 

Do you mean the first time you read it, it is OK, then read the same file for the second time, there is error?

 

Please post the full test steps and messages ( from insert card to read failture).

 

-Yi

 

"

QuoteReplyEditDelete

 

 

2008-12-04 05:23:46     Re: SD Card read error

P SENTHIL KUMAR (INDIA)

Message: 66343   

 

Hi all,

 

          While read the 2.3 MB file, i am getting the below error.

 

end_request: I/O error, dev spi_mmc, sector 12537

end_request: I/O error, dev spi_mmc, sector 12545

end_request: I/O error, dev spi_mmc, sector 12553

end_request: I/O error, dev spi_mmc, sector 12561

BUG: failure at block/elevator.c:780/elv_dequeue_request()!

Kernel panic - not syncing: BUG!

 

 

 

Regards, Senthil

QuoteReplyEditDelete

 

 

2008-12-04 05:45:19     Re: SD Card read error

P SENTHIL KUMAR (INDIA)

Message: 66344   

 

HI Yi,

 

Thanks for the reply and Sorry for the inconvience message,

 

you are right at the first read, i can able to read the file.

 

but during the second attempt i am getting the issue.

 

Below are my testing sequences for reading the file from SDCard

 

Step 1: Inserting the sdcard into the sdcard slot.

 

Step 2: power on the board.

 

Step 3: booting the kernel from sdram using bootm 0x1200000

 

then, below are the other testing sequences for reading the file from sdcard.

 

root:/>

root:/> mount -t vfat /dev/spi_mmc /mnt

root:/> cd mnt/

root:/mnt> ls

Bird.BMP     Leaf.jpg     Test5.ogg    ketchup.mp3

root:/>

root:/>

root:/>

root:/bin> ./NetFrame

In Main

Fsize = 150843

Buffer start address = 4c0004

BUG: failure at block/elevator.c:780/elv_dequeue_request()!

Kernel panic - not syncing: BUG!

 

 

 

Now, i had found there is some inconsistency of reading the files from sdcard that is sometimes i can able to read the 2 MB and 3MB files.

 

Let me know some suggestion to fix this issue.

 

Regards, Senthil

QuoteReplyEditDelete

 

 

2008-12-04 05:53:15     Re: SD Card read error

Ian Jeffray (UNITED KINGDOM)

Message: 66345   

 

What exactly does "NetFrame" do?  Have you tried just verifying read operation using something standard like 'dd' for example?

 

 

QuoteReplyEditDelete

 

 

2008-12-04 05:58:55     Re: SD Card read error

P SENTHIL KUMAR (INDIA)

Message: 66346   

 

HI Ian Jeffray,

 

          Thanks for the reply, Netframe just open a file and read it. thats it

 

Regards, Senthil

QuoteReplyEditDelete

 

 

2008-12-04 07:18:47     Re: SD Card read error

P SENTHIL KUMAR (INDIA)

Message: 66348   

 

HI Ian Jeffray,

 

              Netframe is the testing application, which open a file using fopen() and reads the file using fread().

 

while reading the file, i am getting this issue.

 

Let me know, how can i resolve this issue.

 

Regards,Senthil

 

 

QuoteReplyEditDelete

 

 

2008-12-04 07:25:22     Re: SD Card read error

Robin Getz (UNITED STATES)

Message: 66351   

 

Senthil:

 

Can you try using md5sum on the file - to see if the same thing happens?

 

-Robin

QuoteReplyEditDelete

 

 

2008-12-04 08:08:03     Re: SD Card read error

P SENTHIL KUMAR (INDIA)

Message: 66354   

 

hi Robin,

 

Thanks for the suggestion,

 

I had checked using md5sum option. i am not getting any issues.

 

below the test results from the root prompt.

 

root:/mnt> ls

Bird.BMP      Leaf.jpg      Test5.ogg     britney1.wma  ketchup.mp3

root:/mnt> md5sum ketchup.mp3

a69760a797c562c7110b83742ce99525  ketchup.mp3

root:/mnt> md5sum Test5.ogg

b3abdc94a03830785fa29df2df2ed5fd  Test5.ogg

 

 

 

Regards,Senthil

QuoteReplyEditDelete

 

 

2008-12-04 08:15:16     Re: SD Card read error

Ian Jeffray (UNITED KINGDOM)

Message: 66355   

 

Since md5sum works.  And you didn't try dd (?) May I respectfully suggest it's your code that's at fault.  Perhaps not a large enough read buffer?  I've used SD cards a fair amount with Blackfin linux with no real problem.

 

 

QuoteReplyEditDelete

 

 

2008-12-04 08:36:09     Re: SD Card read error

P SENTHIL KUMAR (INDIA)

Message: 66356   

 

Hi Ian Jeffray,

 

Thanks for the suggestion.

 

I doesnt tried using dd. Now i can try it using dd and i cross check my codes once again.

 

As you told that, you done SDcard reading using fair amount with blackfin on linux.

 

Let me know the fair amount you have tried with blackfin on linux.

 

Regards,Senthil

QuoteReplyEditDelete

 

 

2008-12-04 11:48:32     Re: SD Card read error

Robin Getz (UNITED STATES)

Message: 66359   

 

Senthil:

 

try something like:

 

while [[ "`md5sum ketchup.mp3 | awk '{print $1}'`" == " a69760a797c562c7110b83742ce99525" ]] ; do echo -n " OK" ; done

 

and let it run overnight. If it runs OK - the problem is in your code. If it fails - it is our fault, and we can look into it.

 

-Robin

QuoteReplyEditDelete

 

 

2008-12-04 13:35:57     Re: SD Card read error

Robin Getz (UNITED STATES)

Message: 66361   

 

Michael pointed out to me that this is wrong. you need to do something like:

 

while [[ "`md5sum ketchup.mp3 | awk '{print $1}'`" == " a69760a797c562c7110b83742ce99525" ]] ; do sync; echo 3 > /proc/sys/vm/drop_caches ; echo -n " OK" ; done

 

Otherwise it will not re-read the SD card. the echo 3 > ... will cause current pagecache, dentries and inodes to be freed.

 

-Robin

QuoteReplyEditDelete

 

 

2008-12-05 00:36:48     Re: SD Card read error

P SENTHIL KUMAR (INDIA)

Message: 66371   

 

HI Robin

 

Thanks for the suggestion and reply.

 

I will do the testing and let you the result as soon as possible.

 

below is the simple code that i am using for my testing

 

       fp = fopen("/mnt/britney1.wma","rb");

 

        if(fp)

        {

                fseek (fp , 0 , SEEK_END);

                FileSize = ftell (fp);

                rewind (fp);

                printf("Fsize = %d\n",FileSize);

                TestBuffer= (char*) malloc (sizeof(char)*FileSize);

                if( TestBuffer == NULL)  return;

                else printf("Buffer start address = %0x\n",TestBuffer);

                printf("Calling fread\n");

                retval = fread(TestBuffer, sizeof(char), FileSize, fp);

                printf("fread ended\n");

                if(retval > 0) printf("%d bytes read\n", retval);

                else    printf("Error while read %d \n",retval);

 

                fclose(fp);

        }

        else

                printf("the file doesn't exist\r\n");

 

Let me know where i have to include your test code for testing.

 

also, let me know how and where i have to use the dd command for reading the file from sdcard

 

Regards, Senthil

 

 

 

 

QuoteReplyEditDelete

 

 

2008-12-05 01:00:16     Re: SD Card read error

Yi Li (CHINA)

Message: 66372   

 

Senthil,

 

Robin's test code is shell scrpt.

 

-Yi

QuoteReplyEditDelete

 

 

2008-12-05 02:08:10     Re: SD Card read error

P SENTHIL KUMAR (INDIA)

Message: 66377   

 

Hi YI,

 

Thanks for the reply.

 

I doesnt have much experience on shell script code.

 

Let me know what does the code will do.

 

since, i am getting nothing while executing the shell script code given by robin.

 

below are the detailed execution steps, that i had done for executing the shell script.

 

step 1 : first i had copied the test code suggested by robin in a file(Readtest)

 

step 2 : second executing the ./Readtest

 

while [[ "`md5sum /mnt/ketchup.mp3 | awk '{print $1}'`" == " a69760a797c562c7110

do sync;

echo 3 > /proc/sys/vm/drop_caches;

echo -n " OK" ;

done

 

~

~

~

~

root:/bin> ./Readtest

root:/bin>

 

Let me know what does the test shell script will do.

 

Regards, Senthil

QuoteReplyEditDelete

 

 

2008-12-05 03:26:02     Re: SD Card read error

Yi Li (CHINA)

Message: 66380   

 

The script tries to repeatly read file "/mnt/ketchup.mp3" from sd card, and test each read is the same. Please read a book on shell script for details.

 

-Yi

QuoteReplyEditDelete

 

 

2008-12-05 03:37:23     Re: SD Card read error

Wolfgang Muees (GERMANY)

Message: 66382   

 

Senthil,

 

you may want to read this thread:

 

blackfin.uclinux.org/gf/project/uclinux-dist/forum/?action=ForumBrowse&forum_id=39&_forum_action=ForumMessageBrowse&thread_id=31066

 

 

TranslateQuoteReplyEditDelete

 

 

2008-12-05 04:06:32     Re: SD Card read error

P SENTHIL KUMAR (INDIA)

Message: 66383   

 

Hi Ian Jaffrey, YI, Robin,Muees,

 

I am tried to read the files using dd command.

 

below are the status of reading.

 

root:/>

root:/> eth0: link up, 100Mbps, full-duplex, lpa 0x45E1

 

root:/>

root:/>

root:/>

root:/> mount -t vfat /dev/spi_mmc /mnt

root:/> cd mnt/

root:/mnt> ls

Bird.BMP      Leaf.jpg      Test5.ogg     britney1.wma  ketchup.mp3

root:/mnt> cd ..

root:/> ls

bin   etc   init  mnt   root  sys   usr

dev   home  lib   proc  sbin  tmp   var

root:/> dd if=/mnt/leaf.jpg of=/tmp/leafRd.jpg bs=150843

1+0 records in

1+0 records out

root:/> ls

bin   etc   init  mnt   root  sys   usr

dev   home  lib   proc  sbin  tmp   var

root:/> cd tmp/

root:/tmp> ls

leafRd.jpg

root:/tmp> cd ..

root:/> dd if=/mnt/bird.bmp of=/tmp/birdRd.bmp bs=230454

1+0 records in

1+0 records out

root:/> cd tmp/

root:/tmp> ls

birdRd.bmp  leafRd.jpg -- files copied using dd command with consistency

root:/tmp> cd ..

root:/> dd if=/mnt/ketchup.mp3 of=/tmp/KetchupRead.mp3 bs=1648760

BUG: failure at block/elevator.c:780/elv_dequeue_request()!

Kernel panic - not syncing: BUG!

 

root:/tmp> cd ..

root:/> dd if=/mnt/britney1.wma of=/tmp/britneyRd.wma bs=1648760

end_request: I/O error, dev spi_mmc, sector 12712

1+0 records in

BUG: failure at

 

 

 

Let me know your suggestion

 

Regards,Senthil

QuoteReplyEditDelete

 

 

2008-12-05 06:55:05     Re: SD Card read error

Robin Getz (UNITED STATES)

Message: 66404   

 

Senthil:

 

Just type it at the command line - no file.

 

It exited since you did not copy paste properly.

 

-Robin

QuoteReplyEditDelete

 

 

2008-12-05 06:56:18     Re: SD Card read error

Ian Jeffray (UNITED KINGDOM)

Message: 66405   

 

I can't reproduce that kind of failure here.  Never seen it.  A bit of googling makes me wonder if this may be related:

 

www.gossamer-threads.com/lists/linux/kernel/1002812

 

 

QuoteReplyEditDelete

 

 

2008-12-05 08:54:31     Re: SD Card read error

P SENTHIL KUMAR (INDIA)

Message: 66409   

 

Hi Ian Jeffray and others,

 

Thanks for your suggestion.

 

Let me know how to fix this issue.

 

Regards,Senthil

QuoteReplyEditDelete

 

 

2008-12-05 09:28:02     Re: SD Card read error

P SENTHIL KUMAR (INDIA)

Message: 66411   

 

Hi Robin,

 

As per your suggestion, i had typed the test code in command prompt.

 

I am getting syntax error.

 

below are the display details from the root prompt

 

root:/>

root:/>

root:/>

root:/> mount -t vfat /dev/spi_mmc /mnt

root:/>

root:/>

root:/>

root:/>

root:/>

root:/>

root:/>

root:/>

root:/> which [[ "`md5sum /mnt/ketchup.mp3 | awk '{print $1}'`" == " a69760a797c562c7110b83742ce99525" ]];do sync;echo 3> /proc/sys/vm/drop_caches;echo -n "OK";done

syntax error

root:/> which [["`md5sum /mnt/ketchup.mp3|awk'(print $1}'`"=="a69760a797c562c7110b83742ce99525"]];do sync;echo 3>/proc/sys/vm/drop_caches;echo -n"OK";done

syntax error

root:/>

root:/>

root:/>

root:/>

root:/> which [[ "`md5sum /mnt/ketchup.mp3 | awk '{print $1}'`" == " a69760a797c562c7110b83742ce99525" ]]; do sync; echo 3 > proc/sys/vm/drop_caches; echo -n "OK"; done

syntax error

root:/>

 

Regards, Senthil

QuoteReplyEditDelete

 

 

2008-12-05 09:44:14     Re: SD Card read error

Phil Wilshire (UNITED STATES)

Message: 66413   

 

while

 

not

 

which

 

  Phil

QuoteReplyEditDelete

 

 

2008-12-05 10:12:16     Re: SD Card read error

P SENTHIL KUMAR (INDIA)

Message: 66414   

 

Hi Phil,

 

Thanks for the suggestion.

 

Hi Robin,

 

I had tried the execution on command line.

 

After typing the command in command line, i just typed enter.

 

After some few seconds the root prompt comes to it original state.

 

below is the execution status from the command line

 

root:/> while [[ "`md5sum /mnt/ketchup.mp3 | awk '{print $1}'`" == " a69760a797c562c7110b83742ce99525" ]]; do sync; echo 3 >

/proc/sys/vm/drop_caches;echo -n "OK"; done

root:/>

 

 

 

Regards.Senthil

 

 

QuoteReplyEditDelete

 

 

2008-12-05 23:06:43     Re: SD Card read error

P SENTHIL KUMAR (INDIA)

Message: 66433   

 

Hi all,

 

Did anyone fixed the above issue in uclinux2008R1.5.

 

Let me know your suggestion to fix the issue.

 

Regards, Senthil

QuoteReplyEditDelete

 

 

2008-12-07 21:51:16     Re: SD Card read error

Robin Getz (UNITED STATES)

Message: 66483   

 

Senthil:

 

You have an extra spaces between the " and the 'a'

 

-Robin

QuoteReplyEditDelete

 

 

2008-12-08 00:21:50     Re: SD Card read error

P SENTHIL KUMAR (INDIA)

Message: 66488   

 

HI Robin,

 

below are status of testing.

 

root:/>

root:/> while [["`md5sum /mnt/ketchup.mp3 | awk '{print $1}'`"=="a69760a797c562c7110b83742ce99525"]]; do sync; echo 3 >/proc/sys/vm/drop_caches; echo -n "OK"; done

[[a69760a797c562c7110b83742ce99525==a69760a797c562c7110b83742ce99525]]: not found

root:/> cd mnt/

root:/mnt> ls

Bird.BMP      Leaf.jpg      Test5.ogg     britney1.wma  ketchup.mp3

root:/mnt> md5sum ketchup.mp3

a69760a797c562c7110b83742ce99525  ketchup.mp3

root:/mnt> while [["`md5sum ketchup.mp3 | awk '{print $1}'`"=="a69760a797c562c7110b83742ce99525"]]; do sync; echo 3 >/proc/sys/vm/drop_caches; echo -n "OK"; done

[[a69760a797c562c7110b83742ce99525==a69760a797c562c7110b83742ce99525]]: not found

root:/mnt>

root:/mnt>

 

Regards,Senthil

QuoteReplyEditDelete

 

 

2008-12-08 06:48:03     Re: SD Card read error

P SENTHIL KUMAR (INDIA)

Message: 66500   

 

HI Robin,

 

After some continuous execution, i had found the below status of exection.

 

root:/> cd mnt/

root:/mnt> ls

Bird.BMP      Test5.ogg     jpegtest.jpg  machines.jpg

Leaf.jpg      britney1.wma  ketchup.mp3

root:/mnt> while [["`md5sum ketchup.mp3 | awk '{print $1}'`"=="a69760a797c562c7110b83742ce99525"]]; do sync; echo 3 > /proc/sys/vm/drop_caches; echo -n "OK"; done

BUG: failure at block/elevator.c:780/elv_dequeue_request()!

Kernel panic - not syncing: BUG!

 

Let me know how i have to debug to fix the issue.

 

Senthil:

 

try something like:

 

while [[ "`md5sum ketchup.mp3 | awk '{print $1}'`" == " a69760a797c562c7110b83742ce99525" ]] ; do echo -n " OK" ; done

 

and let it run overnight. If it runs OK - the problem is in your code. If it fails - it is our fault, and we can look into it.

 

-Robin

 

As per your statement on 4-12-08, please check it.

 

Regards,Senthil

QuoteReplyEditDelete

 

 

2008-12-11 01:25:22     Re: SD Card read error

P SENTHIL KUMAR (INDIA)

Message: 66616   

 

Hi Robin and all,

 

Let me know, did anyone fixed the above issue.

 

Regards,Senthil

QuoteReplyEditDelete

 

 

2009-01-07 08:02:49     Re: SD Card read error

Robin Getz (UNITED STATES)

Message: 67556   

 

Senthil:

 

No one has looked at it - since you are not running the commands like we asked.

 

It is a simple matter of copy/paste.

 

-Robin

QuoteReplyEditDelete

 

 

2009-01-08 02:50:21     Re: SD Card read error

P SENTHIL KUMAR (INDIA)

Message: 67606   

 

Robin,

 

Thanks for the suggestion, please check the below message details

 

2008-12-04 19:48:32     Re: SD Card read error

Robin Getz (UNITED STATES)

Message ID: 66359    

 

Senthil:

 

try something like:

 

while [[ "`md5sum ketchup.mp3 | awk '{print $1}'`" == " a69760a797c562c7110b83742ce99525" ]] ; do echo -n " OK" ; done

 

and let it run overnight. If it runs OK - the problem is in your code. If it fails - it is our fault, and we can look into it.

 

-Robin

QuoteReply

 

 

 

2008-12-04 21:35:57     Re: SD Card read error

Robin Getz (UNITED STATES)

Message ID: 66361    

 

Michael pointed out to me that this is wrong. you need to do something like:

 

while [[ "`md5sum ketchup.mp3 | awk '{print $1}'`" == " a69760a797c562c7110b83742ce99525" ]] ; do sync; echo 3 > /proc/sys/vm/drop_caches ; echo -n " OK" ; done

 

Otherwise it will not re-read the SD card. the echo 3 > ... will cause current pagecache, dentries and inodes to be freed.

 

-Robin

 

 

 

As per suggestion( Message ID : 66361) only i am doing

 

Let me know where, i had done mistake.

 

Regards, Senthil

QuoteReplyEditDelete

 

 

2009-01-15 09:45:38     Re: SD Card read error

Robin Getz (UNITED STATES)

Message: 67986   

 

I just do something like:

 

root:/> md5sum /bin/busybox

2e45a31eb4c31b9fba1579066803edea  /bin/busybox

 

root:/> while [[ "`md5sum /bin/busybox | awk '{print $1}'`" == "2e45a31eb4c31b9fba1579066803edea" ]] ; do sync; echo 3 > /proc/sys/vm/drop_caches ; echo -n " OK" ; done

 

spaces around quotes are important. and should/shouldnot be there.

 

-Robin

QuoteReplyEditDelete

 

 

2009-02-26 02:29:32     Re: SD Card read error

P SENTHIL KUMAR (INDIA)

Message: 69940   

 

Hi Robin,

 

Thanks for the suggestion, i will try and let you know the results soon.

 

Regards,Senthil

QuoteReplyEditDelete

 

 

2009-02-26 02:38:25     Re: SD Card read error

P SENTHIL KUMAR (INDIA)

Message: 69941   

 

Hi Robin,

 

As per your suggestion, i tried to read a file sdcard after mounting, i am getting below output

 

root:/sdcard> while [[ "`md5sum jpg18.jpg | awk '{print $1}'`" == "cb5735b29bdc21eff5739d27e0b52cab" ]] ; do sync; echo 3 > /proc/sys/vm/drop_caches ; echo -n " OK" ; done

/proc/sys/vm/drop_caches: cannot create

OK/proc/sys/vm/drop_caches: cannot create

OK/proc/sys/vm/drop_caches: cannot create

OK/proc/sys/vm/drop_caches: cannot create

 

Let me know, what could the problem.

 

Regards,Sentil

QuoteReplyEditDelete

 

 

2009-02-26 05:35:32     Re: SD Card read error

P SENTHIL KUMAR (INDIA)

Message: 69965   

 

Hi Robin,

 

Actually i had left the configuration of /proc/sys at filesystem.

 

Please find my below testing results.

 

I had used 3MB mp3 file for testing.

 

Its works only for about 2 minutes after that its crashed.

 

root:/sdcard>

root:/sdcard> while [[ "`md5sum Barbie.mp3 | awk '{print $1}'`" == "ee47b8bee788d8a7c050c486690ca7fc" ]] ; do sync; echo 3 >

/proc/sys/vm/drop_caches ; echo -n " OK" ; done

OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK

OK OK OK OK OK OK OK OK OK OK BUG: failure at block/elevator.c:780/elv_dequeue_request()!

Kernel panic - not syncing: BUG!

 

As you told earlier

 

2008-12-04 19:48:32     Re: SD Card read error

Robin Getz (UNITED STATES)

Message ID: 66359    

 

Senthil:

 

try something like:

 

while [[ "`md5sum ketchup.mp3 | awk '{print $1}'`" == " a69760a797c562c7110b83742ce99525" ]] ; do echo -n " OK" ; done

 

and let it run overnight. If it runs OK - the problem is in your code. If it fails - it is our fault, and we can look into it.

 

-Robin

 

Please suggest me to fix the issue.

 

Regards, Senthil

QuoteReplyEditDelete

 

 

2009-02-26 15:08:37     Re: SD Card read error

Robin Getz (UNITED STATES)

Message: 70036   

 

Senthil:

 

While we dig into it - can you move the file into a different file system, and see if you can recreate the same issue?

 

Thanks

QuoteReplyEditDelete

 

 

2009-02-26 23:23:21     Re: SD Card read error

P SENTHIL KUMAR (INDIA)

Message: 70058   

 

Hi Robin,

 

Thanks for your reply and suggestion.

 

Actually we need vfat filesystem only for our application.

 

I will try with other filesystems as per your suggestion and let you know the results soon.

 

Regards, Senthil

 

 

QuoteReplyEditDelete

 

 

2009-03-02 07:29:59     Re: SD Card read error

Robin Getz (UNITED STATES)

Message: 70215   

 

Senthil:

 

We tested on a 537, and could not replicate the problem. We are trying to test on a 561 - but it might take a little longer, as we have to make some hardware.

 

What exact version of 2008R1.5 are you using - the latest branch? svn/linux-kernel/branches/2008R1 - revision 6141 (last updated Thu, 19 Feb 2009) - this is what we are testing on.

 

-Robin

QuoteReplyEditDelete

 

 

2009-03-02 09:27:42     Re: SD Card read error

P SENTHIL KUMAR (INDIA)

Message: 70222   

 

Hi Robin,

 

Thanks for the testing and suggestion,

 

Actually i am using the following distribution downloaded from the following path  blackfin.uclinux.org/gf/project/uclinux-dist/frs

 

Distribution Name: uClinux-dist-2008R1.5-RC3.tar.bz2

 

File Size : 341.02MB

 

I am not using any updated svn/linux-kernel/branches/2008R1

 

Regards, Senthil

 

 

QuoteReplyEditDelete

 

 

2009-03-02 10:35:26     Re: SD Card read error

Robin Getz (UNITED STATES)

Message: 70226   

 

Senthil:

 

There have been lots (too many to count) bug fixed which are applied to the svn branch - which would not be in the tarball.

 

Can you do a checkout on the svn branch and try it out?

 

-Robin

QuoteReplyEditDelete

 

 

2009-03-02 23:17:07     Re: SD Card read error

P SENTHIL KUMAR (INDIA)

Message: 70238   

 

Hi Robin,

 

Thanks for the suggestion, i will try with svn branch.

 

Actually we are using BF561 based custom board for our appplication.

 

Regards,Senthil

QuoteReplyEditDelete

 

 

2009-03-04 01:18:36     Re: SD Card read error

P SENTHIL KUMAR (INDIA)

Message: 70318   

 

Hi Robin,

 

Sorry the delay,

 

As pey your suggestion, i had tried with msdos file system, with them also i am getting the same kind of issue.

 

please find the below for the testings.

 

root:/>

root:/>

root:/>

root:/>

root:/>

root:/> mount -t msdos /dev/spi_mmc /sdcard/

root:/> cd sdcard/

root:/sdcard> ls

barbie.mp3    flower~1.jpg  flower~2.jpg  jpg04.jpg     jpg18.jpg

root:/sdcard>

root:/sdcard>

root:/sdcard> while [[ "`md5sum Barbie.mp3 | awk '{print $1}'`" == "ee47b8bee788d8a7c050c486690ca7fc" ]] ; do sync; echo 3 >

/proc/sys/vm/drop_caches ; echo -n " OK" ; done

OKBUG: failure at block/elevator.c:780/elv_dequeue_request()!

Kernel panic - not syncing: BUG!

 

Also, i cant able to find the svn/linux-kernel/branches/2008R1( revision:6141) at the SVN.

 

Regards, Senthil

QuoteReplyEditDelete

 

 

2009-03-04 05:57:28     Re: SD Card read error

Michael Heiser (GERMANY)

Message: 70366   

 

Hey guys,

 

The same problem has occured while testing my uClinux-dist 2008R1.5. My MMC card is not mounting and i get following error.

 

root:/> mount -t vfat /dev/spi_mmc /media

New MMC/SD card found: 3843 MB(4029677568 bytes)

spi_mmc:

root:/> BUG: failure at block/elevator.c:780/elv_dequeue_request()!

Kernel panic - not syncing: BUG!

 

hope you can help me

 

Also I post my Bugreport as Mike told me in another thread.

 

Regards Michael

 

bugreport.tgz

TranslateQuoteReplyEditDelete

 

 

2009-03-05 08:35:44     Re: SD Card read error

Michael Heiser (GERMANY)

Message: 70448   

 

Does no one of you have any suggestions?

 

Regards Michael

TranslateQuoteReplyEditDelete

 

 

2009-03-05 09:23:27     Re: SD Card read error

Wolfgang Muees (GERMANY)

Message: 70449   

 

Michael,

 

any reason you are NOT using the mmc_spi driver?

 

It will give you enhanced compatibility for some ugly SD cards, and SDHC cards are supported.

 

Topic to read:

 

https://blackfin.uclinux.org/gf/project/uclinux-dist/forum/?action=ForumBrowse&forum_id=39&_forum_thread_total=100&_forum_thread_page=3&_forum_action=ForumMessageBrowse&thread_id=31066

 

regards

 

Wolfgang

TranslateQuoteReplyEditDelete

 

 

2009-03-05 21:20:46     Re: SD Card read error

Yi Li (CHINA)

Message: 70480   

 

Michael and Wolfgang,

 

I think Michael is using 2008R1.5 release - we usually suggest 2008R1.5 user to use 2008R1.5 branch in SVN (for bug fixes). However, the bfin-spi driver and mmc-spi driver fixes are not back ported to 2008R1.5 branch, i.e, people have to use svn trunk in order to use mmc-spi driver on Blackfin.  - It seems we need to do the back port. So Michael, you can choose to, use mmc-spi driver in SVN trunk, or back port the fix in svn trunk to 2008R1.5 branch.

 

-Yi

QuoteReplyEditDelete

 

 

2009-03-06 02:12:38     Re: SD Card read error

Michael Heiser (GERMANY)

Message: 70496   

 

Dear Wolfgang and Yi,

 

Thanks for your suggestions. Indeed I'm using 2008R1.5RC3. So I have to go for SVN Trunk and then backport the driver.

 

Regards Michael

TranslateQuoteReplyEditDelete

 

 

2009-03-09 00:44:31     Re: SD Card read error

P SENTHIL KUMAR (INDIA)

Message: 70571   

 

Hi Robin and others,

 

As per your suggestion, i had downloaded the file(bfin_5xx.c)( Revision :6141 last updated Mar2 feb 2009).

 

I replaced that file only with the uclinux distribution 2008R1.5 and compiled the distribution. I am getting compilation below compilation issues.

 

  CC      drivers/serial/bfin_5xx.o

In file included from <command line>:1:

./include/linux/autoconf.h:211:24: warning: missing whitespace after the macro name

drivers/serial/bfin_5xx.c:1: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âOnâ

drivers/serial/bfin_5xx.c:32:34: error: mach/bfin_serial_5xx.h: No such file or directory

drivers/serial/bfin_5xx.c:46: error: âBFIN_UART_NR_PORTSâ undeclared here (not in a function)

drivers/serial/bfin_5xx.c:47: error: âbfin_serial_resourceâ undeclared here (not in a function)

drivers/serial/bfin_5xx.c:47: warning: type defaults to âintâ in declaration of âtype nameâ

drivers/serial/bfin_5xx.c:47: warning: type defaults to âintâ in declaration of âtype nameâ

drivers/serial/bfin_5xx.c:47: error: size of array âtype nameâ is negative

drivers/serial/bfin_5xx.c: In function âbfin_serial_stop_txâ:

drivers/serial/bfin_5xx.c:82: error: dereferencing pointer to incomplete type

drivers/serial/bfin_5xx.c:85: warning: implicit declaration of function âUART_GET_LSRâ

drivers/serial/bfin_5xx.c:89: warning: implicit declaration of function âdisable_dmaâ

drivers/serial/bfin_5xx.c:89: error: dereferencing pointer to incomplete type

drivers/serial/bfin_5xx.c:90: error: dereferencing pointer to incomplete type

drivers/serial/bfin_5xx.c:91: error: dereferencing pointer to incomplete type

drivers/serial/bfin_5xx.c:91: error: dereferencing pointer to incomplete type

drivers/serial/bfin_5xx.c:92: error: dereferencing pointer to incomplete type

drivers/serial/bfin_5xx.c:93: error: dereferencing pointer to incomplete type

drivers/serial/bfin_5xx.c: In function âbfin_serial_start_txâ:

drivers/serial/bfin_5xx.c:109: error: dereferencing pointer to incomplete type

drivers/serial/bfin_5xx.c:119: error: dereferencing pointer to incomplete type

drivers/serial/bfin_5xx.c: In function âbfin_serial_stop_rxâ:

drivers/serial/bfin_5xx.c:134: warning: implicit declaration of function âUART_CLEAR_IERâ

drivers/serial/bfin_5xx.c: In function âbfin_serial_dma_tx_charsâ:

drivers/serial/bfin_5xx.c:318: error: dereferencing pointer to incomplete type

drivers/serial/bfin_5xx.c:320: error: dereferencing pointer to incomplete type

drivers/serial/bfin_5xx.c:322: error: dereferencing pointer to incomplete type

drivers/serial/bfin_5xx.c:322: error: dereferencing pointer to incomplete type

drivers/serial/bfin_5xx.c:323: error: dereferencing pointer to incomplete type

drivers/serial/bfin_5xx.c:324: error: dereferencing pointer to incomplete type

drivers/serial/bfin_5xx.c:328: error: dereferencing pointer to incomplete type

drivers/serial/bfin_5xx.c:329: warning: implicit declaration of function âUART_PUT_CHARâ

drivers/serial/bfin_5xx.c:329: error: dereferencing pointer to incomplete type

drivers/serial/bfin_5xx.c:330: error: dereferencing pointer to incomplete type

drivers/serial/bfin_5xx.c:331: error: dereferencing pointer to incomplete type

 

 

Let me know your suggestion, whether I had done the proper downloading and compilations.

 

Hi wolfgang,

 

As per your suggestion, I had looked on the spi frame driver also. Actually, you had done it for bf52X processor. we are using custom board with bf561, i cant able to find the configuration macros CONFIG_SPI_MMC and CONFIG_SPI_MMC_MODULE for bf561 board.

 

You suggestion fine, but i think its better to work on spi_mmc to fix the issue.

 

Hi Heiser,

 

Have you tested the spi_mmc on 2008R1.5RC3.

 

Regards, Senthil

QuoteReplyEditDelete

 

 

2009-03-09 00:52:39     Re: SD Card read error

Mike Frysinger (UNITED STATES)

Message: 70572   

 

that isnt going to work, nor is it supported.  you have to use the entire kernel from svn.

QuoteReplyEditDelete

 

 

2009-03-11 06:23:27     Re: SD Card read error

P SENTHIL KUMAR (INDIA)

Message: 70757   

 

Hi Mike and Robin,

 

As per your suggestion, I had downloaded the svn from the following path

 

https://blackfin.uclinux.org/gf/project/uclinux-dist/frs/

 

File Name : uclinux-dist-trunk-svn.src.tar.tar, Size : 498.68 MB

 

I had just taken the linux.2.6.x folder from the above distribution and replaced the with the old linux.2.6.x kernel, which is downloaded from the above mentioned path only. I had already mentioned in my previous mail that what version and from where i had downloaded the distribution.

 

Now, i had configured the new kernel and mmc_spi as per the helper document at below address for 2009R1 Release and later.

 

docs.blackfin.uclinux.org/doku.php?id=linux-kernel:drivers:spi_mmc&s[]=spi&s[]=mmc

 

As you know that the helper document is for BF537 stamp board.

 

Also, you know that, i am using BF561 custom board for our testing, Let me know where i have to add the below configuration for the BF561 board. whether i have to add it in ezkit.c or cm_bf561.c file at arch/blackfin/mach-bf561/boards.

2009R1 Release and Later

 

SPI support  --->

    *** SPI Master Controller Drivers ***

    {*}   SPI controller driver for ADI Blackfin5xx

 

 

 

MMC/SD/SDIO card support  --->

    <*>   MMC block device driver (NEW)

    [*]     Use bounce buffer for simple hosts (NEW)

    <*>   MMC/SD/SDIO over SPI

 

static struct spi_board_info bfin_spi_board_info[] __initdata = {

[snip]

#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)

        {

                .modalias = "mmc_spi",

                .max_speed_hz = 20000000,     /* max spi clock (SCK) speed in HZ */

                .bus_num = 0,

                .chip_select = 4,

                .platform_data = &bfin_mmc_spi_pdata,

                .controller_data = &mmc_spi_chip_info,

                .mode = SPI_MODE_3,

        },

#endif

[snip]

}

 

Also:

 

#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)

#define MMC_SPI_CARD_DETECT_INT IRQ_PF5

 

static int bfin_mmc_spi_init(struct device *dev,

        irqreturn_t (*detect_int)(int, void *), void *data)

{

        return request_irq(MMC_SPI_CARD_DETECT_INT, detect_int,

                IRQF_TRIGGER_FALLING, "mmc-spi-detect", data);

}

 

static void bfin_mmc_spi_exit(struct device *dev, void *data)

{

        free_irq(MMC_SPI_CARD_DETECT_INT, data);

}

 

static struct mmc_spi_platform_data bfin_mmc_spi_pdata = {

        .init = bfin_mmc_spi_init,

        .exit = bfin_mmc_spi_exit,

        .detect_delay = 100, /* msecs */

};

 

static struct bfin5xx_spi_chip  mmc_spi_chip_info = {

        .enable_dma = 0,

        .bits_per_word = 8,

};

#endif

 

Regards, Senthil

Attachments

    Outcomes