USB/mmc rootfs conflict - vexpress

Bug #632798 reported by Matt Waddel
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux-linaro (Ubuntu)
Invalid
Medium
Matt Waddel
linux-linaro-vexpress (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

If I mount the rootfs on the USB drive I get thousands of
errors related to the SD card like those seen below. After
booting I cannot mount the SD card partitions.

If I mount the same rootfs on the SD device first everything
works without errors.

---
Linux version 2.6.35-1004-linaro-vexpress (buildd@gourd) (gcc version 4.4.5 20100824 (prerelease) (Ubuntu/Linaro 4.4.4-9ubuntu2) ) #9-Ubuntu SMP Tue Aug 31 04:07:44 UTC 2010 (Ubuntu 2.6.35-1004.9-linaro-vexpress 2.6.35.3)
...
mmcblk0: error -5 transferring data, sector 3964802, nr 6, card status 0xb00
end_request: I/O error, dev mmcblk0, sector 3964802
Buffer I/O error on device mmcblk0, logical block 495600
mmcblk0: error -5 transferring data, sector 3964807, nr 1, card status 0x900
end_request: I/O error, dev mmcblk0, sector 3964807
Buffer I/O error on device mmcblk0, logical block 495600
mmcblk0: error -5 transferring data, sector 3964915, nr 5, card status 0xb00
end_request: I/O error, dev mmcblk0, sector 3964915
Buffer I/O error on device mmcblk0, logical block 495614
mmcblk0: error -5 transferring data, sector 3964913, nr 7, card status 0xb00
end_request: I/O error, dev mmcblk0, sector 3964913
mmcblk0: error -5 transferring data, sector 3964914, nr 6, card status 0xb00
end_request: I/O error, dev mmcblk0, sector 3964914
Buffer I/O error on device mmcblk0, logical block 495614
mmcblk0: error -5 transferring data, sector 8, nr 8, card status 0xb00
end_request: I/O error, dev mmcblk0, sector 8
mmcblk0: error -5 transferring data, sector 9, nr 7, card status 0xb00
end_request: I/O error, dev mmcblk0, sector 9
mmcblk0: error -110 sending read/write command, response 0xb00, card
status 0x400b00
end_request: I/O error, dev mmcblk0, sector 10
mmcblk0: error -110 sending read/write command, response 0x400b00, card
status 0x400b00
end_request: I/O error, dev mmcblk0, sector 11
mmcblk0: error -5 transferring data, sector 3964665, nr 7, card status 0xb00
end_request: I/O error, dev mmcblk0, sector 3964665
Buffer I/O error on device mmcblk0, logical block 495583
mmcblk0: error -5 transferring data, sector 3964677, nr 3, card status 0xb00
end_request: I/O error, dev mmcblk0, sector 3964677
Buffer I/O error on device mmcblk0, logical block 495584
...

Tags: armel vexpress
Matt Waddel (mwaddel)
tags: added: armel vexpress
Loïc Minier (lool)
Changed in linux-linaro (Ubuntu):
importance: Undecided → Medium
assignee: nobody → Matt Waddel (mwaddel)
Revision history for this message
Paweł Moll (pawel-moll) wrote :

I did some further investigations...

1. MMC access are generally terribly slow - 45-50 kB/s writes, 60-65 kB/s reads. Expected value at least in hundreds kB/s - normal cards have maximum throughput at least 1 MB/s, premium cards up to 5-10 MB/s!

2. USB accesses performed at the same time as MMC ones generate MMC errors.

3. Reducing MMC clock frequency ("mmci.fmax=1900000") reduces number of errors, for the price of slowing down (even more!) transfers.

4. Two possible sources of problem are: a bug in driver or underlying hardware (VE motherboard peripherals FPGA) problem, with the latter more probable (as the driver is used - presumably with success - in field).

Due to lack of time here, I'll have to pass the issue to ARM support team.

Revision history for this message
Matt Waddel (mwaddel) wrote :

 ARM Bug tracking system - https://silver.arm.com/ - the case number is 472555

Changed in linux-linaro (Ubuntu):
status: New → Confirmed
Revision history for this message
John Rigby (jcrigby) wrote :

Is this still broken in 2.6.37?

John Rigby (jcrigby)
Changed in linux-linaro-vexpress (Ubuntu):
status: New → Confirmed
Revision history for this message
Paweł Moll (pawel-moll) wrote :

It may be even worse - I have some reports that with recent changes in L2 handling, all hell breaks loose during MMC operations. I'll start investigating this next week.

Revision history for this message
Paweł Moll (pawel-moll) wrote :

Have a look at this patch...

Revision history for this message
Matt Waddel (mwaddel) wrote :

Paweł,

Even though this may not be ideal, is it really a hack? It only affects the Versatile Express platform and it does improve the mmc access times significantly. I can see scenarios where there could be problems, but leaving the mmc system the way it is means the mmc is pretty much unusable on this platform.

Would it be rejected upstream?

Revision history for this message
Paweł Moll (pawel-moll) wrote :

Hack it is, without doubts ;-) I've already sent it upstream anyway, we'll see...

Now, a word of comment:

At least some of the Linaro file system images are running irqbalance daemon, which will most likely play with MMC and USB interrupts affiliation in runtime. To prevent it from doing so, /etc/default/irqbalance should contain this line:

export IRQBALANCE_BANNED_INTERRUPTS="41 42 48"

Revision history for this message
John Rigby (jcrigby) wrote :

No comments for two months. Is this bug still valid?

Revision history for this message
Matt Waddel (mwaddel) wrote :

Yes, the bug is still valid. However, there is some work being done on this issue now.

Revision history for this message
Paweł Moll (pawel-moll) wrote :

The problem will be worked around by extending the MMC FIFO size. This will be available in the coming VE CD release. A patch will be required on non-mainline kernels to support it.

Revision history for this message
Paweł Moll (pawel-moll) wrote :

This patch adds support for MMCI with extended FIFO size. Kernels prior to 2.6.37 will also need backported commit 8301bb68c6bb9836889641a47443aeb97b763f6c "ARM: 6310/1: mmci: support different FIFO sizes" (will attach it to this bug).

Revision history for this message
Paweł Moll (pawel-moll) wrote :

This is a backport of 8301bb68c6bb9836889641a47443aeb97b763f6c commit
in the main line tree.

John Rigby (jcrigby)
Changed in linux-linaro (Ubuntu):
status: Confirmed → Invalid
John Rigby (jcrigby)
Changed in linux-linaro-vexpress (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.