2008-03-20 05:01:07     Large files & usb drives and a quick DMA question

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

2008-03-20 05:01:07     Large files & usb drives and a quick DMA question

Frans Klaver (NETHERLANDS)

Message: 52821    When testing logging to usb drives on a BF527, I repeatedly ran into usb buffer overflows (or something that looks an awful lot like it), sometimes wrecking the partition data and filesystem. That made me test just copying a file to the usb drive and it turns out that files over approximately 1MB have the same issue. Copying from the usb drive doesn't seem to pose any problems though:

 

/mnt # md5sum Wargods.mp3

a16c3497fea3c64d62491926f1f34657  Wargods.mp3

/mnt # cp Wargods.mp3 /

/mnt # cd /

/ # md5sum Wargods.mp3

a16c3497fea3c64d62491926f1f34657  Wargods.mp3

/ # cp Wargods.mp3 /mnt/wg.mp3

musb_h_tx_flush_fifo 124: Could not flush host TX fifo: csr: 0083

usb 1-1: reset high speed USB device using musb_hdrc and address 3

usb 1-1: reset high speed USB device using musb_hdrc and address 3

usb 1-1: reset high speed USB device using musb_hdrc and address 3

usb 1-1: reset high speed USB device using musb_hdrc and address 3

usb 1-1: reset high speed USB device using musb_hdrc and address 3

sd 1:0:0:0: Device offlined - not ready after error recovery

sd 1:0:0:0: [sda] Result: hostbyte=0x05 driverbyte=0x00

end_request: I/O error, dev sda, sector 23116

sd 1:0:0:0: rejecting I/O to offline device

sd 1:0:0:0: [sda] Result: hostbyte=0x01 driverbyte=0x00

end_request: I/O error, dev sda, sector 23356

sd 1:0:0:0: rejecting I/O to offline device

sd 1:0:0:0: rejecting I/O to offline device

sd 1:0:0:0: rejecting I/O to offline device

sd 1:0:0:0: rejecting I/O to offline device

sd 1:0:0:0: rejecting I/O to offline device

sd 1:0:0:0: rejecting I/O to offline device

sd 1:0:0:0: rejecting I/O to offline device

sd 1:0:0:0: rejecting I/O to offline device

sd 1:0:0:0: rejecting I/O to offline device

sd 1:0:0:0: rejecting I/O to offline device

sd 1:0:0:0: rejecting I/O to offline device

sd 1:0:0:0: rejecting I/O to offline device

sd 1:0:0:0: rejecting I/O to offline device

sd 1:0:0:0: rejecting I/O to offline device

sd 1:0:0:0: rejecting I/O to offline device

sd 1:0:0:0: rejecting I/O to offline device

sd 1:0:0:0: rejecting I/O to offline device

sd 1:0:0:0: rejecting I/O to offline device

sd 1:0:0:0: rejecting I/O to offline device

sd 1:0:0:0: rejecting I/O to offline device

sd 1:0:0:0: rejecting I/O to offline device

sd 1:0:0:0: rejecting I/O to offline device

sd 1:0:0:0: rejecting I/O to offline device

sd 1:0:0:0: rejecting I/O to offline device

Buffer I/O error on device sda1, logical block 3958

lost page write due to I/O error on sda1

sd 1:0:0:0: rejecting I/O to offline device

Buffer I/O error on device sda1, logical block 2011

lost page write due to I/O error on sda1

Buffer I/O error on device sda1, logical block 2012

lost page write due to I/O error on sda1

Buffer I/O error on device sda1, logical block 2013

lost page write due to I/O error on sda1

Buffer I/O error on device sda1, logical block 2014

lost page write due to I/O error on sda1

Buffer I/O error on device sda1, logical block 2015

lost page write due to I/O error on sda1

Buffer I/O error on device sda1, logical block 2016

lost page write due to I/O error on sda1

sd 1:0:0:0: rejecting I/O to offline device

Buffer I/O error on device sda1, logical block 48

lost page write due to I/O error on sda1

Buffer I/O error on device sda1, logical block 49

lost page write due to I/O error on sda1

Buffer I/O error on device sda1, logical block 50

lost page write due to I/O error on sda1

sd 1:0:0:0: rejecting I/O to offline device

FAT: FAT read failed (blocknr 56)

sd 1:0:0:0: rejecting I/O to offline device

FAT: FAT read failed (blocknr 48)

/mnt/wg.mp3: Input/output error

/ # sd 1:0:0:0: rejecting I/O to offline device

sd 1:0:0:0: rejecting I/O to offline device

FAT: unable to read inode block for updating (i_pos 63331)

sd 1:0:0:0: rejecting I/O to offline device

sd 1:0:0:0: rejecting I/O to offline device

