<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-linux/drivers/mmc/host, branch stable</title>
<subtitle>WireGuard for the Linux kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-linux/atom/drivers/mmc/host?h=stable</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-linux/atom/drivers/mmc/host?h=stable'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/'/>
<updated>2026-09-14T10:04:29Z</updated>
<entry>
<title>mmc: sdhci-of-aspeed: Remove children before releasing SDC resources</title>
<updated>2026-09-14T10:04:29Z</updated>
<author>
<name>Myeonghun Pak</name>
<email>mhun512@gmail.com</email>
</author>
<published>2026-09-13T22:35:38Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=4396d70bb7fec531bcf934fed016b2f3300c670b'/>
<id>urn:sha1:4396d70bb7fec531bcf934fed016b2f3300c670b</id>
<content type='text'>
Probe failure and removal leave SDHCI child devices registered after the
parent clock and managed resources are released.

Unregister the OF children in reverse order before disabling the parent
clock on both paths. Use of_platform_device_destroy() because manual
child creation does not set the flag required by of_platform_depopulate().

This issue was identified during our ongoing static-analysis research
while reviewing kernel code.

Fixes: bb7b8ec62dfb ("mmc: sdhci-of-aspeed: Add support for the ASPEED SD controller")
Co-developed-by: Ijae Kim &lt;ae878000@gmail.com&gt;
Signed-off-by: Ijae Kim &lt;ae878000@gmail.com&gt;
Signed-off-by: Myeonghun Pak &lt;mhun512@gmail.com&gt;
Assisted-by: OpenAI:GPT-5.6
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson &lt;ulfh@kernel.org&gt;
</content>
</entry>
<entry>
<title>mmc: sh_mmcif: initialize IRQ-thread mutex before requesting interrupt</title>
<updated>2026-09-11T15:12:01Z</updated>
<author>
<name>Runyu Xiao</name>
<email>runyu.xiao@seu.edu.cn</email>
</author>
<published>2026-09-02T14:09:26Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=d5ea0d226e8f0801d78702142a124d78c317d822'/>
<id>urn:sha1:d5ea0d226e8f0801d78702142a124d78c317d822</id>
<content type='text'>
The threaded IRQ handler can run before devm_request_threaded_irq()
returns, but thread_lock was initialized afterwards. Initialize it before
requesting either interrupt.

Fixes: 8047310ee984 ("mmc: sh_mmcif: fix a race, causing an Oops on SMP")
Cc: stable@vger.kernel.org
Assisted-by: Codex:GPT-5
Signed-off-by: Runyu Xiao &lt;runyu.xiao@seu.edu.cn&gt;
Signed-off-by: Ulf Hansson &lt;ulfh@kernel.org&gt;
</content>
</entry>
<entry>
<title>mmc: rtsx_pci_sdmmc: ignore broken write-protect on ThinkPad X260</title>
<updated>2026-09-10T11:33:39Z</updated>
<author>
<name>Florian Maillard</name>
<email>florian.maillard@mailoo.org</email>
</author>
<published>2026-08-24T06:57:55Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=9c182bc5d7817437a7d04ab96133f9191846d93d'/>
<id>urn:sha1:9c182bc5d7817437a7d04ab96133f9191846d93d</id>
<content type='text'>
The Realtek RTS522A card reader in the Lenovo ThinkPad X260
(subsystem 17aa:504a) incorrectly reports inserted SD cards as
write-protected.

This causes the MMC core to expose the card as read-only:

  mmcblk0: mmc0:aaaa SN256 238 GiB (ro)

and /sys/block/mmcblk0/ro reports 1.

Setting MMC_CAP2_NO_WRITE_PROTECT makes the card writable again.
Limit the quirk to the affected Lenovo subsystem.

Assisted-by: ChatGPT:GPT-5.6 Sol
Signed-off-by: Florian Maillard &lt;florian.maillard@mailoo.org&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson &lt;ulfh@kernel.org&gt;
</content>
</entry>
<entry>
<title>mmc: spi: reset bytes_xfered before retrying CRC failures</title>
<updated>2026-09-08T15:59:42Z</updated>
<author>
<name>Xu Rao</name>
<email>raoxu@uniontech.com</email>
</author>
<published>2026-08-18T11:31:53Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=8b0cc8707f65e0f51912e764e1b309b2559db1ec'/>
<id>urn:sha1:8b0cc8707f65e0f51912e764e1b309b2559db1ec</id>
<content type='text'>
mmc_spi_data_do() updates data-&gt;bytes_xfered after each block has been
transferred successfully.  If a later block in the same data request
fails with a CRC error, data-&gt;bytes_xfered may therefore contain the
number of bytes completed before the failing block.

