Re: [PATCH] firmware: qcom: scm: clear download mode and SDI before a restart
From: Konrad Dybcio
Date: Fri Oct 16 2026 - 06:38:45 EST
On 9/21/26 9:32 AM, Royyan Zahir wrote:
> With qcom_scm.download_mode=1 an IQ-9075 never completes a warm reboot.
> XBL stops in download mode and only a cold power cycle recovers the board:
>
> B - 857233 - TCSR reg value 0x10
> B - 865071 - RamDump - Image Load, Start
> B - 884317 - boot_dload_entry
> B - 6774477 - USB DUMP failed, because USB cable disconnect
>
> 0x10 is FIELD_PREP(QCOM_DLOAD_MASK, QCOM_DLOAD_FULLDUMP), so the cookie
> written at probe is still set when XBL reads it, even though systemd
> stopped every unit in order and nothing panicked.
>
> Two latches have to come down and neither reliably does.
> qcom_scm_shutdown() clears the cookie from .shutdown, which
> device_shutdown() calls after the SCM device's own dependencies may
> already be torn down, so the write can fail with nothing left to report
> it to.
Ouch. Indeed there's no devlink or similar between the SCM producer
and its consumers. It just so happened not to surface any issues for
N years..
> SDI is disabled only from probe, and only when download_mode was> zero at that moment, so a board booted with download mode on keeps
> watchdog debug armed for the life of the boot. Writing "off" to the
> module parameter later clears the cookie but never reaches SDI, which is
> why that runtime workaround does not restore warm reboot.
+Mukesh are dump_mode and SDI supposed to be disabled together (i.e.
do we need if (off) { disable_sdi() } in the .store path), or are they
orthogonal?
Konrad