mmc: Speed up reboot with an absent card#6747
mmc: Speed up reboot with an absent card#6747pelwell wants to merge 3 commits intoraspberrypi:rpi-6.12.yfrom
Conversation
|
N.B.:
|
|
Testing with cm5 during startup still getting stuck on systemd-journald.socket for 30-60 seconds and dtparam=sd=off is not detected. seems to be unsuccessfully halting/rebooting without sd card present. still gets stuck for amount a minute. And twice encountering a error like this: Problem could have occured from the system being unstable and hanging often even when using simple commands like dmesg. |
On devices with no card detect mechanism, the host ends up polling for the insertion of a card. This polling happens at multiple frequencies and with many steps (SDIO, SD, MMC), some of which involve timeouts. If a reboot is requested during one of those scans, it will stall, pointlessly, for up to a minute while it completes. Attempt to short circuit the rescan if the MMC interface is being removed. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Reduce the maximum time it takes to get to reboot by decreasing the default SDHCI timeout to 5 seconds. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Two days into running a reboot test over the weekend, the SDHCI driver hit a NULL pointer in sdhci_needs_reset. It's not clear how that has been added by the changes for a faster reboot, but guard against it explicitly. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
That looks like a new crash - I've added a fix for that and another one to this PR, as well as hopefully reducing the maximum stall to 5 seconds. Wait another 40 minutes before trying to update. |
|
still stalling on systemd-journal.socket when booting ssh takes about 30 seconds to connect. however when booted stalls are less than 5 seconds for commands and halting and when actually halting/rebooting no stalls still sometimes small hangs with commands for 2 seconds during halt/shutdown for example trigger happy when pressing power button |

On devices with no card detect mechanism, the host ends up polling for the insertion of a card. This polling happens at multiple frequencies and with many steps (SDIO, SD, MMC), some of which involve timeouts. If a reboot is requested during one of those scans, it will stall, pointlessly, for up to a minute while it completes.
Attempt to short circuit the rescan if the MMC interface is being removed.
See: #6647