Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mmc: android-goldfish: Enable MMC_CAP2_NO_SDIO

Instead of explicitly checking for SDIO specific requests and then
returning an error code, let's set MMC_CAP2_NO_SDIO to tell the mmc core to
prevent them altogether.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://lore.kernel.org/r/20200401145531.23247-1-ulf.hansson@linaro.org

+1 -9
+1 -9
drivers/mmc/host/android-goldfish.c
··· 27 27 #include <linux/mutex.h> 28 28 #include <linux/scatterlist.h> 29 29 #include <linux/mmc/mmc.h> 30 - #include <linux/mmc/sdio.h> 31 30 #include <linux/mmc/host.h> 32 31 #include <linux/mmc/card.h> 33 32 ··· 403 404 host->mrq = req; 404 405 goldfish_mmc_prepare_data(host, req); 405 406 goldfish_mmc_start_command(host, req->cmd); 406 - 407 - /* 408 - * This is to avoid accidentally being detected as an SDIO card 409 - * in mmc_attach_sdio(). 410 - */ 411 - if (req->cmd->opcode == SD_IO_SEND_OP_COND && 412 - req->cmd->flags == (MMC_RSP_SPI_R4 | MMC_RSP_R4 | MMC_CMD_BCR)) 413 - req->cmd->error = -EINVAL; 414 407 } 415 408 416 409 static void goldfish_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) ··· 473 482 mmc->f_max = 24000000; 474 483 mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34; 475 484 mmc->caps = MMC_CAP_4_BIT_DATA; 485 + mmc->caps2 = MMC_CAP2_NO_SDIO; 476 486 477 487 /* Use scatterlist DMA to reduce per-transfer costs. 478 488 * NOTE max_seg_size assumption that small blocks aren't