From: Rex Chen Date: Mon, 28 Jul 2025 08:22:29 +0000 (+0900) Subject: mmc: core: SPI mode remove cmd7 X-Git-Tag: v5.15.195~76 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e5caecea44a7ab069c29cc0d145dcd6a2fd5cf7f;p=thirdparty%2Fkernel%2Fstable.git mmc: core: SPI mode remove cmd7 commit fec40f44afdabcbc4a7748e4278f30737b54bb1a upstream. SPI mode doesn't support cmd7, so remove it in mmc_sdio_alive() and confirm if sdio is active by checking CCCR register value is available or not. Signed-off-by: Rex Chen Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250728082230.1037917-2-rex.chen_1@nxp.com Signed-off-by: Ulf Hansson Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c index a0cac8c87ef2f..cbc9ca0dd56e3 100644 --- a/drivers/mmc/core/sdio.c +++ b/drivers/mmc/core/sdio.c @@ -929,7 +929,11 @@ static void mmc_sdio_remove(struct mmc_host *host) */ static int mmc_sdio_alive(struct mmc_host *host) { - return mmc_select_card(host->card); + if (!mmc_host_is_spi(host)) + return mmc_select_card(host->card); + else + return mmc_io_rw_direct(host->card, 0, 0, SDIO_CCCR_CCCR, 0, + NULL); } /*