mmc_spi_request() has a private recovery path for such CRC failures.  It
sends STOP_TRANSMISSION, clears data-&gt;error and jumps back to
crc_recover to issue the same command and data request again.  However,
it does not clear data-&gt;bytes_xfered before the retry.

If the retry succeeds, the request is completed with the bytes from the
failed attempt still included in data-&gt;bytes_xfered.  For a multi-block
request this can make the completed request report more bytes than were
transferred by the successful retry, and can even exceed the request size
when most blocks completed before the CRC error.

This is most likely to be observed on MMC-over-SPI systems where long
multi-block transfers occasionally hit a data CRC error but the
mmc_spi-internal retry succeeds.  The data itself is retried, but the
completion accounting is not.

Clear data-&gt;bytes_xfered together with data-&gt;error before repeating the
request so the final completion reports only the bytes transferred by the
successful attempt.

Fixes: 061c6c847eeb ("mmc_spi: Recover from CRC errors for r/w operation over SPI.")
Cc: stable@vger.kernel.org
Signed-off-by: Xu Rao &lt;raoxu@uniontech.com&gt;
Signed-off-by: Ulf Hansson &lt;ulfh@kernel.org&gt;
</content>
</entry>
<entry>
<title>mmc: sdhci_am654: Fallback to DT-provided itap delay on DDR50 tuning failure</title>
<updated>2026-09-04T09:07:27Z</updated>
<author>
<name>Diogo Ivo (Schneider Electric)</name>
<email>diogo.ivo@bootlin.com</email>
</author>
<published>2026-08-07T11:07:00Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=308d05225281d86150d88141990d6caf8c902349'/>
<id>urn:sha1:308d05225281d86150d88141990d6caf8c902349</id>
<content type='text'>
DDR50 mode is not required to support the tuning command CMD19, meaning
that calibration may fail on cards that do not implement it, in which
case a known-good itap delay value should be programmed into the host
controller.

Do this by reading the (already defined) itap delay DT property for DDR50
and, if tuning fails for this mode, fall back to the DT-provided itap delay
value. If the DT does not provide a value for DDR50 fallback then this
simply disables using itapdly.

Fixes: 901d16e46296 ("mmc: sdhci_am654: Add retry tuning")
Cc: stable@vger.kernel.org
Signed-off-by: Diogo Ivo (Schneider Electric) &lt;diogo.ivo@bootlin.com&gt;
Acked-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Reviewed-by: Judith Mendez &lt;jm@ti.com&gt;
Signed-off-by: Ulf Hansson &lt;ulfh@kernel.org&gt;
</content>
</entry>
<entry>
<title>mmc: sdhci_am654: Clear ITAPDLY on tuning failure</title>
<updated>2026-09-04T09:07:27Z</updated>
<author>
<name>Diogo Ivo (Schneider Electric)</name>
<email>diogo.ivo@bootlin.com</email>
</author>
<published>2026-08-07T11:06:59Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=c9f47cc8c37f7659897142ffe216c250fbc1d4ed'/>
<id>urn:sha1:c9f47cc8c37f7659897142ffe216c250fbc1d4ed</id>
<content type='text'>
When tuning fails, stale ITAPDLY values can persist and interfere with
subsequent I/O accesses, for example in DDR50 mode in cards with no tuning
support. Move the ITAPDLY enable setting out of the tuning loop to after
successful tuning, and explicitly clear ITAPDLY (delay and enable) when
tuning fails so that we are sure only working values are actually left in
hardware.

Fixes: 901d16e46296 ("mmc: sdhci_am654: Add retry tuning")
Cc: stable@vger.kernel.org
Signed-off-by: Diogo Ivo (Schneider Electric) &lt;diogo.ivo@bootlin.com&gt;
Reviewed-by: Judith Mendez &lt;jm@ti.com&gt;
Acked-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Signed-off-by: Ulf Hansson &lt;ulfh@kernel.org&gt;
</content>
</entry>
<entry>
<title>mmc: sdhci_am654: Reset command and data lines on failed tuning</title>
<updated>2026-09-04T09:07:27Z</updated>
<author>
<name>Diogo Ivo (Schneider Electric)</name>
<email>diogo.ivo@bootlin.com</email>
</author>
<published>2026-08-07T11:06:58Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=7197d9107d9545730153b82ea5a411c5208b443f'/>
<id>urn:sha1:7197d9107d9545730153b82ea5a411c5208b443f</id>
<content type='text'>
The CMD/DATA reset after tuning should be performed regardless of
whether tuning succeeded or failed, since tuning data may remain in
the buffer in either case. Move the error return after the reset so
that the controller is always cleaned up.

