kernel-fxtec-pro1x/drivers/mmc/host
Arnd Hannemann 6ff56e0d8e mmc: tmio_mmc: handle missing HW interrupts
When doing excessive hotplug, e.g., repeated insert/eject operations,
the hardware may get confused to a point where no CMDTIMEOUT/CMDRESPEND
interrupts are generated any more.  As a result requests get stuck, e.g.:

[  360.351562] INFO: task kworker/u:0:5 blocked for more than 120 seconds.
[  360.351562] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  360.359375] kworker/u:0   D c020c2b4     0     5      2 0x00000000
[  360.367187] Backtrace:
[  360.367187] [<c020bfb0>] (schedule+0x0/0x340) from [<c020c480>] (schedule_timeout+0x20/0x190)
[  360.375000]  r8:c702fd70 r7:00000002 r6:c702e000 r5:c702fdc4 r4:7fffffff
[  360.375000] r3:c701e040
[  360.382812] [<c020c460>] (schedule_timeout+0x0/0x190) from [<c020be78>] (wait_for_common+0xc4/0x150)
[  360.390625]  r6:c702e000 r5:c702fdc4 r4:7fffffff
[  360.390625] [<c020bdb4>] (wait_for_common+0x0/0x150) from [<c020bfac>] (wait_for_completion+0x18/0x1c)
[  360.398437] [<c020bf94>] (wait_for_completion+0x0/0x1c) from [<c0185590>] (mmc_wait_for_req+0x214/0x234)
[  360.406250] [<c018537c>] (mmc_wait_for_req+0x0/0x234) from [<c01889d0>] (mmc_sd_switch+0xfc/0x114)
[  360.414062]  r7:c702fe4c r6:c702fe20 r5:c7179800 r4:00fffff0
[  360.421875] [<c01888d4>] (mmc_sd_switch+0x0/0x114) from [<c0187f70>] (mmc_sd_setup_card+0x260/0x384)
[  360.429687] [<c0187d10>] (mmc_sd_setup_card+0x0/0x384) from [<c01885e0>] (mmc_sd_init_card+0x13c/0x1e0)
[  360.437500] [<c01884a4>] (mmc_sd_init_card+0x0/0x1e0) from [<c01887a8>] (mmc_attach_sd+0x124/0x1a8)
[  360.445312]  r8:c02db404 r7:ffffff92 r6:c702ff34 r5:c6007da8 r4:c6007c00
[  360.453125] [<c0188684>] (mmc_attach_sd+0x0/0x1a8) from [<c0185140>] (mmc_rescan+0x248/0x2f0)
[  360.460937]  r5:c6007da8 r4:c6007c00
[  360.468750] [<c0184ef8>] (mmc_rescan+0x0/0x2f0) from [<c00467f0>] (process_one_work+0x1ec/0x318)
[  360.476562]  r7:c6007da8 r6:00000000 r5:c710ec00 r4:c701bde0
[  360.484375] [<c0046604>] (process_one_work+0x0/0x318) from [<c0047fb0>] (worker_thread+0x1b0/0x2cc)
[  360.492187] [<c0047e00>] (worker_thread+0x0/0x2cc) from [<c004b338>] (kthread+0x8c/0x94)
[  360.500000] [<c004b2ac>] (kthread+0x0/0x94) from [<c0037fc4>] (do_exit+0x0/0x590)
[  360.507812]  r7:00000013 r6:c0037fc4 r5:c004b2ac r4:c7021f00

This patch addresses this problem by introducing timeouts for outstanding
interrupts. If a hardware interrupt is missing, a soft reset will be
performed to bring the hardware back to a working state.
Tested with the SDHI hardware block in sh7372 / AP4EVB.