sd 1:0:0:0: rejecting I/O to offline device

 

I have seen several posts with the same kind of messages but none of those came up with a solution or at least an explanation for this behaviour. The usb drive is a SanDisk Corp. Cruzer Micro 4GB Flash Drive that actually is a 1GB drive. It may not be the best flash drive out there, but it's certainly not broken and it should definitely be able to receive an 8 MB file. A second usb flash drive (2G) didn't even get recognized.

 

Are there more reported problems with BF527 usb or am I just overlooking some very important kernel thingy?

 

-------

Then also another question: Is there any good reason not to use DMA on usb?

 

[*]   Disable DMA (always use PIO)

 

All examples use this setting in the kernel, and setting it to n just gives me a bunch of errors about DMA addresses not being defined.

config

QuoteReplyEditDelete

 

 

2008-03-20 05:26:30     Re: Large files & usb drives and a quick DMA question

Mike Frysinger (UNITED STATES)

Message: 52824    first, what kernel version are you using ?

 

but at any rate, you're using 0.0 silicon ... that version has known problems with the USB host controller ...

QuoteReplyEditDelete

 

 

2008-03-20 05:31:25     Re: Large files & usb drives and a quick DMA question

Frans Klaver (NETHERLANDS)

Message: 52826    I updated from svn yesterday.

 

If the 0.0 silicon has issues with usb, then I need to look no further.

I take it that I cannot set it to USB-1 speed, as the anomaly list shows no workaround? USB speed isn't of utmost importance to me at this moment.

 

Thanks.

QuoteReplyEditDelete

 

 

2008-03-20 05:58:58     Re: Large files & usb drives and a quick DMA question

Mike Frysinger (UNITED STATES)

Message: 52827    we've been spending our time working on the BF548-EZKIT with 0.1 silicon ... if you could get your hands on one of those kits, that'd be best for prototyping USB stuff currently.  the experience there should translate pretty evenly to the BF527 as they're the same USB part on the chip.

QuoteReplyEditDelete

 

 

2008-03-20 06:11:56     Re: Large files & usb drives and a quick DMA question

Michael Hennerich (GERMANY)

Message: 52829    Frank,

 

What Linux, better what Blackfin Linux Release version are you using?

2008R1 RC8 ?

The USB driver without DMA support on BF527 work pretty solid for me.

 

There have been some bugs related to large files - but they are supposed to be fixed on BF548 as well as on BF527. (No real difference between 52x and 54x in terms of USB ...)

 

Bryan?

 

-Michael

QuoteReplyEditDelete

 

 

2008-03-20 08:17:33     Re: Large files & usb drives and a quick DMA question

Frans Klaver (NETHERLANDS)

Message: 52835    Michael: I'm working from svn right now. Kernel version is 2.6.24.3.

QuoteReplyEditDelete

 

 

2008-03-20 08:26:19     Re: Large files & usb drives and a quick DMA question

Robin Getz (UNITED STATES)

Message: 52837    From:

 

http://www.analog.com/UploadedFiles/REDESIGN_IC_Anomalies/456060555ADSP_BF523_BF525_BF527_Anomaly_List_Rev_C_01_25_08.pdf

 

05000380 - Data Read From L3 Memory by USB DMA May be Corrupted:

DESCRIPTION:

Data read from L3 memory by the USB DMA Controller may have repeated or missing values.

 

This is not an issue that the Linux driver currently works around, since fixed parts are coming soon. (Check with your local ADI contact).

 

As Mike indicated - this issue does not exist on 548 - and the existing driver seems to work there without much issues.

 

As Michael indicated - there are people using the 527 which don't see this happen (very often) and have not seen/reported problems.

 

-Robin

QuoteReplyEditDelete

 

 

2008-03-20 08:29:33     Re: Large files & usb drives and a quick DMA question

Michael Hennerich (GERMANY)

Message: 52838    Frank,

 

please use the 2008R1 RC8 release or the 2008R1 branch in svn.

 

Most of the "fixes"/workarounds for USB only went into the 2008R1 branch.

 

-Michael

 

Revision 4349

Author cooloney

Date 2008-02-26 06:01:23 -0500 (Tue, 26 Feb 2008)

Log Message

Workaround for USB bugs

 

- [#3789] USB-IDE

- [#3806] 30G iPod

- [#3790] [#3807] USB to CF/SD card reader

 

Add this to branch for 2008R1 release, real fix will be added in the future.

QuoteReplyEditDelete

 

 

2008-03-20 09:11:15     Re: Large files & usb drives and a quick DMA question

Frans Klaver (NETHERLANDS)

Message: 52843    Right. Thanks for your time there. I'll be looking forward to fixed parts and also be looking into the 2008 release branch.

Attachments

Outcomes