android_kernel_motorola_sm6375/drivers/mmc
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Adrian Hunter 605466fcf4 mmc: sdhci: Do not lock spinlock around mmc_gpio_get_ro()
commit ab069ce125965a5e282f7b53b86aee76ab32975c upstream.

sdhci_check_ro() can call mmc_gpio_get_ro() while holding the sdhci
host->lock spinlock. That would be a problem if the GPIO access done by
mmc_gpio_get_ro() needed to sleep.

However, host->lock is not needed anyway. The mmc core ensures that host
operations do not race with each other, and asynchronous callbacks like the
interrupt handler, software timeouts, completion work etc, cannot affect
sdhci_check_ro().

So remove the locking.

Fixes: 6d5cd068ee ("mmc: sdhci: use WP GPIO in sdhci_check_ro()")
Signed-off-by: Adrian Hunter <[email protected]>
Cc: [email protected]
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Ulf Hansson <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2024-07-05 09:08:29 +02:00
..
core mmc: core: Do not force a retune before RPMB switch 2024-06-16 13:28:48 +02:00
host mmc: sdhci: Do not lock spinlock around mmc_gpio_get_ro() 2024-07-05 09:08:29 +02:00
Kconfig
Makefile