From patchwork Wed May 2 12:10:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 134827 Delivered-To: patches@linaro.org Received: by 10.46.151.6 with SMTP id r6csp609244lji; Wed, 2 May 2018 05:10:44 -0700 (PDT) X-Received: by 2002:a19:2902:: with SMTP id p2-v6mr10650982lfp.99.1525263044031; Wed, 02 May 2018 05:10:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525263044; cv=none; d=google.com; s=arc-20160816; b=NSYmMpQS6eJwhlfnakfhjD+bHRK5fwM/S7DKdC6xXF07XjF83RhHRGsOD3w41nwZHe tHUCy+w4sA9hX3+FH2mvQScubb25DGHPLye4cHn8IkKfctfiMvEyEcOGpmdYcby2R2Ns 7eOmsCbq6nTXZFZDLDeNwBZG/122gb2Q+yeo687p+goQHBXHIkUrRmp4y2+dgcIDceR9 DBhW71Wh4or7XRXu9t36VFQDMXThTZp9sETKGF82pKTOx4OHo4ype6hOyk4db/YdUJru di4SW+chHiR+4roKNnMsSk6tIzEOOb2aDvAsIuGblH/h7iUqMVUzmJUCCDzgjbgUMZcx FQ7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=IXJhm6sSpiNmfzylmZvl4gNbjXrqMo1n18Ut9JLV+VY=; b=lhFc7bS3kRxji1xt4gnehRLn6nB4J+NlS43pLWSfmVe9ESXrnYtnayuBkRJPjPQoAV g+54HYiENhPMcsT3OtBr/e2p/kkQNHzJtKJemPxMy2fglSSYnyOA3kcJ+ci48uAa6QB+ 20dVoqmlorGacHcn4AelHkX+ulrPj9JElOtSFr6t/CHaxuO+X7RIXE6pnE92jteLZQmj Uh0qU2N/MeO9U/K6mrPjAf+lN0dUjK9JVkkmwhG1j6mqDGOPhITvaUxE4uSuXpOJcn3N s3KmlgxeYCnGyvnoXeqs5hGZ/pYjAyNxbcvHyDTnCKAZXT9pMHfBoHDyX3JtJL1oB4PZ 3wSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DZ4hREvx; 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 t135-v6sor2340361lff.87.2018.05.02.05.10.43 for (Google Transport Security); Wed, 02 May 2018 05:10:44 -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=DZ4hREvx; 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; bh=IXJhm6sSpiNmfzylmZvl4gNbjXrqMo1n18Ut9JLV+VY=; b=DZ4hREvxFZTI7TfHSc+cUqhLe8ZpXmgQqgMJqOGVmtFpeB2hgg5cczjeVANL3cT78z /Ra31m+cZ66lREeqOHqEgkx+1EfS+z6cBIsXFXeLN5kq0NPDKlfCOZO+3yhkwXOFDHXG gHJPqtfJCNvK4AbwuPtgf/fn9WyQd8qMcL8h8= 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; bh=IXJhm6sSpiNmfzylmZvl4gNbjXrqMo1n18Ut9JLV+VY=; b=YTTRZzP9mCGnzxRDcg8ULqGvp67o0ZAqJbbzhhRzHnQatk/OgF7EM6hIMcysrUNftT +H3ZG1Fd1NhVYF3pEDCYEvJQ3v1sfIY+yOy10omqYdnfaQDQXbed7+rCXWWDgl1+jbDj TmxWrBmebpG8vZxGBLjY7KGDlWFUY/eKcGh68mOySDCaXeB5EnP9W/S1yVQDFG8UVbxp UxGADWopT1N+3QsFNKBVfrclZfMd7kp5M+5GC7EeTK0rHW5f/iXewPRbodEiouMpP5YM c5+S4gO3F8PNApQPUmyHnwUptKlQmuqEOD0KLDoUzSDIdUxHd7qVVc7wgAGPpYyC0vN9 YvVA== X-Gm-Message-State: ALQs6tB4RkWv0VhYXE/mPz73E4DxP4pIMWKDpgelg1rW6ptV1hVin79e 40xMmw4/yPVajQ8c5HKA9k8/5j59 X-Google-Smtp-Source: AB8JxZoe4vAaIjKyIK5DQtKrZsJd3eKZzU1H0d0yuAjOZ1yrCR1FlgN2oQQtvXXOLoxsvGmwlIO9Uw== X-Received: by 2002:a19:1895:: with SMTP id 21-v6mr11405274lfy.39.1525263043759; Wed, 02 May 2018 05:10:43 -0700 (PDT) Return-Path: Received: from uffe-XPS-13-9360.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id y23-v6sm1867526ljh.88.2018.05.02.05.10.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 02 May 2018 05:10:43 -0700 (PDT) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: michal.pecio@gmail.com Subject: [PATCH 1/3] mmc: rtsx_usb: Use MMC_CAP2_NO_SDIO Date: Wed, 2 May 2018 14:10:35 +0200 Message-Id: <1525263037-16996-1-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.7.4 Instead of having to return -EINVAL when requested to send SDIO specific commands, let's set MMC_CAP2_NO_SDIO as it completely prevents them. Signed-off-by: Ulf Hansson --- drivers/mmc/host/rtsx_usb_sdmmc.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) -- 2.7.4 diff --git a/drivers/mmc/host/rtsx_usb_sdmmc.c b/drivers/mmc/host/rtsx_usb_sdmmc.c index 7842207..f9faa98 100644 --- a/drivers/mmc/host/rtsx_usb_sdmmc.c +++ b/drivers/mmc/host/rtsx_usb_sdmmc.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -839,17 +838,6 @@ static void sdmmc_request(struct mmc_host *mmc, struct mmc_request *mrq) goto finish_detect_card; } - /* - * Reject SDIO CMDs to speed up card identification - * since unsupported - */ - if (cmd->opcode == SD_IO_SEND_OP_COND || - cmd->opcode == SD_IO_RW_DIRECT || - cmd->opcode == SD_IO_RW_EXTENDED) { - cmd->error = -EINVAL; - goto finish; - } - mutex_lock(&ucr->dev_mutex); mutex_lock(&host->host_mutex); @@ -1333,7 +1321,8 @@ static void rtsx_usb_init_host(struct rtsx_usb_sdmmc *host) MMC_CAP_MMC_HIGHSPEED | MMC_CAP_BUS_WIDTH_TEST | MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25 | MMC_CAP_UHS_SDR50 | MMC_CAP_NEEDS_POLL; - mmc->caps2 = MMC_CAP2_NO_PRESCAN_POWERUP | MMC_CAP2_FULL_PWR_CYCLE; + mmc->caps2 = MMC_CAP2_NO_PRESCAN_POWERUP | MMC_CAP2_FULL_PWR_CYCLE | + MMC_CAP2_NO_SDIO; mmc->max_current_330 = 400; mmc->max_current_180 = 800;