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: 35252 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f199.google.com (mail-pd0-f199.google.com [209.85.192.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 674D720540 for ; Tue, 12 Aug 2014 12:05:00 +0000 (UTC) Received: by mail-pd0-f199.google.com with SMTP id v10sf36705255pde.6 for ; Tue, 12 Aug 2014 05:04:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=cQtQ30KnPG9U0ZoTBmFOVm6QD2pB97qassabo3OU4Gc=; b=Bam0C7PGrFI98HIkgha+8l+p1S7GEmxFgCRA8cXed346mef8G91QNsy+VMDa+IHaSy +OkpGh3MOj1vRlkmKWdGRKbWyTbgoCoOEcHHgN240kYjMSmgxI+TBYVda/BAuUhdKd+W lWkjoO4M4YBc+djzG67/li30teRG7qt+KaxnTLGDHZaYg88WJ6zv9dnzwjvlRZAdS/hk rmTGeIpnFMUwcYLHSLoJXT3I8/EgJfSW4dQ/+a9GqvwBSNvLTIHzqbMW7zhabXsNoeH/ hDM594VEK7drnKRMveGvG+rEDQJ6vzPyxbEBr6lO2fEQNfGzjvXTaQP1+3YCbImz1RAw X2UA== X-Gm-Message-State: ALoCoQl99gAWK/fhTjLN8Qu/fQ33WZbEsRMm7ZqxhqENU6XLQG9fAol5Z0FIrwclzSAWrmoA3Ufp X-Received: by 10.66.228.70 with SMTP id sg6mr1998735pac.2.1407845099721; Tue, 12 Aug 2014 05:04:59 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.80.241 with SMTP id c104ls82224qgd.39.gmail; Tue, 12 Aug 2014 05:04:59 -0700 (PDT) X-Received: by 10.221.21.201 with SMTP id qt9mr3201162vcb.39.1407845099599; Tue, 12 Aug 2014 05:04:59 -0700 (PDT) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx.google.com with ESMTPS id fr10si8051439vdc.32.2014.08.12.05.04.59 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 Aug 2014 05:04:59 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.182 as permitted sender) client-ip=209.85.220.182; Received: by mail-vc0-f182.google.com with SMTP id hy4so13261846vcb.13 for ; Tue, 12 Aug 2014 05:04:59 -0700 (PDT) X-Received: by 10.52.61.136 with SMTP id p8mr22975216vdr.15.1407845099477; Tue, 12 Aug 2014 05:04:59 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp242662vcb; Tue, 12 Aug 2014 05:04:58 -0700 (PDT) X-Received: by 10.66.152.171 with SMTP id uz11mr3578434pab.96.1407845098480; Tue, 12 Aug 2014 05:04:58 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x5si9766766pdo.67.2014.08.12.05.04.57 for ; Tue, 12 Aug 2014 05:04:58 -0700 (PDT) Received-SPF: none (google.com: linux-arm-msm-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752791AbaHLME4 (ORCPT + 4 others); Tue, 12 Aug 2014 08:04:56 -0400 Received: from mail-pa0-f53.google.com ([209.85.220.53]:48812 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752283AbaHLME4 (ORCPT ); Tue, 12 Aug 2014 08:04:56 -0400 Received: by mail-pa0-f53.google.com with SMTP id rd3so12848873pab.40 for ; Tue, 12 Aug 2014 05:04:55 -0700 (PDT) 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 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-arm-msm-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: srinivas.kandagatla@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.182 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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);