Signed-off-by: Arnd Hannemann <arnd@arndnet.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
2011-01-08 23:52:31 -05:00
..
at91_mci.c mmc: at91_mci: fix multiblock SDIO transfers 2010-12-21 11:46:32 -08:00
atmel-mci-regs.h atmel-mci: add MCI2 register definitions 2009-06-13 22:43:01 +02:00
atmel-mci.c mmc: atmel-mci: fix multiblock SDIO transfers 2010-12-21 11:46:48 -08:00
au1xmmc.c mmc: Remove distinction between hw and phys segments 2010-10-23 21:11:11 +08:00
bfin_sdh.c mmc: Remove distinction between hw and phys segments 2010-10-23 21:11:11 +08:00
cb710-mmc.c mmc: cb710: remove debugging printk (info duplicated from mmc-core) 2010-10-23 21:11:21 +08:00
cb710-mmc.h mmc: Driver for CB710/720 memory card reader (MMC part) 2009-06-13 22:42:58 +02:00
davinci_mmc.c mmc: davinci_mmc: Remove unnecessary semicolon 2011-01-08 22:48:04 -05:00
dw_mmc.c mmc: dw_mmc: Add Synopsys DesignWare mmc host driver. 2011-01-08 23:52:24 -05:00
dw_mmc.h mmc: dw_mmc: Add Synopsys DesignWare mmc host driver. 2011-01-08 23:52:24 -05:00
imxmmc.c mmc: Remove distinction between hw and phys segments 2010-10-23 21:11:11 +08:00
imxmmc.h
jz4740_mmc.c mmc: Remove distinction between hw and phys segments 2010-10-23 21:11:11 +08:00
Kconfig mmc: dw_mmc: Add Synopsys DesignWare mmc host driver. 2011-01-08 23:52:24 -05:00
Makefile mmc: dw_mmc: Add Synopsys DesignWare mmc host driver. 2011-01-08 23:52:24 -05:00
mmc_spi.c mmc_spi: Recover from CRC errors for r/w operation over SPI. 2010-10-23 21:11:22 +08:00
mmci.c ARM: mmci: Clean up MMCI announcement printk 2010-12-30 14:07:10 +00:00
mmci.h ARM: 6399/3: mmci: handle broken MCI_DATABLOCKEND hardware 2010-11-10 13:12:59 +00:00
msm_sdcc.c mmc: msm_sdcc: Check for only DATA_END interrupt to end a request 2010-12-20 12:28:32 -08:00
msm_sdcc.h mmc: msm_sdcc: Check for only DATA_END interrupt to end a request 2010-12-20 12:28:32 -08:00
mvsdio.c mmc: Remove distinction between hw and phys segments 2010-10-23 21:11:11 +08:00
mvsdio.h
mxcmmc.c mmc: mxcmmc: remove a unnecessary release_resource() call 2011-01-08 22:45:36 -05:00
of_mmc_spi.c of: Always use 'struct device.of_node' to get device node pointer. 2010-05-18 16:10:44 -06:00
omap.c mmc: update workqueue usages 2010-12-24 16:00:17 +01:00
omap_hsmmc.c Merge branch 'for-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq 2011-01-07 16:58:04 -08:00
pxamci.c mmc: Move regulator handling closer to core 2010-10-23 21:11:16 +08:00
pxamci.h
s3cmci.c mmc: Remove distinction between hw and phys segments 2010-10-23 21:11:11 +08:00
s3cmci.h s3cmci: DMA fixes 2009-10-01 16:11:15 -07:00
sdhci-cns3xxx.c mmc: sdhci-pltfm: move .h file into appropriate subdir 2010-10-23 21:11:21 +08:00
sdhci-dove.c mmc: Add support for the Marvell Dove SDHCI controller 2011-01-08 21:48:48 -05:00
sdhci-esdhc-imx.c mmc: sdhci-esdhc-imx: enable QUIRK_NO_MULTIBLOCK only for i.MX25 and i.MX35 2010-11-07 17:52:27 -05:00
sdhci-esdhc.h mmc: sdhci-of-esdhc: factor out common stuff 2010-10-23 21:11:22 +08:00
sdhci-of-core.c Merge branch 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6 2010-08-12 09:11:31 -07:00
sdhci-of-esdhc.c mmc: sdhci-of-esdhc: factor out common stuff 2010-10-23 21:11:22 +08:00
sdhci-of-hlwd.c sdhci: build fix: rename SDHCI I/O accessor functions 2010-05-27 09:12:40 -07:00
sdhci-of.h sdhci-of: add support for the wii sdhci controller 2009-12-17 15:45:32 -08:00
sdhci-pci.c mmc: sdhci: Enable bus-width test for JMicron controllers 2011-01-08 23:52:20 -05:00
sdhci-pltfm.c mmc: add sdhci-tegra driver for Tegra SoCs 2011-01-08 23:52:23 -05:00
sdhci-pltfm.h mmc: add sdhci-tegra driver for Tegra SoCs 2011-01-08 23:52:23 -05:00
sdhci-pxa.c mmc: sdhci: 8-bit bus width changes 2010-11-22 15:12:04 -05:00
sdhci-s3c.c mmc: sdhci-s3c: Support controllers with no internal clock divider 2011-01-08 23:52:22 -05:00
sdhci-spear.c sdhci-spear: ST SPEAr based SDHCI controller glue 2010-05-27 09:12:40 -07:00
sdhci-tegra.c mmc: add sdhci-tegra driver for Tegra SoCs 2011-01-08 23:52:23 -05:00
sdhci.c mmc: sdhci: add quirk for max len ADMA descriptors 2011-01-08 23:52:23 -05:00
sdhci.h mmc: Test bus-width for old MMC devices 2011-01-08 23:52:09 -05:00
sdricoh_cs.c pcmcia: move driver name to struct pcmcia_driver 2010-09-29 17:20:24 +02:00
sh_mmcif.c mmc: sh_mmcif: make DMA support by the driver unconditional 2011-01-05 16:57:42 +09:00
tifm_sd.c mmc: Remove distinction between hw and phys segments 2010-10-23 21:11:11 +08:00
tmio_mmc.c mmc: tmio_mmc: handle missing HW interrupts 2011-01-08 23:52:31 -05:00
ushc.c mmc: ushc: Return proper error code for ushc_probe() 2010-11-07 16:45:11 -05:00
via-sdmmc.c mmc: Remove distinction between hw and phys segments 2010-10-23 21:11:11 +08:00
wbsd.c mmc: Remove distinction between hw and phys segments 2010-10-23 21:11:11 +08:00
wbsd.h