OSDN Git Service

olpc: sdhci: add quirk for the Marvell CaFe's interrupt timeout
authorAndres Salomon <dilinger@queued.net>
Fri, 4 Jul 2008 17:00:04 +0000 (10:00 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 4 Jul 2008 17:40:09 +0000 (10:40 -0700)
commit603ded16a308d0a7a17738c973e3c8cbcd5db7dd
tree580c111f2d8dceb6d97a261302f48521ff140254
parente08c1694d9e2138204f2b79b73f0f159074ce2f5
olpc: sdhci: add quirk for the Marvell CaFe's interrupt timeout

The CaFe chip has a hardware bug that ends up with us getting a timeout
value that's too small, causing the following sorts of problems:

[   60.525138] mmcblk0: error -110 transferring data
[   60.531477] end_request: I/O error, dev mmcblk0, sector 1484353
[   60.533371] Buffer I/O error on device mmcblk0p2, logical block 181632
[   60.533371] lost page write due to I/O error on mmcblk0p2

Presumably this is an off-by-one error in the hardware.  Incrementing
the timeout count value that we stuff into the TIMEOUT_CONTROL register
gets us a value that works.  This bug was originally discovered by
Pierre Ossman, I believe.

[thanks to Robert Millan for proving that this was still a problem]

Signed-off-by: Andres Salomon <dilinger@debian.org>
Cc: Pierre Ossman <drzeus-list@drzeus.cx>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/mmc/host/sdhci.c