Bugzilla – Bug 1176576
[RPi4] sdhci driver continuously prints warnings if no card is present
Last modified: 2021-05-21 06:40:40 UTC
With the Raspberry Pi 4, if booting from a USB stick (and presumably network booting as well) without a MicroSD card installed, the system will repeatedly poll the mmc device and throw this error every 10 seconds:
[ 29.271135] mmc1: Timeout waiting for hardware cmd interrupt.
[ 29.277078] mmc1: sdhci: ============ SDHCI REGISTER DUMP ===========
[ 29.283715] mmc1: sdhci: Sys addr: 0x00000000 | Version: 0x00001002
[ 29.290350] mmc1: sdhci: Blk size: 0x00000000 | Blk cnt: 0x00000000
[ 29.296984] mmc1: sdhci: Argument: 0x00000000 | Trn mode: 0x00000000
[ 29.303618] mmc1: sdhci: Present: 0x1fff0001 | Host ctl: 0x00000001
[ 29.310251] mmc1: sdhci: Power: 0x0000000f | Blk gap: 0x00000080
[ 29.316884] mmc1: sdhci: Wake-up: 0x00000000 | Clock: 0x0000f447
[ 29.323516] mmc1: sdhci: Timeout: 0x00000000 | Int stat: 0x00000000
[ 29.330149] mmc1: sdhci: Int enab: 0x00ff1003 | Sig enab: 0x00ff1003
[ 29.336781] mmc1: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00000000
[ 29.343413] mmc1: sdhci: Caps: 0x45ee6432 | Caps_1: 0x0000a525
[ 29.350045] mmc1: sdhci: Cmd: 0x0000371a | Max curr: 0x00080008
[ 29.356677] mmc1: sdhci: Resp: 0x00000000 | Resp: 0x00000000
[ 29.363309] mmc1: sdhci: Resp: 0x00000000 | Resp: 0x00000000
[ 29.369941] mmc1: sdhci: Host ctl2: 0x00000000
[ 29.374516] mmc1: sdhci: ADMA Err: 0x00000000 | ADMA Ptr: 0x00000000
[ 29.381147] mmc1: sdhci: ============================================
A solution suggested [here](https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=274595&sid=4e66b3bf915860214655773f10bad48f&start=75#p1664533) is to add `dtparam=sd_poll_once` to /boot/efi/config.txt. This is further evidenced to be the correct solution by the documentation (https://raw.githubusercontent.com/raspberrypi/firmware/master/boot/overlays/README):
> sd_poll_once Looks for a card once after booting. Useful for network booting scenarios to avoid the overhead of continuous polling.
Yes, agree this is annoying. I've suffered it myself while booting from network. That said, the overlay is just a partial solution as it disables sd hotplug. This calls for a fix in the sdhci driver, I'll find some time to look into it.
*** Bug 1179437 has been marked as a duplicate of this bug. ***
Not a MicroOS specific issue, changing Component
Relevant upstream development:
Updated patch set available here: https://email@example.com/
Nicolas fixes have been merged into kernel:stable.