Fixes: de31f6ab68a3 ("mmc: sdhci_am654: Reset Command and Data line after tuning")
Cc: stable@vger.kernel.org
Signed-off-by: Diogo Ivo (Schneider Electric) &lt;diogo.ivo@bootlin.com&gt;
Reviewed-by: Judith Mendez &lt;jm@ti.com&gt;
Acked-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Signed-off-by: Ulf Hansson &lt;ulfh@kernel.org&gt;
</content>
</entry>
<entry>
<title>mmc: sdhci_am654: Move tuning_loop to local variable</title>
<updated>2026-09-04T09:06:44Z</updated>
<author>
<name>Diogo Ivo (Schneider Electric)</name>
<email>diogo.ivo@bootlin.com</email>
</author>
<published>2026-08-07T11:06:57Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=ff894dced1a7ad7523f9c65dbdb53d02474cca0f'/>
<id>urn:sha1:ff894dced1a7ad7523f9c65dbdb53d02474cca0f</id>
<content type='text'>
The tuning_loop field in struct sdhci_am654_data is only used within
sdhci_am654_platform_execute_tuning() as a loop counter that is
initialized to 0 in sdhci_am654_init(). Since it shouldn't persist across
function calls, otherwise every failure expends its "budget", move it to a
local variable and remove the struct field along with the now-unnecessary
initialization.

Signed-off-by: Diogo Ivo (Schneider Electric) &lt;diogo.ivo@bootlin.com&gt;
Reviewed-by: Judith Mendez &lt;jm@ti.com&gt;
Acked-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Fixes: de31f6ab68a3 ("mmc: sdhci_am654: Reset Command and Data line after tuning")
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson &lt;ulfh@kernel.org&gt;
</content>
</entry>
<entry>
<title>mmc: hsq: Fix use-after-free in retry work</title>
<updated>2026-09-04T08:45:40Z</updated>
<author>
<name>Fan Wu</name>
<email>fanwu01@zju.edu.cn</email>
</author>
<published>2026-08-14T08:23:54Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=5d132990475f02cfa1debe03d50b479432864ebd'/>
<id>urn:sha1:5d132990475f02cfa1debe03d50b479432864ebd</id>
<content type='text'>
mmc_hsq_pump_requests() queues retry_work when request_atomic() returns
-EBUSY; today sdhci-sprd is the only consumer that implements
request_atomic(). The work is embedded in a devm-allocated mmc_hsq, but
is never cancelled during driver removal. Work still pending at unbind
can therefore run after the devm allocation has been released and
dereference hsq-&gt;mmc and hsq-&gt;mrq.

Use devm_work_autocancel() to cancel and drain retry_work before the devm
allocation is released. By the time devres cleanup begins,
mmc_remove_host() has already stopped the host, so no new requests can
arm the work.

This issue was found by an in-house static analysis tool.

Fixes: 6db96e5810e0 ("mmc: host: Introduce the request_atomic() for the host")
Cc: stable@vger.kernel.org
Assisted-by: Codex:gpt-5.6
Signed-off-by: Fan Wu &lt;fanwu01@zju.edu.cn&gt;
Signed-off-by: Ulf Hansson &lt;ulfh@kernel.org&gt;
</content>
</entry>
<entry>
<title>mmc: mxcmmc: cancel data work and watchdog on remove</title>
<updated>2026-09-04T08:43:32Z</updated>
<author>
<name>Fan Wu</name>
<email>fanwu01@zju.edu.cn</email>
</author>
<published>2026-08-07T03:26:54Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=d3a421c82412344022982d5b91ba23194a0a6f29'/>
<id>urn:sha1:d3a421c82412344022982d5b91ba23194a0a6f29</id>
<content type='text'>
mxcmci_remove() frees the host through the devm tail, but neither it nor
mmc_remove_host() drains the driver's own asynchronous state.
host-&gt;watchdog, a 10 s timer armed on the DMA path in mxcmci_setup_data(),
is deleted only by the DMA- and IRQ-complete paths, which the remove path
does not explicitly drain; it can therefore fire after the host is freed
and dereference it in mxcmci_watchdog().  host-&gt;datawork, armed from the
IRQ handler on the PIO path, is not cancelled by the remove path either.

Free the devm-registered IRQ, then cancel datawork and delete the watchdog
in mxcmci_remove(), before dma_release_channel().  Freeing the IRQ first
keeps a trailing handler from re-arming datawork between the cancel and
the host free.  Both callbacks are non-self-rearming.

This issue was found by an in-house static analysis tool.

Fixes: f6ad0a481342 ("mmc: mxcmmc: fix bug that may block a data transfer forever")
Cc: stable@vger.kernel.org
Assisted-by: Codex:gpt-5.6
Signed-off-by: Fan Wu &lt;fanwu01@zju.edu.cn&gt;
Signed-off-by: Ulf Hansson &lt;ulfh@kernel.org&gt;
</content>
</entry>
</feed>
