From patchwork Wed Apr 1 14:55:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 185142 Delivered-To: patches@linaro.org Received: by 2002:a92:de47:0:0:0:0:0 with SMTP id e7csp621382ilr; Wed, 1 Apr 2020 07:55:45 -0700 (PDT) X-Received: by 2002:a17:906:319b:: with SMTP id 27mr21044878ejy.240.1585752945036; Wed, 01 Apr 2020 07:55:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585752945; cv=none; d=google.com; s=arc-20160816; b=usa5xqU+y/Kk7mAs5PL6YOTctrI8MFUM/vfIO5LN4hgl1LABecxKLD8cV0cn+m4KOE 7Eb6gcygeFOX84YnQ2Vrn7CI//XdbRuLefXhvqi3J52ThqZcnMK6VgXkjLMz2ngJoLrp 0p83YRpYd3U6MhMdCt4rbMNAic7syoFyhKu+YJJqyak05Er4l7AvEITKz+xEPyzHwAUM YMsE8ncL6IGcgIl+WiVBDHKojJwf6GBPaxyDBPg4U9TFOC3js0i/QH8J0m3X8QEYyFaz DUk6jr8mtU9vyXNQCy83c+CSu5oAgfMaTlfgFnFnrDrG+bHkfOKnBbo3+o/FL7XmeCrS 7yNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=bYU7QeY1a7IIXFQO/jwmz3hXaskowVHLsLdG+qiYwio=; b=lBpltm1lysu07NPVEQxbj8AW1D3cxAftUgJu1QSLtXK8mznEX/J3x4imRwYhnedtA0 ajaH6i2yuQR+YUxsSE6TOz3x9RRtzJ0wmlJx6XhgYV8Tx1fWtk9IP4elO/Uxog841KXP DV504OzmFEwC7tS5NQCWLGNpJCZ8Cn2/qRYvoyLRSnRLM7C42+nn3wBVcp6rCeKIM2eW qGrAGLHg2FkTsDuaEfDw9WxaNyqrg1VJgCiAWyZCO72Tki0TIzx8Vn1ols58lpKMKx50 I4PEM4rjUmZ+vp1ctgpkiHg4g+1HL7lfHyscJguIF2x3/FHCF7zrELogWBPIK7N9/w0s AijA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yE47rub6; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id w5sor1120004ejb.53.2020.04.01.07.55.44 for (Google Transport Security); Wed, 01 Apr 2020 07:55:45 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yE47rub6; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=bYU7QeY1a7IIXFQO/jwmz3hXaskowVHLsLdG+qiYwio=; b=yE47rub6AfkfEUMl+SpKqdMTGgl+0p76TgEdtp5Ofbcw7wjR4xDM7PcRLVinwIbXP1 SA1xppNMOD5JoztIV1GM4lE9/As0u8jt2v2qtv2MF0ZpfrPgsPkr6A1o80qRFsIkddjy 38wvMogUv1yg7JHLKK7HwV6Du1n7FqhHt41ZQ705VOF6WCFAOm8x/zl5uOjOoKhE8mqj rSoPVj9gFgMEQ2O5pL3nNKNVGIO9GPtHpxWqmFsTt77psrwCicMemWOZGwFkshtWCWgh Ui4hPXzI5Y5ULpOBgGYRTntj/G8FCB2+y/hnK243eQHLJ9vC79tHn0H0s0tOC5b1gVrR pynw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=bYU7QeY1a7IIXFQO/jwmz3hXaskowVHLsLdG+qiYwio=; b=jE1+Z4YyH5MrAiW6z6VLQr9ipVuv6HQ0j+juA98y2KVuNKrmm+/Jznq/IJW9FyZRpk 79fiNI6IlQfctiz4iCKXljpHt3swPFMZqbUa+Je0ihV53CDVJgbZP3+UaTShlEtWP3Mu 0HV9EGpsjLmbn/8139lUkBk/6fnP+QXJGcOmdZ6ae4Zi5otPNQsHvvgucp1HG3bgB8CG muq7QgmltZJEXtrbGb/cjS8lTRVov/Pf0k+clH4f5KinDYvSv7SsZ8FEfXcJRwuZ+Qxk mJj4emyctdhAixcLLfCH+d48kqEAmg77jzvwnNWYtfVzBm6JRY9MDZKusNcdcV8njjpv e6xA== X-Gm-Message-State: AGi0PuamJpgjQ28URowFsFVvaaqdRKChf0caqxbit/Fao72DOsH3LwU/ V0NCqwzMRpR+sssG54Lp5WAFlsTv X-Google-Smtp-Source: APiQypK3NvoBTUSYHtDbhiWyG29rdPPfQ0HucsRx29dy+taZIDIBEdhLZUv35IlXUFvm85nCebyEbw== X-Received: by 2002:a2e:8914:: with SMTP id d20mr12637025lji.148.1585752944615; Wed, 01 Apr 2020 07:55:44 -0700 (PDT) Return-Path: Received: from localhost.localdomain (h-158-174-22-210.NA.cust.bahnhof.se. [158.174.22.210]) by smtp.gmail.com with ESMTPSA id f9sm1393485ljp.88.2020.04.01.07.55.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Apr 2020 07:55:43 -0700 (PDT) From: Ulf Hansson To: linux-mmc@vger.kernel.org Cc: Ulf Hansson Subject: [PATCH] mmc: android-goldfish: Enable MMC_CAP2_NO_SDIO Date: Wed, 1 Apr 2020 16:55:31 +0200 Message-Id: <20200401145531.23247-1-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 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 --- drivers/mmc/host/android-goldfish.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) -- 2.20.1 diff --git a/drivers/mmc/host/android-goldfish.c b/drivers/mmc/host/android-goldfish.c index 914e17bab3be..ceb4924e02d0 100644 --- a/drivers/mmc/host/android-goldfish.c +++ b/drivers/mmc/host/android-goldfish.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include @@ -404,14 +403,6 @@ static void goldfish_mmc_request(struct mmc_host *mmc, struct mmc_request *req) host->mrq = req; goldfish_mmc_prepare_data(host, req); goldfish_mmc_start_command(host, req->cmd); - - /* - * This is to avoid accidentally being detected as an SDIO card - * in mmc_attach_sdio(). - */ - if (req->cmd->opcode == SD_IO_SEND_OP_COND && - req->cmd->flags == (MMC_RSP_SPI_R4 | MMC_RSP_R4 | MMC_CMD_BCR)) - req->cmd->error = -EINVAL; } static void goldfish_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) @@ -482,6 +473,7 @@ static int goldfish_mmc_probe(struct platform_device *pdev) mmc->f_max = 24000000; mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34; mmc->caps = MMC_CAP_4_BIT_DATA; + mmc->caps2 = MMC_CAP2_NO_SDIO; /* Use scatterlist DMA to reduce per-transfer costs. * NOTE max_seg_size assumption that small blocks aren't