From patchwork Tue Aug 12 12:04:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 4712461 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DEB56C0338 for ; Tue, 12 Aug 2014 12:05:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CB24F20160 for ; Tue, 12 Aug 2014 12:05:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CBA702014A for ; Tue, 12 Aug 2014 12:05:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752283AbaHLME5 (ORCPT ); Tue, 12 Aug 2014 08:04:57 -0400 Received: from mail-pa0-f50.google.com ([209.85.220.50]:52455 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752353AbaHLME4 (ORCPT ); Tue, 12 Aug 2014 08:04:56 -0400 Received: by mail-pa0-f50.google.com with SMTP id et14so12934970pad.9 for ; Tue, 12 Aug 2014 05:04:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Be+BUi8Fh9vjxfYaOf09eWc5iqTXngSC0MZZiQUD7Co=; b=gxPrtkjCVgPwhrlfLx41HnNTwhRkqpTaITsZyYIp/3pAavi8r+HZ/Fh5Gt6/7q6pHv JECHTTf4TdEhpvVGOUcNTKUVGJ40A03gDf7SZ+oNt1QJHJBwmJdPG7GQWFpiJ/MZMkLy 1IfpXDYvM6n/SXZ+zHOWKe8Mra8RllhvLqzHvf8gCz1uUVCp7pw7Zw3v/7ebBLbi3QwX 1toFeGSx2zDukP32ZSE8U/idUZe42IpFQT8jYA8rmZjKO/lgp9x67ed265mfMYueUpWp t34J17yp1aElzMf9G7zOmZ5r+Ao2NUsRSiM9pc3oHCaKzFn889tFrQ/B7kIyH5E5OIND CGvg== X-Gm-Message-State: ALoCoQmvcbe5BxhltUxpAMd9VkTYwRGoGLJ7zK/oXNv3Xq4JuSny3MD3Ut1hfSkIlDHd7HFOffIE X-Received: by 10.68.131.200 with SMTP id oo8mr3855083pbb.75.1407845095839; Tue, 12 Aug 2014 05:04:55 -0700 (PDT) Received: from localhost.localdomain ([117.198.92.185]) by mx.google.com with ESMTPSA id vu7sm12403945pab.34.2014.08.12.05.04.51 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 12 Aug 2014 05:04:54 -0700 (PDT) From: Srinivas Kandagatla X-Google-Original-From: Srinivas Kandagatla To: linux-mmc@vger.kernel.org Cc: Linus Walleij , Chris Ball , Ulf Hansson , Russell King , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH RFC 3/5] mmc: mmci: relax blksz check for SDIO Date: Tue, 12 Aug 2014 13:04:40 +0100 Message-Id: <1407845080-8353-1-git-send-email-srinivas.kandadgatla@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1407844950-8072-1-git-send-email-srinivas.kandadgatla@linaro.org> References: <1407844950-8072-1-git-send-email-srinivas.kandadgatla@linaro.org> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Srinivas Kandagatla This patch adds condition in mmci_validate_data to skip checking blocksize for SDIO card types. SDIO card type can issue blocksizes which are not exactly power of 2 so this check always fails, resulting in SDIO failures. Relaxing this check for SDIO in mmci_validate_data solves the issue encountered during WLAN ath6kl testing with Qualcomm APQ8064 SOC on IFC6410 board. Signed-off-by: Srinivas Kandagatla --- drivers/mmc/host/mmci.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 99fe80a..747aba0 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -240,6 +240,10 @@ static int mmci_validate_data(struct mmci_host *host, if (!data) return 0; + /* sdio could have sizes which are not power of 2 */ + if (host->mmc->card && mmc_card_sdio(host->mmc->card)) + return 0; + if (!is_power_of_2(data->blksz)) { dev_err(mmc_dev(host->mmc), "unsupported block size (%d bytes)\n", data->blksz);